v2.0.1 — fix session switching when scanning a new QR - #21
Merged
Merged
Conversation
…s another A saved session made `sessionData` truthy on load, so ClipboardInterface rendered and SessionEntry never mounted — the connection id in the URL was never read. Scanning a QR for a new session therefore resumed the old one and the only prompt shown was that old session's expiry check. Resolve the collision in AppContent before either view renders: probe the stored session, then ask whether to open the id from the URL, striking the old id out when it no longer exists. Opening the new one clears the stored session so SessionEntry's existing URL-join path handles it; staying rewrites the URL back so a reload does not re-prompt.
Every place the version is stated: both READMEs' badges, the FastAPI app metadata, backend pyproject, frontend package.json, the footer and the menu, and the two lockfiles' entries for the project's own package.
The version was written out by hand in the footer and again in the menu, alongside package.json — three copies that could disagree, and did no work to stop it. vite.config.js now reads its own package.json and substitutes __APP_VERSION__ via `define`, so package.json is the only place it lives. Resolved against import.meta.url rather than cwd so a build from any directory picks up the right file, and declared as an eslint global since `define` is a build-time substitution the linter cannot see.
They now derive their version from package.json via __APP_VERSION__ at build time, so the greps for the old hardcoded strings returned empty and failed the equality check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch release on top of v2.0.0. Two commits.
Fix: scanning a new QR while an old session is stored
A saved session made
sessionDatatruthy on load, soClipboardInterfacerendered andSessionEntrynever mounted — meaning the connection id in the URL was never read. Scanning a QR code for a new session silently resumed the old one, and the only thing the user saw was the old session's expiry prompt asking whether to go home.AppContentnow resolves the collision before either view renders (it is already gated onisReady, so the two dialogs cannot race for the singleConfirmProviderslot):clearSession(), andSessionEntry's existing URL-join effect performs the join, so there is no duplicated join logicChore: version bump to 2.0.1
Every place the version is stated: both README badges, FastAPI app metadata,
backend/pyproject.toml,frontend/package.json, the app footer, the menu, and the two lockfiles' entries for the project's own package.Verification
npm run lint— cleannpm run build— succeedspytest— 15 passed🤖 Generated with Claude Code