Repository navigation
Conversation
…, and a repeating plan never asks again (F9, red) Staging F9: the phone sat in the app of the PC it paired with; the shell opened that session before the device waited on its PCs, so onPcSession asked nothing, and the background asker runs only on the shell's front page and only when the list view changes. The PC was never asked, and the move never started. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n a PC's app too, and again on a clock (F9) The background asker ran only on the shell's front page (view.active) and only when the list view changed. A device sitting in the app of the PC it paired with, whose session opened before the device waited on its PCs, therefore never asked that PC, and a plan that came out the same every round (`no_witness`, `too_new` on an answer heard earlier) never asked again: the move never started. It now runs whatever the shell shows, and on a timer while the device waits on its PCs: after the re-ask gap, or after the wait the plan told where that is longer, and not while the page is hidden. Each PC is still asked at most once per gap. The QA twin's factor turns the gap down with its other waits, to 30 seconds at the least. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ng before the directory is read (F9, red) The list's first round on a page runs inside refresh(), before the directory and the sign-in's key are set, so a PC the device also paired with is asked over the pairing, which a PC answers 403 account_required, and is then not asked again for the gap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, and runs when it is read (F9) The list's first round on a page runs inside refresh(), before the sign-in's directory is read. A PC the device also paired with was then asked over the pairing, which a PC answers 403 account_required (the witness is for its account's sessions alone), and was not asked again for the gap. While this sign-in's directory read is under way the ask now waits, and refresh() asks once the read has ended. With no read under way (it failed) a saved pairing is still the way, as before. Co-Authored-By: Claude Opus 5.5 <[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 6 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. |
Independent review standing in for CodeRabbit (rate limited on this PR)A reviewer who was given the code and not the author's conclusions read this branch and tried to break it. Verdict: clear, with three notes that go to a follow-up. The hold is removed. NOTE M1. CONCERN, not proved. NOTE M2. TRACED. Neither NOTE M3. No test for dispose or sign-out stopping the timer, or for the hidden-page re-arm. Questions checked (#4713)
|
|
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. |
…den page (#4713 review M2 red, M3) M2 (red): a sign-out leaves the asker's clock running, so it can ask the old account's PCs over saved pairings until the list's view says the sign-in is gone. M3: a dispose stops the clock; a hidden page asks nothing, and a page shown again asks at once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… M2) invalidate() (sign-out, a removal, another sign-in's read) now stops the asker's clock, and the asker and its clock act only for a signed-in page: the list may still show the move until it reads that the sign-in is gone, and meanwhile nothing goes to the old account's PCs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Staging QA (F9): the account was on the migrate switch, but the phone never moved it onto its signed
list. One PC (m3) was up and had let every device in for longer than the scaled day; the other (m4) was
off past its three days. The phone's plan sat at
no_witnessand it never asked m3 for its witnessanswer (
GET /api/account/list/witness).Cause. The device asks its PCs for the move only when something triggers it, and in this state
nothing did:
is a fresh page load: My PCs navigates to it, and a restart loads it directly. The shell opens that
PC's session before the page's first list round, so nothing is asked.
askPcs) ran only on the shell's front page (view.active()isfrontUp)and only when the list view changed. A plan that comes out the same every round (
no_witness, ortoo_newon an answer heard earlier) changed no view, so nothing ran it again.refresh()before the directory and the sign-in's key are set, so a PC the device also paired withwas asked over the pairing. The PC answers that with 403
account_required(the witness is for itsaccount's sessions only), and the device then did not ask it again for ten minutes.
Answers are kept in page memory. The one answer QA saw (heard on My PCs) was lost when the app moved on
to m3's page. The rules are not at fault: with one PC that answered and one silent past its three days,
the plan starts (
src/lib/account/listMigrate.test.ts, "a PC it knows that has not answered holds thestart back for three days").
Fix (
src/lib/relay/accountController.ts):askPcsalso runs while a PC's app is open.the
too_newwait the plan told where that is longer. It does not run while the page is hidden.waits, to 30 seconds at the least.
it waits, and
refresh()asks once the read ends. With no read under way (a failed one), a savedpairing is still used, as before.
Nothing here changes who is carried into a list. The PCs' answers and the plan's rules are untouched.
docs/account-list.mdnow describes the asking.No changelog fragment: the move onto the list is not released yet, and this makes it do what
changelog.d/account-list-migrate-app.mdalready says.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.bun run typecheck: passes.bun test --timeout 60000onsrc/lib/relay/accountController{,.delete,.enrollment,.list,.listLeave,.migrate,.renew,.signOutEverywhere}.test.tsplus
scripts/conventions.test.ts,src/conventions.test.ts,server/conventions.test.ts: 373 pass, 0 fail.src/lib/account/listMigrate{,.session,.review}.test.tsalso pass.src/lib/relay/accountController.migrate.test.ts(commits 02e5270and 27d334e) fail before the fix commits and pass after:
check integrationand the browser batteries (lead's decision).🤖 Generated with Claude Code