Repository navigation
fix(relay, account): a device's pages and cards say what is true, as the signed-list QA found them - #4710
fix(relay, account): a device's pages and cards say what is true, as the signed-list QA found them#4710devswha wants to merge 4 commits into
Conversation
… 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]>
|
Warning Review limit reachedYou'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. View limit details
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. |
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.
No finding that blocks the merge. The staging QA re-checks these screens after the merge. |
|
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 The description, the tests and the review of this change stay here; #4723's table links back to it. |
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):
page opens a PC of the account by the device's registered key (
accountOpen). A PC that holds no row forthat key answers a bare
auth_failed(for instance a key the account service does not count as theaccount's yet: a sign-in without two-step), and
failureOfreads a bareauth_failedof such an attempt asrevoked. 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.
was refused by the PC before anybody was asked (
pair-unavailable: here a PC that was listed but not in theaccount yet; also a PC paused after too many tries), and the plain screen drew it as
declined.Now:
auth_failedby a PC this device never held a session with underthe account (its own record of its PCs,
seenPcs, has nosincefor 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.
joinAtOnce,now shared with the launch). Without the account's row to join by it goes to the front page as before.
pair-unavailableon 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.mdandseenPcs.tssaythe 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 genericcause
list_refused, and the device said only "This device was not added to your account / could not addit. 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, thelisting 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 akey), 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 fastwas 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.tswith the threeconventions.test.tsfiles(585 pass, 0 fail), after
bun run typecheck(clean). Not run: the unit suite, the integration suite, the browserruns.
🤖 Generated with Claude Code