Skip to content

fix(account): the add-this-PC screen keeps its window open, resumes after a reload and says when it is done - #3544

Merged
devswha merged 6 commits into
mainfrom
fix/account-add-pc-waiting
Nov 10, 2026
Merged

devswha merged 6 commits into
mainfrom
fix/account-add-pc-waiting

Conversation

@devswha

@devswha devswha commented Nov 10, 2026

Copy link
Copy Markdown
Owner

What

A PC waiting on its own page to be added to the account (Settings → Account, and the first-run welcome) had four problems:

  • Its pairing window was reopened only every nine minutes. After Ovis restarted (a beta update) the screen kept saying "then approve it here" for up to nine minutes while every attempt from the other device was refused.
  • A reload fell back to the "Add this PC to my account" button with no word about the wait.
  • Nothing told the person a device had added the PC.
  • The text named only a phone and the Ovis app, and did not say six digits would appear.

Now, while it waits:

  • the approve-here window is opened again every 30 seconds and when the tab is shown again, never while the page is hidden, and with no directory write;
  • everything stops 30 minutes after the press, with "This PC stopped waiting after 30 minutes." and a Keep waiting button;
  • the screen asks the PC every 3 seconds and says "This PC is in your account. Your other devices can open it now." with the account id's first 12 characters;
  • a reloaded tab goes on waiting within the same 30 minutes, only on the same PC under the same account;
  • the text names any signed-in device (the Ovis app or app.ovis.sh), says a six-digit number will appear, and there is a Stop waiting button;
  • a relay that is still connecting (relay_offline) gets its own sentence.

How

