Skip to content

Relay dashboard: follow-ups from the merge review #3452

Open

Description

@devswha

Follow-ups from the merge pass's review of #3284 (hosted relay app on sign-in, PC dashboard), Codex route: team proxy, and omo:

  1. MEDIUM, reproduced, also on main (joinAccount): enrollment captures account A's session, but its later directory write uses the currently stored session (src/lib/relay/accountController.ts:269). With the PC status response paused and the stored session switched to account B, A's PC name, id, public key and relay are written to B's directory. B can't control the PC (admission still needs its device key). Fix: bind directory calls to the sign-in captured at the start.
  2. MEDIUM (omo): a saved PC marked as still joining the account ("pending" or "failed") stops at the Ready screen every time it is opened (src/lib/relay/shell.tsx:301, :210, accountController.ts:184-188).
  3. LOW: older saved sign-ins have no sign_in_id, so a refresh in another tab during a leave isn't recognised as the same sign-in (src/lib/account/service.ts:225-235); leaving entries are kept when the store is cleared and never pruned (store.ts:239-251, leave.ts:38).

Activity

  1. devswha commented on Nov 9, 2026

    @devswha
    OwnerAuthor

    Adding the account leave/enrollment items from the relay-console lane's Codex review of #3284 (route: team proxy; details in #3284 (comment)), so they are tracked here too. The first three predate #3284 in the account code on main; #3284 narrowed some of them.

    • HIGH: a tab opened before an upgrade does not take part in the link/leave ordering (one IndexedDB transaction each for "check + record link" and "mark leaving + snapshot"), so during an upgrade it can still send a link after a leave's snapshot.
    • HIGH: leave.ts takes a pairing's older account field plus directory membership as confirmation of a link to the leaving key, so such a PC can be left out of "unconfirmed".
    • HIGH: two tabs leaving at once, with a new sign-in between them, can make the second leave clear the new sign-in's key and account records.
    • MEDIUM: leave and sign-out read the session asynchronously, so a replacement sign-in that commits before that read is the one they act on.
    • MEDIUM: a native sign-in made while a leave is still running stays on "signing in" until the next refresh.
    • MEDIUM (introduced by feat(relay): open the hosted relay app on sign-in and a PC dashboard #3284's second review fix round): a session saved by an older build (no sign_in_id), refreshed while its sign-out waits on the account lock, counts as a different sign-in and stays stored after the sign-out.
    • LOW: the replacement-session tests use legacy-shaped sessions only; tests on the IndexedDB implementation with independently generated sign-in ids would cover the production path.
  2. devswha commented on Nov 10, 2026

    @devswha
    OwnerAuthor

    Item 1 (an enrollment writing account A's PC to B's directory) is fixed by #3511. Items 2 and 3 stay open.

  3. devswha commented on Nov 11, 2026

    @devswha
    OwnerAuthor

    Pre-0.5.3 triage: the account leave/link items in the comment above wait for after the release. They're races between the user's own tabs (a tab opened before an upgrade, two leaves at once with a sign-in between them, a session read during a leave), all present before 0.5.2. The worst outcomes are a new sign-in on this device being cleared, or a PC missing from the "unconfirmed" list after a leave; none lets another person in. They need one pass over the leave/link ordering in the account store, not a release-week patch. Item 3 (LOW) goes with it.

  4. devswha commented on Nov 28, 2026

    @devswha
    OwnerAuthor

    Re-checked on main df6bd8a with scratch tests:

  5. devswha commented on Nov 28, 2026

    @devswha
    OwnerAuthor

    The pending-link item is merged in #4972. The phone sign-in during a leave was already covered by #4961. Item 3b (leaving entries never pruned) stays as discussed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions