Skip to content

fix(relay, account): a device's pages and cards say what is true, as the signed-list QA found them - #4710

Closed
devswha wants to merge 4 commits into
mainfrom
fix/list-qa-device-pages
Closed

devswha wants to merge 4 commits into
mainfrom
fix/list-qa-device-pages

Conversation

@devswha

@devswha devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner

What

What a device's pages and cards said in the signed-list staging QA that was not so, one commit each.

The refusal pages: "removed" for a device never let in, an Ask again that asks, and no "Not allowed" nobody said

Two screens of the hosted page said what was not true (signed-list staging QA, both on an account with no
signed list):

  1. "This device was removed from Desk. Ask again to join it." on a device the PC had never let in. The
    page opens a PC of the account by the device's registered key (accountOpen). A PC that holds no row for
    that key answers a bare auth_failed (for instance a key the account service does not count as the
    account's yet: a sign-in without two-step), and failureOf reads a bare auth_failed of such an attempt as
    revoked. Ask again then went to the front page, whose launch opened the same PC by the same key again:
    no join was ever sent, and the same line came back.
  2. "Not allowed. Ask again, then press [Allow] on Desk." though nobody declined. The join a launch asked
    was refused by the PC before anybody was asked (pair-unavailable: here a PC that was listed but not in the
    account yet; also a PC paused after too many tries), and the plain screen drew it as declined.

Now:

  • An account-key open refused with a bare auth_failed by a PC this device never held a session with under
    the account (its own record of its PCs, seenPcs, has no since for that PC) goes to the PC's join sheet,
    as a press on a new PC's sheet already did; nothing is marked removed. A PC that did let it in before still
    says it removed this device, as before.
  • Ask again on that line asks that PC to let this device join, at once, as a launch does (joinAtOnce,
    now shared with the launch). Without the account's row to join by it goes to the front page as before.
  • pair-unavailable on the plain screen is its own reason, refused, worded with the card's own words:
    "Desk cannot take this device yet", with Ask again (which sends the join again). The string exists in
    all four languages already.

The device's record of the PCs it has had a session with only chooses the words and the button offered:
"removed" only for a PC it had been in, the join sheet otherwise. It never decides what a PC admits: a device
that lost its record sees the join sheet, and a join still needs the person at the PC (or a member) to allow
it. Client only: what a PC lets in, and what it answers, are unchanged. docs/account.md and seenPcs.ts say
the record now decides this one thing.

Both were already so in part before the list work: v0.5.9 showed "This device was removed from {name}" for
that refusal (as a card), and the plain screen with Ask again and the pair-unavailable → "Not allowed"
mapping came with #4435.

A device turned away by a PC that joined by an invite is pointed to another device

A PC that joined its account's signed list by an invite signs nobody into the list. When a device asked to join
through such a PC and was approved at that PC (its window, ovis approve), the join ended with the generic
cause list_refused, and the device said only "This device was not added to your account / could not add
it. Ask to join again.", with nothing about where it can be approved (signed-list staging QA).

The PC now names that cause, list_not_signer, and the device says " cannot add this device itself /
joined your account by an invite, so it lets nobody into your account's list itself. Ask to join again, and
approve it on another device of your account." (en, ko, ja, zh). What the PC lets in does not change: only the
refusal's word. A client that does not know the new word reads it as before as a join nobody approved.

The approval card names the PC by the account's name, not its id

The card on which a member approves a new device said "Through 57011c1f · joins your 6 PCs" (signed-list
staging QA): it named the PC by this device's own pairing with it, and by the start of its id where there is
none, which is every PC a device opens through its account or its signed list. The account's own name for the
PC, from the directory the same code already reads to count the PCs, now comes before the id.

Only the name drawn on the card changes; the approval, its digits and what it lets in do not.

An SSH add asks for a fresh sign-in at once when the window's is too old

Adding a PC over SSH from a PC's own window lists and admits it with that window's sign-in. One made more than
nine minutes ago (PC_ADD_FRESH_MS) with no registered key to prove it is refused by the account service
(session_not_fresh), and the dialog offered Sign in again only after that refusal: the account's PCs, the
listing and the admission were each asked first, under "Adding it to your account…". In the signed-list staging
QA that took about two minutes.

AccountService.addAsksSignIn() tells that case from the sign-in itself (its age, and whether it registered a
key), and the add asks for the fresh sign-in before it sends anything. A sign-in whose age is not known goes on as
before, and the account service still decides every add.

Validation

bun run check fast was not run locally: the PC's heavy queue did not open for over an hour (load above 150); ran the typecheck, the convention tests and the touched test files; CI's Fast checks run the unit suite.

Touched test files run: src/lib/relay/shellAccountOpen.test.tsx src/components/RelayShell.test.tsx src/components/RelayShellScreens.test.tsx src/components/relayFailureText.test.ts src/lib/relay/shellState.test.ts src/lib/relay/shell.test.tsx server/account/list-allow.contract.test.ts src/components/AccountApprovals.listNotice.test.tsx src/lib/account/sshAdd.test.ts src/lib/account/seenPcs.test.ts src/components/MachineDialog.account-add.test.tsx src/lib/i18n.test.ts with the three conventions.test.ts files
(585 pass, 0 fail), after bun run typecheck (clean). Not run: the unit suite, the integration suite, the browser
runs.

🤖 Generated with Claude Code

devswha and others added 4 commits November 25, 2026 16:15
… and make Ask again ask

A page that opens a PC of the account by the device's registered key, refused outright by the PC
(a bare auth_failed: it holds no row for that key, as for a key the account service does not count
yet, such as a sign-in without two-step), read the refusal as a removal: "This device was removed
from <PC>". It now goes to the PC's join sheet, as a press on a new PC's sheet already did, unless
this device held a session with that PC under the account before (its own record of its PCs);
only then is it told it was removed.

Ask again on that line sent the front page's launch, which opened the same PC by the same key and
came back to the same line, so no join was ever sent. It now asks that PC to let the device join at
once, as a launch does (joinAtOnce, shared with the launch).

The join a launch asked, refused by the PC before anybody was asked (pair-unavailable: a PC in no
account yet, one paused after too many tries), drew "Not allowed. Ask again, then press [Allow]",
though nobody declined it. It now says "<PC> cannot take this device yet", the card's own words.

Co-Authored-By: Claude Opus <[email protected]>
…pointed to another device

A PC that joined its account's signed list by an invite signs nobody into the list. Approved at
that PC (its window, ovis approve), a join with the device's card ended with the generic cause
list_refused, and the device said only "<PC> could not add it. Ask to join again.", with nothing
about where it can be approved. The PC now names that cause (list_not_signer), and the device says
"<PC> cannot add this device itself: it joined your account by an invite, so it lets nobody into
your account's list itself. Ask to join again, and approve it on another device of your account."
(en, ko, ja, zh). What the PC lets in does not change; only the refusal's word.

Co-Authored-By: Claude Opus <[email protected]>
…ot its id start

The card a member approves a new device on said "Through 57011c1f · joins your 6 PCs": it named the
PC by this device's pairing with it, and by the start of its id where there is none, which is every
PC a device opens through its account or its signed list. The account's own name for the PC, which
the same effect already read to count the PCs, now comes before the id.

Co-Authored-By: Claude Opus <[email protected]>
…ndow's is too old

Adding a PC over SSH from a PC's own window lists and admits it with the window's sign-in. One more
than PC_ADD_FRESH_MS old, with no registered key to prove it by, is refused (session_not_fresh), and
the dialog offered "Sign in again" only after that refusal: the account's PCs, the listing and the
admission were each asked first, under "Adding it to your account…" (about two minutes in the
signed-list staging QA). AccountService.addAsksSignIn tells that case from the sign-in itself, and
the add asks for the fresh sign-in before it sends anything. A sign-in whose age is not known goes
on as before, and the service still decides.

Co-Authored-By: Claude Opus <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 25, 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 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 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 b0f20e7 and b0f7446.

Files selected for processing: 25

  • changelog.d/allow-card-pc-name.md
  • changelog.d/list-join-not-signer.md
  • changelog.d/relay-refusal-pages.md
  • changelog.d/ssh-add-sign-in-first.md
  • docs/account.md
  • server/account/list-allow.contract.test.ts
  • server/relay/session.ts
  • src/components/AccountApprovals.listNotice.test.tsx
  • src/components/AccountApprovals.tsx
  • src/components/RelayShell.test.tsx
  • src/components/RelayShell.tsx
  • src/components/RelayShellScreens.tsx
  • src/components/relayFailureText.test.ts
  • src/components/relayFailureText.ts
  • src/lib/account/seenPcs.ts
  • src/lib/account/service.ts
  • src/lib/account/sshAdd.test.ts
  • src/lib/account/sshAdd.ts
  • src/lib/i18n/relay.ja.ts
  • src/lib/i18n/relay.ko.ts
  • src/lib/i18n/relay.zh.ts
  • src/lib/relay/shell.tsx
  • src/lib/relay/shellAccountOpen.test.tsx
  • src/lib/relay/shellState.test.ts
  • src/lib/relay/shellState.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 25, 2026

Copy link
Copy Markdown
Owner Author

Review standing in for CodeRabbit (its review was rate limited on this PR)

No CodeRabbit review ran here. I read the server and wire part in full and the client part by its tests and summary.

  • Wire: one new cause word, list_not_signer, for a join refused by a PC that joined its account's list by an invite (server/relay/session.ts, LIST_ALLOW_CAUSES). It replaces the generic list_refused for that one refusal; the refusal itself, and who is refused, are unchanged. A client that does not know the word shows its generic sentence as before.
  • Refusal pages: the device's own record of the PCs it has had a session with now chooses between "was removed" and the PC's join sheet. It decides what is shown and which button is offered, never what a PC admits; a device that lost its record sees the join sheet, and a join still needs the person at the PC or a device of the account.
  • Ask again sends that PC's join instead of opening the same PC by the same key again.
  • Allow card: the PC's name comes from the account's directory before the id's start.
  • SSH add: asks for the fresh sign-in before it sends anything when the window's sign-in is too old; the service still decides where the age is unknown.

No finding that blocks the merge. The staging QA re-checks these screens after the merge.

@devswha

devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Closed in favour of #4723, which merges this branch together with the other fixes the signed-list staging QA asked for. Nothing of this pull request was dropped: #4723 is main with these branches merged in. The reason is CI capacity: twelve separate runs and twelve merges, each waiting for Fast checks on a new base, had filled the self-hosted runners for every session.

The description, the tests and the review of this change stay here; #4723's table links back to it.

@devswha devswha closed this Nov 25, 2026
@devswha
devswha deleted the fix/list-qa-device-pages branch November 25, 2026 13:05
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.

1 participant