Skip to content

fix(account): end a row's other sessions when a link moves it to another key - #2931

Merged
devswha merged 1 commit into
mainfrom
fix/account-link-sessions
Nov 5, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/account-link-sessions

Conversation

@devswha

@devswha devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Summary

A link moves a row from its old relay key to the account key. Other sessions that had signed in with the old key kept drive access (terminals, settings) until they reconnected. Member actions already needed the row's current key.

A link now ends the row's other sessions with auth_changed once it is written. The linking session goes on, with no member's rights, until it signs in again with the new key. The PC's other devices are untouched.

Closes #2864

Validation

  • bun run check fast: all ok (typecheck, build, unit tests 11754 pass, 0 fail).
  • New test "a link ends the row's other sessions from its former key, and keeps the one that linked" failed before the fix.
  • Closing the linking session too breaks 35 account tests.
  • "the session that linked a row, still on the row's former key, acts as no member" now checks the session that stays open.
  • bun test server/account/ server/relay/ server/device-access.contract.test.ts: 247 pass.

…her key

A session signed in with a row's old relay key kept drive access after
the row was linked to the account key, until it reconnected. A link now
ends the row's other sessions with auth_changed; the linking session goes
on (with no member's rights) until it signs in again with the new key.

Closes #2864
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 54 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e781d05 and 1aeb001.

Files selected for processing: 6

  • docs/account.md
  • server/account/account.contract.test.ts
  • server/account/records.ts
  • server/account/routes.ts
  • server/devices.ts
  • server/relay/session.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devswha

devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Local merge gate (owner-approved): bun run check fast passed at this head, omo CLEAR, threads resolved, merges cleanly. Closes #2864. Merged without waiting for GitHub CI.

@devswha
devswha merged commit 6665c9f into main Nov 5, 2026
18 of 21 checks passed
@devswha
devswha deleted the fix/account-link-sessions branch November 5, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Account: a session signed in with a row's old key keeps drive access after a link

1 participant