Client only. src/lib/account/addThisPc.ts gains reopenAddWindow() (the link route alone, answers the PC's id) and the tab's marker ovis-add-pc-waiting in sessionStorage: { name, until, serverId, account, listedAt }. AddThisPc in src/components/AccountSection.tsx is exported and runs the reopen, the status poll, the relisting and the 30-minute end from one effect. listThisPc now answers { name, serverId, account }. The nine-minute relisting stays, scheduled from when the PC was last listed.

Differences from the plan's brief:

  • The marker holds more than { name, until } (review finding 1 and 2).
  • The done text is shown only when the PC joined the account that was waited under; a PC that joined another account shows nothing.
  • A wait started with no stored sign-in (only reachable with an injected service) is not kept for a reload.
  • Stop waiting does not close the window on the server: that needs a server route (a later PR, as the brief says). The window closes by itself within its usual time.

Review

  • Medium, marker not bound to the PC or the account: real. The marker now holds the PC's id and the account. A reloaded tab resumes only when the page's PC (/s/<id>/ at the hosted app) matches and the stored sign-in's account matches; otherwise the marker is dropped and the offer is shown with no link call. Each reopen's answer is checked against the marker's PC, the sign-in is checked before each relisting, and sign-out clears the marker. On a PC's own address the page names no PC, so there the check is the reopen's answer (the first call after a resume): a window is opened on that PC once before the wait ends, and nothing is listed. Tests: another account, no sign-in, another PC's page, an address answering for another PC, a sign-in changed under a waiting screen.
  • Medium, relisting restarted from the reload: real. The marker keeps listedAt, updated on each listing; the next one is due listedAt + 9 min, at once when that has passed, then every nine minutes. A listing that failed is tried again after 30 seconds. Tests: an 8-minute-old listing is renewed one minute after the reload; an overdue one at once; a failed one with the next reopen.
  • Low, a failed mount read left the card empty: real (apiFetch does not retry that read). With an in-time marker for this page's PC the read is tried again every 3 seconds until it answers; without a marker nothing is retried, as before. Tested.
  • Low, old wording in docs/relay.md and scripts/plugin-link.ts: fixed in this PR, both now name any signed-in device. The terminal flow keeps its own second sentence (the request shows in the terminal).

Validation

Ran, on the final tree (b9a38f3f4):

  • bun run check fast: every line ok (workflow syntax, generated types, generated themes, typecheck, build, unit tests 14421 pass / 0 fail / 50 skip in 876 files, actionlint).
  • bun test src/components/AccountSection.addThisPc.test.tsx src/lib/account/addThisPc.test.ts: 29 pass.
  • bun run check run bun scripts/relay-panel-regression.ts (Settings → Devices and PCs, browser): pass.
  • bun run check run bun scripts/settings-pages-demo-regression.ts (every Settings page, browser): its 17 page, history and layout steps pass; its last step, the settings search matrix, fails on this host with 68 rows (focusedSection: null on the Appearance and Chat pages). The same 68 rows fail on the base commit 6cb6f6c78 without this PR (run in a throwaway worktree with --build), so the failure is not from this diff. The demo has no sign-in, so AddThisPc is not drawn in it.

Not run:

  • No browser regression names AccountSection or AddThisPc (grep -l over scripts/*-regression.ts scripts/*-qa.ts finds none); the two above are the ones that open Settings. They ran on the host through check run, not in the CI runner image.
  • No setup-guide (welcome) browser script was run.
  • No real device, no real account service, no real relay: the waiting screen was exercised only in the unit test with fake timers and a stubbed PC.
  • scripts/plugin-link.ts changed one printed sentence; GitHub's checks cover scripts/plugin*.

Needs a real review: it touches the add-this-PC pairing flow (when the approve-here window is opened and when the PC lists itself in the account's directory) and what a tab resumes without a press.

🤖 Generated with Claude Code

devswha and others added 2 commits November 10, 2026 14:10
…fter a reload and says when it is done

A PC waiting on its own page to be added to the account reopened its pairing
window only every nine minutes, so a restart of Ovis (a beta update) left the
screen saying "approve it here" while every attempt from the other device was
refused. The wait was React state only, so a reload fell back to the button,
and nothing told the person when a device had added the PC.

While waiting, the screen now:
- opens the approve-here window again every 30 seconds and when the tab is
  shown again, never while the page is hidden, with no directory call
  (reopenAddWindow);
- stops everything 30 minutes after the press and offers Keep waiting;
- asks /api/account/status every 3 seconds and says "This PC is in your
  account" with the account id's first 12 characters;
- keeps { name, until } in sessionStorage, so a reloaded tab goes on within
  the same 30 minutes;
- names any signed-in device, says six digits will appear, and has a Stop
  waiting button.

A relay that is still connecting (relay_offline) gets its own sentence.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…account, and lists on time

Review of the waiting screen found four things:

- The marker a tab keeps for a reload held only { name, until }, so any later
  mount in that tab resumed it: after a sign-in to another account, or on
  another PC's page of the hosted app. It now also holds the PC's id and the
  account it was listed in. A reloaded tab resumes only when the page's PC
  (/s/<id>/ at the hosted app) and the stored sign-in's account match; the
  answer of every reopen and the sign-in before every relisting are checked
  too, and a sign-out forgets the marker. "This PC is in your account" is
  said only when the PC joined the account that was waited under.
- After a reload the nine-minute relisting started over, so the directory
  entry could run out while the screen still waited. The marker keeps when
  the PC was last listed; the next listing is due nine minutes after that, at
  once when that has passed. A listing that failed is tried again after 30
  seconds, not nine minutes later.
- A reloaded waiting tab whose PC did not answer yet (Ovis restarting) stayed
  empty. With a wait kept, the status is asked again every 3 seconds.
- docs/relay.md and the plugin's link command still said "on a phone ... tap
  Add"; both now name any signed-in device.

listThisPc answers { name, serverId, account }; reopenAddWindow answers the
id of the PC that opened the window.

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

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Add a PC using any device already signed in to your account, including the Ovis app or app.ovis.sh, with the six-digit code shown on screen.
    • The pairing flow can resume after a reload and continue waiting for up to 30 minutes. You can stop or restart waiting, and you’ll see a confirmation when the PC is added.
  • Documentation
    • Updated PC pairing instructions to explain how to approve the request from a signed-in device.

The PC account-add flow now persists and resumes a wait, periodically reopens the pairing window and checks account assignment, and displays completion or expiry states. Instructions now describe approval from any signed-in device.

Changes: PC account pairing

Layer / File(s) Summary
Pairing wait data and helpers
src/lib/account/addThisPc.ts, src/lib/account/addThisPc.test.ts
Wait records store the PC, account, expiry, and listing time. PC listing returns its name, server ID, and account. Tests cover listing and reopening the pairing window.
Waiting lifecycle and UI
src/components/AccountSection.tsx, src/components/AccountSection.addThisPc.test.tsx
The screen resumes valid waits, reopens the pairing window every 30 seconds, checks account assignment every 3 seconds, and relists every 9 minutes. It handles stopping, expiry, completion, and listing errors. Tests cover these states and timing behavior.
Approval instructions and translations
docs/relay.md, scripts/plugin-link.ts, src/lib/i18n.*.ts, changelog.d/account-add-pc-waiting.md
The instructions describe approval from a signed-in device. Japanese, Korean, and Chinese translations include the updated instructions and waiting states. The changelog records the pairing-window and wait behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Possibly related issues

  • Issue 3503 concerns account PC-list reads that are not bound to the shown sign-in. This change adds repeated account-directory listings and associates the wait with an account, but the provided context does not establish that it resolves the issue.
Merge Risk: Minimal · previous review b9a38

The add-this-PC waiting screen now keeps its pairing window open, resumes after a reload, and reports when the PC has joined the account. No concrete merge-blocking defect was identified. Real-device and relay testing was not reported, which is a normal follow-up check.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly summarizes the main change: the add-this-PC screen keeps the pairing window open, resumes after reload, and reports completion.
Description check Passed The description explains the problem, resulting behavior, implementation, and validation, including skipped tests and known failures. It uses “What” and “How” instead of the template’s “Change” headin…
Docstring Coverage Passed Docstring coverage is 90.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentati…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, resulting behavior, implementation, and validation, including skipped tests and known failures. It uses “What” and “How” instead of the template’s “Change” heading, and it does not link an issue for the feature.

Full details: Docstring Coverage

Explanation

Docstring coverage is 90.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 10 functions across 8 files. (2 skipped: 2 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 26a3293 and b9a38f3.

Files selected for processing: 10

  • changelog.d/account-add-pc-waiting.md
  • docs/relay.md
  • scripts/plugin-link.ts
  • src/components/AccountSection.addThisPc.test.tsx
  • src/components/AccountSection.tsx
  • src/lib/account/addThisPc.test.ts
  • src/lib/account/addThisPc.ts
  • src/lib/i18n.ja.ts
  • src/lib/i18n.ko.ts
  • src/lib/i18n.zh.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

…count" is said only when true

Review findings on the add-this-PC wait:

- Two copies of the screen can be mounted at once (Settings over the welcome). Stop waiting in one
  now stops the other: a copy whose kept wait was ended elsewhere reopens nothing, lists nothing
  and never writes the marker back. A copy taking a wait up no longer clears the marker meanwhile.
- "Your other devices can open it now" waits for the PC's status to stop saying `enrolling`;
  until then the screen says the adding device is still letting them in, and keeps asking.
- A PC that joined is called "in your account" only under the sign-in stored now, after a reload
  and on a live poll.
- The reopen checks the stored sign-in, so a sign-out in another tab ends the wait within 30 s.
- A request that never answers no longer holds the next reopen, poll or listing.
- A reload under an Ovis that stays down past the 30 minutes says the wait stopped, not nothing.
- A press after the wait ended first asks whether a device added the PC through the window that
  outlived it, and then lists nothing.
- The `relay_offline` sentence is gone: /api/relay/link never answers it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@devswha

devswha commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Review findings resolved in 814f860

Two reviews of b9a38f3 (Opus and Codex, both CLEAR). Each new test fails against the previous component (12 of the 12 new tests failed on b9a38f3's AccountSection.tsx).

MEDIUM

  • Stop waiting in one AddThisPc leaves a second mounted one reopening, relisting and writing the marker back (Opus): fixed. A copy whose kept wait is no longer the one in the tab's storage reopens nothing, lists nothing (also under a hidden page) and never writes the marker back; its next poll first asks the PC whether it was added (so a copy that lost the marker because the other one saw the join says "in your account", not the offer), else returns to the offer. A copy taking a wait up no longer clears the marker while it reads the sign-in, and a copy that expires or stops never forgets a wait another copy began since. Tests: "Stop waiting in one copy…", "a copy whose wait another copy stopped lists nothing under a hidden page…", "a copy that waits says the PC was added…".
  • Completion is reported while enrollment is still blocked (Codex): fixed. The screen reads enrolling from /api/account/status. While it is true it says "This PC is in your account. The device that added it is still letting your other devices in." (ko/ja/zh added), reopens and lists nothing, and keeps asking every 3 s; "Your other devices can open it now" shows only once it is false. A PC that falls back to no account (its first member left before enrolling it) shows the offer again. Also after a reload.
  • A reload can show success for another signed-in account (Codex): fixed. "In your account" is shown only when the sign-in stored now is the PC's account, on the reload path, on the live poll and on the relist; otherwise the screen shows nothing.
  • Refreshing the wait extends the local-only approval after the PC joins (Codex): not changed, on purpose. The longest the approve-here rule can outlive a join is the same ten minutes as before this PR (the base opened the window on the press and on every nine-minute relist; this PR's last reopen is at most 30 s before the join is seen, and the join stops every reopen within 3 s). What changes is the shortest case: about 9.5 minutes instead of 1. In that span a join request is approved on the PC only, which is the stricter side and is what docs/account.md step 1 states ("never listed to account members … even once the PC has members"; pair-sas.contract.test.ts holds it). Ending the rule at the link is a change to the server's pairing approval, which this PR does not touch; it belongs in a server PR with its own review if wanted.

LOW

  • A sign-out or another sign-in in another tab leaves this tab reopening for up to nine minutes (Opus): fixed. Each reopen reads the stored sign-in first and ends the wait on a mismatch.
  • One request that never answers stops every later reopen, poll and relist (Opus): fixed. Reopen and poll give the PC 10 s (ANSWER_MS), a relist one minute; after that the next one runs.
  • A restart lasting past the deadline leaves the screen blank (Codex): fixed. A reloaded tab that was asking again when its 30 minutes ended shows "This PC stopped waiting after 30 minutes." with Keep waiting.
  • The relay_offline sentence can never show (Opus): fixed by removing the branch, its three translations and the stubbed test case; /api/relay/link answers relay_off only.
  • After Stop waiting or the 30-minute end the window lives up to ten more minutes and the screen misses a join made in it (Opus): partly fixed. Keep waiting / Add this PC now asks the PC first: a PC a device added through that window is shown as in the account and is not listed again. The screen does not keep polling after it stopped, so it does not change by itself in those ten minutes; docs/account.md now says the open window closes by itself up to ten minutes later.
  • "Never while the page is hidden" is not true of the nine-minute relist (Opus): as the reviewer suggests, behaviour kept (skipping it would let the account's card lapse); the relist's comment and docs/account.md now say so. The PR description's sentence applies to the 30 s reopen only.
  • docs/account.md still describes the old behaviour (Opus): fixed, step 1 of "Adding a PC".

Checks

  • TMPDIR=… dori heavy fix-3544 -- bun run check fast: every line ok (workflow syntax, generated types, generated themes, typecheck, build, unit tests: 14434 pass, 0 fail).
  • No browser regression ran: no scripts/*-regression.ts or *-qa.ts drives this screen (the "Add this PC" in relay-shell-browser-qa.ts and relay-dashboard-browser-qa.ts is the dashboard's sheet button, and the shell QA opens the PC's window through the API).

…f Add this PC share one

Review round two of the add-this-PC wait.

- listThisPc makes every directory call as the sign-in stored when the listing
  began (forSignIn), so a sign-in made in another tab meanwhile is never written to.
- A relist names the wait it lists for: it writes nothing when the address answers
  for another PC, when another account is stored, or once the wait was stopped (here
  or in the other copy) while the listing was on its way. The marker is asked right
  before each directory write.
- A second copy re-reads the marker after reading the sign-in, so it does not take
  up a wait the first copy stopped meanwhile.
- A copy showing the button takes up the wait the other copy begins, and one whose
  wait was replaced goes on with the new one: closing Settings no longer ends the
  wait the guide's copy shows nothing of.
- Two copies waiting on one wait list the PC again once: the second joins the
  listing on its way, or goes on from the listing the marker already holds.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@devswha

devswha commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Round two findings, resolved in f193692 (one push).

MEDIUM 1, a relist can write this PC into a different signed-in account: fixed. listThisPc reads the stored sign-in once and makes every directory call through service.forSignIn(session). A sign-in stored meanwhile is refused before the write (SignedOutError); the next reopen then ends the wait. Tests: "a sign-in that changes while the PC is being listed again is never written to" (component) and "a listing writes only as the sign-in stored when it began" (lib).

MEDIUM 2, a relist can publish a different PC before checking its identity: fixed. A relist passes the wait it lists for (for: { serverId, account, running }). listThisPc compares the offer's server id and the stored account with it before any directory call and throws AddPcWaitOver ("pc" or "sign-in"); the screen ends the wait. Test: "an address that answers for another PC under a hidden page is not listed in its place". Not changed: the link request itself is how the screen learns which PC answers, so the approve-here window of the PC that answers is opened by that request, as with the reopen. Nothing is listed and no device is rung.

MEDIUM 3, a second screen can revive a wait after Stop waiting: fixed. The mount effect reads the marker again after the sign-in read and resumes only the wait the tab still keeps. Test: "a second copy that was still reading the sign-in when the first stopped the wait does not take it up".

MEDIUM 4, an in-flight relist can publish the PC after Stop: fixed. running() (this copy still mounted on the wait, and the marker still this wait's) is asked right before deletePc and before putPc; a wait that ended throws AddPcWaitOver("ended") and writes nothing. Tests: "Stop waiting while the PC is being listed again writes nothing to the directory" and "Stop waiting in the other copy while this one lists the PC again writes nothing either".

LOW, a copy showing the offer never takes up a wait begun in the other copy: fixed. keepAddPcWaiting tells listeners (onAddPcWaiting); a copy in the offer, expired or error state takes the wait up with resumed: false, under the same stored account only. A copy whose wait the other copy replaced goes on with the new one instead of the offer. Tests: "a copy showing the button takes up the wait begun in the other copy, and goes on with it when that one closes", "... does not take up a wait begun under another sign-in than the one stored", "a copy whose wait the other copy replaced with a new one goes on with the new one".

LOW, two waiting copies both relist at nine minutes: fixed. The second copy joins the listing on its way for the same wait, or goes on from a newer listedAt in the marker. An attempt that got no answer in time lists nothing late and frees the shared listing. Test: "two copies waiting on one wait list the PC again once, not once each".

Each new test fails with the fix reverted (checked by restoring the old component, and by unbinding the service in listThisPc).

Note for the stacked branch (feat/account-signin-adds-pc): no export was renamed or moved. listThisPc gained an optional for, and it now calls service.forSignIn, so a test double of the account service needs that method. New exports: AddPcWaitOver, ListedFor, onAddPcWaiting.

Validation

  • bun run check fast: every line ok (unit: 14446 pass, 0 fail).
  • bun run check run bun scripts/settings-pages-demo-regression.ts: ran, exit 1. 17 scenarios pass; the last one, the Settings search matrix ("every matrix row opens its page and group from the first Settings result"), fails for every row. This PR does not touch Settings search, and today's runs of the same script from other branches on this machine, among them a checkout of fix/relay-add-window-restart, fail on the same assertion. I did not rerun it on this PR's previous head.
  • Not run: check full, integration, other browser regressions.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Deploying ovis with  Cloudflare Pages  Cloudflare Pages

Latest commit: a9c9d71
Status: ✅  Deploy successful!
Preview URL: https://f3cc0bad.ovis.pages.dev
Branch Preview URL: https://fix-account-add-pc-waiting.ovis.pages.dev

View logs

@devswha
devswha merged commit e46e13b into main Nov 10, 2026
21 of 23 checks passed
@devswha

devswha commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head ee89d9c00096 as e46e13bf45a0 on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
claude CLEAR
codex CLEAR

Four review rounds (the last on a merge of main only) (Claude Opus 5.5 and Codex Terra each). At this head both are CLEAR: every earlier fix was reverted one at a time against the tests by the Claude reviewer.
Left for the owning session's follow-up, none reproduced as more than LOW/MEDIUM on a machine the person already drives: read the PC's id from a request with no side effect (GET /api/health) before a resumed wait opens a window or accepts a membership; bind an attempt's timeout into the relist's running check before each directory write; a test for the withdrawn check after an in-flight relist.

@devswha
devswha deleted the fix/account-add-pc-waiting branch November 10, 2026 11:10
devswha added a commit that referenced this pull request Nov 10, 2026
…e system hands out (#3590)

## Why

`server/updater.test.ts` "hands over to the installed release's own
supervisor" timed out in CI twice in the last 1000 runs (run 42796212385
attempt 1 on #3544, run 42475916339 attempt 1), green on a rerun.

Both logs show the same three errors: the bridge's first start fails
with `EADDRINUSE` on the fixture's port (`Failed to start server. Is
port 37195 in use?`), then `The new bridge failed its startup health
check.`, then `Managed update timeout: null` after the helper's 12 s. So
the timeout is a symptom: the test polled a launcher that had already
exited.

The fixture asked the system for a port (`port: 0`), gave it back, and
the bridge bound it 0.3 to 0.9 s later, three process starts on
(launcher, supervisor, bridge). On Linux the next `port: 0` listener in
the network namespace can be handed that port in the gap. The
integration files run side by side, and five of the seven running beside
it at that moment start `port: 0` servers in their tests.

It is not the test's time budget (it needs 1.5 to 4 s of its 30) and not
the product's hand-over: the failing bind is the first bridge start,
before any update. A real install's port is 7317, outside the range.

## What

`managedFixture` takes its port from `bridgePort()`: a random port in
10000 to 19999, bound once on 127.0.0.1 to make sure it is free, then
given back. That is under the ports every system hands out on its own
(Linux from 32768, macOS and Windows from 49152) and under the block
`scripts/check.test.ts` uses, which follows the same rule (#1939,
#1940). All six managed tests share the fixture. Test-only: no wait,
timeout, retry or assertion changed.

## Proof

In the CI runner image (herdr 0.9.3, Bun 1.4.2), a container of its own,
on `main` 03481c8:

| Run | Result |
|---|---|
| `main` + a stand-in that listens on port 0 until the kernel hands it
the fixture's port (a scratch patch, not in this PR) | fails 3 of 3 with
the CI errors, at 12207, 12315 and 12341 ms (CI: 12345 and 12157 ms) |
| this change + the same stand-in | passes 3 of 3: the stand-in uses up
the kernel's 7,058 first-choice ports without being handed the fixture's
|
| `main` beside 3000 new port-0 listeners a second, each open 2 s | 4
and 5 of the six managed tests fail per run, same errors |
| this change beside the same churn, the file ×3 | 56 pass, 0 fail each
|
| this change: the test ×20, the file ×5 | 20 pass; 56 pass, 0 fail each
|

Measured there: a port-0 listener gets an odd port from 32769 up first
(both CI ports are of that kind); with all 28,232 ports of the range
handed out, none was outside it and 32767 still bound.

## Validation

- `bun run check fast`: pass on this head (14798 unit tests pass, 0
fail).
- `bun run check run -- env HERDR_TEST_MODE=integration bun test
--timeout 15000 ./server/updater.test.ts` in the runner image: the rows
above.
- Skipped: the rest of the integration suite, browser lanes, macOS (one
test file's fixture changed).

## Not in this PR

The same take-a-port-and-give-it-back pattern, found by reading, none
seen failing in the 74 failed Integration jobs of the last 1000 runs:

- `scripts/update-browser-qa.ts:46` (the identical two lines; a fix
there must avoid 10080, which Chromium refuses),
`scripts/plugin.test.ts`, `scripts/plugin-phone.test.ts`,
`scripts/windows-plugin.test.ts`, `scripts/check.test.ts:199`,
`server/pc-install.test.ts:94`, `server/ssh.test.ts:236`,
`server/push.test.ts:1208`, `server/bridge.test.ts:327`.
- Not test code, reported only: `scripts/check.ts`'s default lock ports
(41737 and after) lie inside the kernel's range, so a port-0 listener
can sit on one and `bun run check run` then refuses as busy;
`server/machines.ts`'s `freePort()` for `ssh.forward` has the same shape
(impact not assessed).
- The managed tests still wait their full 12 s when the launcher has
already exited.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.2 <[email protected]>
devswha added a commit that referenced this pull request Nov 10, 2026
…step (#3584)

## What

Pressing **Sign in and add this PC** on a PC's own page (Settings →
Devices and PCs → Account, the first-run welcome) adds that PC to the
account in the same step when the relay is already on: the PC lists
itself and waits for one of the account's devices to add it, with no
separate "Add this PC to my account" press (owner decision D5a of the
plan, 2026-11-10).

The PC is added only by a press of a button that said it would add it:

- The link page's one button reads "Sign in and add this PC" only where
the sign-in does add the PC (a PC in no account, relay on, a browser
that drives it); else "Sign in". Its words are read again every 3 s
while the page shows. What the button said at the press decides: a press
of "Sign in" adds nothing, also when the relay was turned on since.
- A provider's own button ("Continue with GitHub", on a service without
the link page) and the desktop app's sign-in say nothing of adding, so
they add nothing. They, a sign-in that was already there, and a sign-in
again for the same account keep the "Add this PC to my account" button.
- Only the sign-in that just finished on that screen adds the PC, once,
within a minute of it, and only under its own account.
- The sign-in never turns the relay on. With the relay off it lists
nothing and offers one button, "Turn on the relay and add this PC".
- A device that only watches the PC lists nothing and is shown no
button.
- A listing no press began is dropped after a minute without an answer,
or when its screen is closed: nothing more is written, the PC is not
told the account, and the pairing window it opened is closed. An entry
already sent to the directory cannot be taken back; the screen then says
the PC may not have been listed.
- **Stop waiting closes the PC's pairing window at once** (`POST
/api/relay/link/close`; a 404 from an older Ovis is ignored). The PC has
one pairing window, so Stop waiting also **ends a code-less phone
pairing in progress** from "Copy a link without a code" (Add a
connection): a phone comparing digits through it is turned down, and
that link has to be asked for again. The close of a given-up listing's
window does the same. This differs from main, where Stop waiting let the
window run out.

## How

Ported by hand onto main after #3544 (the two commits of the earlier
branch conflicted in ten hunks). Everything #3544 added is kept: the
wait bound to its PC and account, two mounted copies sharing one wait,
`listThisPc` through `service.forSignIn` with `for`, `AddPcWaitOver`,
`onAddPcWaiting`, `enrolling`, the 30-minute cap, the hidden-page pause,
Stop waiting / Keep waiting. A sign-in-begun wait runs through the same
`add()` and the same wait effect as a pressed one.

- `AccountSection` hands `AddThisPc` the account of a sign-in that just
finished, once (`signedInHere`, stamped with its time, cleared by a
sign-out, a sign-in again, a sign-in that ended).
- `AddThisPc` gains two states: `adding` (the listing no press began)
and `relay-off` (the one button, which keeps the account it was offered
to).
- `listThisPc` gains `as: { account, running }`: it throws
`AddPcWaitOver("sign-in")` before any write when the account stored at
its session read is another one or none, and `AddPcWaitOver("ended")`
before a write once the attempt was given up.
- Every window request carries `x-ovis-local-only: 1`, as before.
- `closeRelayLink()` in `src/lib/api.ts`.
- No server change.

After the review of 6dc2046 (a593fb6, details in the comment below):

- `signIn(provider, addsPc)` records what the pressed button said;
`signedInHere` hands `AddThisPc` `{ account, adds }`, and only `adds:
true` lists without another press.
- `AddThisPc` reads the role once before it offers or adds
(`/api/health`), drops an unpressed attempt on unmount, closes the
window a dropped attempt opened, and closes it again when a reopen or
relisting lands after Stop waiting.
- `listThisPc`'s `as` gains `reached` (`opened`, `writing`), checks
`running()` once the window opened, and does not post `relay-account`
for an attempt or wait that ended.

## Review of the port (first round)

An independent review of the port said fix-then-ship. Each finding and
what was done:

1. **Medium: the automatic listing was not bound to the account that
just signed in** (another tab signing out and in as B between the check
and the listing's own session read listed the PC under B; the relay
button had no check at all). Real. Fixed: `add(account)` passes the
account into `listThisPc` (`as`), which refuses before any write; the
screen then shows the plain offer. The `relay-off` state keeps the
account; the button checks the stored sign-in before starting the relay
and the listing checks it again. Tests: stored sign-in swapped while
`/api/relay/link` is held (zero puts, no mark, the offer); swapped
before the relay button's press (relay not started); swapped while the
relay start is held.
2. **Medium: `adding` had no bound and no way out.** Real. Fixed: the
listing no press began, and the relay button's start, are given up after
`ADDING_MS` (60 s, `2 * REOPEN_MS`): the plain offer with "This PC could
not be listed in your account. Try again.", or the relay button with its
error. An attempt counter drops a late answer: it writes nothing to the
directory (`running`), keeps no mark and sets no state. Tests: account
service held past the bound then released; PC that stops answering the
link; relay start held past the bound then released.
3. **Low: the open-gate pairing branch cannot be reached on a real
server** (`server/dispatch.ts` refuses `/api/account/*` to access via
`open`, so `AddThisPc` stays hidden), and its tests asserted a state the
server never produces. Real. Took the first option: the changelog and
docs sentence is gone, the guard stays as a defence only and its comment
says so, the test PC now refuses `/api/account/status` to a `via:
"open"` browser as the server does (the guard tests reach it by the
browser coming to be in that way after the screen read the account), and
a 403 refusal is no longer asked about again for a minute after a
sign-in. Such a browser sees what it sees on main: no card. Test: one
status request, no timer left.
4. **Low: "Sign in and add this PC" was shown where the sign-in will not
add the PC** (relay off, a watching device). Real. Fixed: the button
promises it only when the PC is in no account, `GET /api/relay` says the
relay is not off and the health answer does not say `role: "watch"`;
when any of the three cannot be read it says "Sign in". The review said
the health answer carries the relay phase; it does not, so the relay's
own status is read. Tests: relay off (button "Sign in", then the relay
button after the sign-in, which starts the relay and lists); watch role.
Not done: the optional separate wording for a 403 `read_only` /
`local_required` listing.
5. **Low: `signedInHere` outlived a sign-in that ended**
(`SignedOutError` in `load()`). Real. Fixed both ways the review
offered: cleared in the `SignedOutError` branch, and stamped with its
time so it answers null after `SIGNED_IN_RETRY_MS`. Test: sign-in, PC's
status never answers, the service ends the sign-in, the same account is
stored again and the section rereads: the offer, nothing listed.
6. **Info: #3544's guarantees found intact.** Still so: `addThisPc.ts`
differs from main only by the `as` option; the wait effect is untouched.

All ten new tests fail with the two source files reverted to the first
commit.

## Validation

Ran for a593fb6:

- `bun run check fast` through the host queue, with origin/main 9243bc3
merged in: every line ok (workflow syntax, generated types, generated
themes, typecheck, build, unit tests: 14835 pass, 0 fail, 51 skip in 886
files).
- `bun run check run --build bun scripts/ui-regression.ts`: passed, same
base (TMPDIR under /var/tmp).
- `bun run check run bun scripts/settings-rows-demo-regression.ts`:
passed, same base.
- Main moved by six commits meanwhile (to c94f525, none touching this
PR's files). After merging them: typecheck clean and 13 test files
(AccountSection, RelaySignIn, SetupGuide, SettingsDialog, i18n,
lib/account, the conventions and changelog tests), 327 pass, 0 fail.
`check fast` and the browser scripts were not rerun on c94f525.
- Every test added for the review fails with the two source files as
they were at 6dc2046.

Not run:

- No real account service and no real second device: the account service
is `FakeAccountService` or a stub, the PC is a fake fetch. The add from
another device, and the approval on the PC, were not exercised end to
end.
- The desktop app's sign-in has no test of its own; it goes through the
same `signIn`, which adds nothing unless the button said so.
- No run in the CI runner image; the browser scripts ran on the host
through `bun run check run`.
- `scripts/settings-pages-demo-regression.ts` (known to fail on this
host in its Settings search matrix on main too),
`relay-shell-browser-qa.ts`, `relay-dashboard-browser-qa.ts`,
`relay-join-browser-qa.ts`.
- No Mac app, iOS, Android or Windows check.

Needs a real review: it lists a PC in an account and opens its pairing
window on sign-in (owner decision D5a, 2026-11-10)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5.2 <[email protected]>
devswha added a commit that referenced this pull request Nov 10, 2026
…d without the owner meaning it (#3609)

## What

Eleven follow-up findings, in two groups: five across the onboarding
surfaces (items 1 to 5), and six about how a terminal reads a person's
answer to a request (items 6 to 11, following #3581).

### Items 1 to 5

Five follow-up findings from the reviews of pull requests that are now
in main. Each is a way a device could be approved, or a PC or device
added under an account, without the owner meaning it.

1. **Follows #3542 (`install.sh --add`).** Lines typed while the
installer worked, or pasted after the install command, were still in the
terminal's input when the add step began to read from it. A `y` and
Enter typed ahead could approve the next device that asked.
2. **Follows #3570 (the PC's approval prompt).** Shift+Tab from another
dialog's first stop landed on the prompt's last button, so two
Shift+Tabs and an Enter typed for the dialog pressed Approve. The guards
(keys for 1 s, clicks for 500 ms after the prompt arrives, moves or is
handed the focus) were measured against the time the handler ran, so on
a busy page a key or click made before the guard ran out, and heard
late, could approve.
3. **Follows #3555 (the hosted app's shell).** The confirm records the
sign-in it was drawn for, but only in the page's memory. When the hosted
app reloaded itself for a newer build between the confirm and the
enrollment, the reloaded page enrolled the PC as whoever was signed in
by then: another tab signing in as someone else in between added the PC
under that account.
4. **Follows #3584 (Add this PC).** A relisting that was given up for
getting no answer still had its request for the window on its way; when
it reached the PC after Stop waiting, nothing closed the window again.
And Stop waiting's close (`POST /api/relay/link/close`), arriving late,
could shut the window of a new wait begun meanwhile.
5. **Follows #3544 (Add this PC, resumed).** A resumed wait opened a
ten-minute approve-here window before it compared which PC had answered,
and believed "added" of whichever PC answered. A page that now answers
for a different PC got a window opened on it, and a PC already in the
account was said to be the one that was added.

### Items 6 to 11: the answer typed in a terminal (follows #3581)

`ovis add` / `login` / `link` and `pair --approve` ask in the PC's
terminal about a device that wants in, and an approval lets it into the
PC. #3581 (in main, 64344a5) made an approval need the request's
digits and dropped lines typed ahead. Its last two reviews left these
six:

6. **Three digits that two requests share.** The last three digits
approve, and two requests end in the same three once in a thousand
pairs: a line typed for one approved the other.
7. **A line typed while an answer was lost.** When the POST that carries
an answer got no reply, the request was asked about again, and a line
typed meanwhile answered it.
8. **A typo declined for good.** Any line that was not the digits
declined, so a `y` out of habit or a mistyped digit ended the request.
9. **Full-width digits.** Digits typed with an input method in its wide
mode (222) did not match.
10. **A line begun before a run's first prompt.** The terminal hands a
line over only at Enter, so what was typed and not sent before the first
question came as part of the line sent at it.
11. **`pair --approve` took buffered answers.** It read one line per
request with no dwell and no drop, so a second line sent behind an
answer answered the next request, and piped input approved.

## How

1. `install.sh`: `discard_typed` empties the terminal's input right
before the add step, after the terminal and foreground checks and under
the INT trap: with perl's `tcflush`, as the star question does, else
with `stty -icanon min 0 time 0` and `dd`. Where neither can, the add
step does not run and the closing lines name the command. **What the add
step does itself:** what is typed after the add step has started is that
step's own to tell from an answer: #3581 (in main, 64344a5) takes a
line as an answer only when it was typed after its request was shown,
and items 6 to 11 below go further in `scripts/plugin-link.ts` (the add
step now also empties the terminal's input itself as each question first
shows). The installer's discard stays: it runs before the sign-in, where
the add step reads nothing yet. **Only on a release with that reader:**
the installer is served from main but installs the latest release, and
up to v0.5.2 that release's `link` asks `[y/N]` and takes the next line.
So `add_pc` runs the add step only when the release that runs has
`export function answerOf` in `scripts/plugin-link.ts`; otherwise it
says to update and prints the command.
2. `useFocusTrap.ts`: `overlayEntry` makes a prompt's button reachable
by Tab only from inside that prompt; from outside, in either direction,
the prompt itself is entered first. `RelayPairingPrompt.tsx`: the key
guard starts again whenever the focus comes into a prompt from outside
it, and both guards count to the event's own `timeStamp` (and to the
keydown or pointerdown a click comes of, when earlier), capped at five
seconds.
3. `shellState.ts`, `shell.tsx`, `accountController.ts`: the sign-in's
id and the PC's id (no token) cross the shell-update reload in the tab's
session storage. The next load reads them and leaves them there until
the app opens, another confirm is acted on, or the PC is forgotten, so a
second reload on the way finds them too (the same now holds for main's
"a key of its own" marker). The reloaded page goes on under that sign-in
only when it is still the one stored; with another, or none, the PC
opens with the key this page holds and the enrollment does not run.
4. `addThisPc.ts`, `AccountSection.tsx`: every close from the page goes
through `closeAddWindow`, and a window is asked for only once every
close sent before was answered (a minute at most). The late close is
tied to the listing itself as well as to the attempt's end, once per
attempt. A listing whose wait was stopped ends at once
(`AddPcWaitOver("ended")`): before the window is asked for, and right
after it opened.
5. `addThisPc.ts` (`pcAnswers`), `AccountSection.tsx`: the wait reads
`web_ui.server_id` from `GET /api/health`, which opens nothing, before
every reopen, before a relisting asks for the window (`listThisPc` for a
wait) and before it believes the PC has joined. Where the health does
not tell the id, the hosted app's page names the PC; with neither, no
window is opened and nothing is said. The check of the link's own id
stays, for an address that changes between the two requests; the window
that reopen opened on the other PC is then closed again.

Items 6 to 11 are in `scripts/plugin-link.ts` (one implementation,
`asking`, used by `ovis add` and by `pair --approve` through
`approveWaiting`), `scripts/plugin.ts`, their tests, `docs/relay.md` and
`docs/guide.md`:

6. A request asks for all six digits, and says why, when its last three
are also those of a request asked about earlier in the run or waiting
now; only all six approve it then. A request already asked about with
three is asked about again with all six as soon as such a request waits
beside it (`beside`, at every look), and `ovis add` reads the waiting
requests once more before it sends an approval typed as three digits.
`pair --approve` does the same before a three-digit approval
(`ApproveOptions.list`).
7. `lost()` arms the one-shot drop when an answer's POST fails with no
reply: the next line handed over answers nothing, whichever request is
asked about by then.
8. `answerOf` returns no answer for a line that is neither the digits
nor empty. One line says what approves and what declines, and the
question is asked again. Enter by itself still declines. Three or six
digits that are not the request's get a line of their own: they are not
this request's digits, the request may be another device's, and Enter by
itself declines it.
9. The line is NFKC-normalised before it is matched.
10. `discardTyped` empties the terminal's input queue with the system's
`tcflush` (through `bun:ffi`: libc on Linux, libSystem on macOS) as a
request's question first shows. Where that cannot be done (Windows, no C
library found) the first line after each question answers nothing and
the question is asked again.
11. `pair --approve` asks through the same loop: the 1.5 s dwell, one
line per request, the drops above, and input that is not a terminal
answers nothing: the command says so and exits 1 without sending a
decline, so the requests keep waiting (`ovis add --approve` still
declines what shows in the window its own run opened). An answer the
server does not take is asked for again instead of ending the command.

### Trade-offs, where the guard wins

- **Item 10's limit.** The terminal is read a line at a time, so when a
line was begun is never seen. Keys pressed in the moment after a
question showed, before it was read, are part of the line sent at it;
such a line approves only if it is that request's own digits (after the
dwell) and declines only if it is empty.
- **Item 10 costs an answer typed too early.** Digits typed before a
question showed stay on the screen in front of it but were discarded, so
Enter pressed at it is an empty line and declines; the device has to ask
again. Not changed (a decline is the safe side, and making the first
Enter answer nothing would take two Enters for every decline);
`docs/relay.md` and the changelog fragment say so.
- **Item 6:** between two looks (two seconds at most) a request that
shares the three digits can come to wait unseen; the extra read before a
three-digit approval is sent closes that, at the price of one more local
request per such approval. A request that starts waiting after that read
and before the POST is not seen.
- **Item 10 on Windows** takes two lines for every answer, a decline
included.

- **Item 5 needs herdr to answer.** `GET /api/health` without a scope
answers only after herdr's ping. While Ovis is up and herdr is stopped,
a wait's window is not reopened or relisted, and **"This PC is in your
account" is withheld too**: the screen keeps saying "Waiting" until
herdr answers, or the wait expires. The press itself needs no health. A
follow-up outside this surface could name `web_ui.server_id` in the
`?scope=bridge` answer.
- **Item 2's age cap cuts both ways, and the refusal is silent.** In a
browser whose `event.timeStamp` runs behind `performance.now()` (clock
drift after the PC slept), every key or click counts as five seconds
old, so Approve does nothing for about 5.5 s (pointer) or 6 s (key)
after a prompt arrives, with no sign why. And a key made inside the
guard but heard more than five seconds later on a frozen page counts as
five seconds old and can approve.
- **Item 1:** a perl whose `tcflush` fails does not fall back to `stty`
and `dd`; the add step is skipped and the command printed.

## Review

### Items 1 to 5

An independent reviewer read the branch (verdict: fix, then ship). Its
findings and what became of each:

- **Medium, item 4: a close that main guaranteed was gone.** The branch
closed late only when the listing promise settled, and `listThisPc` did
not ask `wait.running()` after the window opened, so with the account
directory's read hanging the window reopened after Stop waiting was
never closed; a relisting still reading health at Stop went on to open a
window. **Fixed** (62ee8aa): `listThisPc` throws
`AddPcWaitOver("ended")` for a stopped wait right after `pcAnswers` and
right after the window opens, and the attempt-end close is back beside
the listing's own, once per attempt. Tests: `addThisPc.test.ts` "a
listing for a wait that was stopped opens no window, and reads nothing
once a window on its way has opened" and
`AccountSection.addThisPc.test.tsx` "Stop waiting while a listing asks
for the window closes the window it opens late, also when the account's
directory never answers"; both failed before the fix. The component test
passes with either of the two changes alone, so it does not hold the
attempt-end close by itself; the lib test holds the other.
- **Low, item 5: "added" is withheld while herdr is down.** Real; not
changed, the guard wins. Said above.
- **Low, item 2: the age cap.** Real; not changed. Said above.
- **Low: focus-trap browser regressions and where they ran.** See
Validation.
- **Info, not fixed here by agreement** (outside the five): a late close
from Add this PC can shut a window opened by Settings' pairing link
(`RelayPanel.tsx` calls `requestRelayLink` outside the new ordering),
and a close from another tab is not ordered; `starts` is per copy, so
one copy's late close can shut the window of a listing another copy
began (as on main); item 3 binds only signed-in confirms, so a pairing
made with no consent still acts as whoever is signed in after the
reload; Codex's second #3555 finding (enrollment can end the terminal's
session after the app opened) is untouched; a failed `stty` restore
would leave the terminal in non-canonical mode.

### Items 6 to 11

An independent reviewer read the six terminal commits at f78ccbe
(verdict: fix, then ship). Its findings and what became of each:

- **Medium, item 6: half closed in `ovis add`.** Whether a request needs
all six was decided once, when it was first asked about; a request with
the same last three that came to wait afterwards left the "Type 456"
prompt standing, and `456` read off the other device approved the
request on the screen. **Fixed** (710920b): `beside` compares the
waiting requests at every look and once more before a three-digit
approval is sent, and asks again for all six with a line saying why.
Tests in `scripts/plugin-link.test.ts`, "a request whose last three
digits another request shares": "asks again for all six once another
request with the same last three starts waiting beside it" and "looks
once more before it sends an approval typed as three digits"; both
failed before the fix. A third holds that all six, or a decline, already
typed still stand.
- **Low, item 10: digits typed ahead, then Enter, decline.** Real; not
changed, the guard wins. Now said in `docs/relay.md`, the fragment and
above.
- **Low, item 10: `discardTyped` had no test, and its macOS branch had
never run.** **Fixed** (7473352, df602ec): `scripts/plugin.test.ts`
"discards what was typed at a real terminal before the question showed"
runs `pair --approve` on a real pty (`script`), types the request's
digits before the question and Enter after the dwell, and expects a
decline. With the wrong queue selector in `discardTyped` it fails with
"Approved." on Linux and on macOS (both tried). It is skipped on Windows
and where `script` is not installed.

### After the reviews at df602ec

Both reviewers were clear at df602ec (Opus with four lows, Codex with
two mediums). `origin/main` with #3586 (`ovis add` ends in one QR code)
was merged in, keeping its QR path and this PR's answer rules for
`--approve`; the QR path's keep question now discards the terminal's
input as it first shows and reads the word NFKC-normalised. Then, each
with a test that fails without it: the wording for digits of another
value (Opus low 1), the second read in `pair --approve` (low 2), no
decline from a non-terminal `pair --approve` (low 4), the installer's
add step only on a release with the new reader (low 3 and CodeRabbit's
thread at install.sh:558, answered and resolved), and Codex's two
mediums, both reproduced: the consent kept over a second reload, and the
window opened on another PC closed. Details in the PR comment of the
same name.

## Validation

On this head (65ca063), which has `origin/main` at 35b00a8 merged
in, unless a line names an earlier head.

- `bun run check fast` through the queue: every line ok (workflow
syntax, generated types, generated themes, typecheck, build, unit tests:
15533 pass, 0 fail, 51 skip in 894 files).
- The tests added after the reviews at df602ec were watched failing
without their fixes (the shell and Add this PC ones by running them on
the unfixed code; the others assert behaviour or words the unfixed code
does not have). The macOS hand run of the pty test below was at
df602ec and not repeated.
- Items 6 to 11: each has tests with an injected clock and a fake
keyboard. The tests added for the review's findings were watched failing
before their fixes at this head; those of the six original commits were
written before their fixes by the session that made them and were not
watched failing again here. One real terminal was used, a pty made by
`script` for the test above: on this Linux PC inside `bun run check
fast`, and on macOS 27.0.1 (the test MacBook Air, a fresh clone of main
in `/tmp` with this PR's diff applied, deleted afterwards), where it
passed three times and failed with the wrong queue selector. GitHub's
macOS job does not run `scripts/plugin.test.ts`, so macOS has that one
hand run and nothing automated. Whether the CI runner image has `script`
was not checked: without it the pty test is skipped there.
- Items 6 to 11, not run: no real `ovis add` against a real server,
account service or second device; no person at a keyboard; Windows (the
path where the input cannot be discarded) only through the fake
keyboard; musl only by the library name in the code.
- Items 1 to 5: each new or changed test was watched failing without its
fix. The independent reviewer also overlaid the tests of the first five
commits on a throwaway copy of `origin/main` and saw them fail there.
- Browser scripts (items 1 to 5), run at the earlier head ff6bddf and
not again since: three merges of `main` came in after that run, and
65ca063 changes `AccountSection.tsx` (one branch of the reopen) and
`shell.tsx`. Each with `bun run check run` on the isolated test session,
**on this PC's host, not in the CI runner image**:
`scripts/relay-pairing-prompt-regression.ts` (item 2, with `--build`),
`scripts/ui-regression.ts` (items 4 and 5, with `--build`), and for the
shared focus trap `scripts/settings-pages-demo-regression.ts` and
`scripts/drawer-modal-regression.ts`. All passed. The other scripts that
go through `useFocusTrap` (Files, the file viewer, ConfirmDialog rounds
and the rest of the browser set) were not run by hand; they run in the
runner image in this PR's "Integration and browser" job.
- `scripts/relay-pairing-prompt-regression.ts` presses at the 1000 ms
and 500 ms boundaries with 250 ms of slack, so only the unit tests
(injected clocks) hold the exact boundaries.

Items 1 to 5, not run: no real terminal and no real install
(`install.sh` ran only in its tests, under a throwaway HOME, with
stand-ins for perl, stty and dd); no real account service, relay or
second device; no real browser clock drift for item 2's cap.
`install.sh` on macOS and Windows is left to GitHub's macOS and Windows
jobs.

Needs a real review: approval and consent paths (pairing prompt,
enrollment, add-this-PC, the installer's add step, the terminal's answer
loop of `ovis add` and `pair --approve`)

The merge pass agreed on these eleven (the five, then the six from
#3581's last reviews), and only these, as the one follow-up PR before
the release; everything else from those reviews waits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5.2 <[email protected]>
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