Skip to content

v2.0.1 — fix session switching when scanning a new QR - #21

Merged
SamWang8891 merged 4 commits into
mainfrom
dev
Jul 23, 2026
Merged

SamWang8891 merged 4 commits into
mainfrom
dev

Conversation

@SamWang8891

Copy link
Copy Markdown
Owner

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 sessionData truthy on load, so ClipboardInterface rendered and SessionEntry never 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.

AppContent now resolves the collision before either view renders (it is already gated on isReady, so the two dialogs cannot race for the single ConfirmProvider slot):

  • stored session + a different id in the URL → probe the stored session, then ask which to open, showing the old id struck through when it has expired
  • Open newclearSession(), and SessionEntry's existing URL-join effect performs the join, so there is no duplicated join logic
  • Stay → the URL is rewritten back to the old id so a reload does not re-prompt

Chore: 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 — clean
  • npm run build — succeeds
  • pytest — 15 passed

🤖 Generated with Claude Code

…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.
@SamWang8891 SamWang8891 self-assigned this Jul 22, 2026
@SamWang8891 SamWang8891 added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 22, 2026
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.
@SamWang8891
SamWang8891 merged commit 1e29c22 into main Jul 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant