You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(account): It's me from an older device ends a new device's hold at once, behind OVIS_ACCOUNT_OPENS_ALL (OD3, T53) - #4337
It's me ends a new device's 10-second hold at once, behind OVIS_ACCOUNT_OPENS_ALL
Owner decision OD3 (a new device signed in through the account waits 10 s; "It's me" pressed on an older device lets it in at once). Step-2 item postponed until after the owner's trial; built now behind the flag.
Device table rows: P15, P17, T53, T57, OD3.
What changes
Server (server/core/socket.ts): the notice-answerits_me route no longer answers not_supported. It calls notices.itsMe(deviceId, id, provedKey) only with the session's proved key, never a bare device id, and replies nothing; the PC's published confirm notice is the answer. The checks are the ones already merged in feat(account): the PC trusts the account's device list behind OVIS_ACCOUNT_OPENS_ALL (S2-24..S2-29) #4324 (devices.itsMe -> provedSayer -> promotedHolds.mayConfirm / joinedRows.itsMe -> mayEndHold: older, live, not held, admitted here over an hour ago, not stale, not failing closed).
App: the "It's me" button on an open admission notice comes back (the code removed in 6e47144 while early approval was postponed), merged onto main's S2-32 Not me code. It goes only to the admission's own PC (notice ids are PC-local), with one resend after 5 s; it counts only a published confirm matching row, key, number and account (confirmsAdmission). The new device's wait card again says other devices can let it in.
Relay-hub LOW (taken): a PC answers a refused It's me with nothing, so after the resend the card says "{pc} did not accept It's me from this device." on its own row; pressing again clears it.
Flag off
A PC without the flag has no notices: an its_me answer is ignored without a reply, as on main (socket.test "flag off").
Tests (each red at its own commit, before the code)
ad36e28 test: socket answers It's me only with the proved key (socket.test T53); relay contract: an older member's It's me over its relay session ends the hold at once (session drive, notice decided, confirm published) (its-me-route.contract.test); app tests restored (AccountDeviceNotices, App.deviceNotices, JoinWait, joinHold).
relay-hub (t13t): matches the table (rev 8), at b58c0aa and c309cb6.
security-triage (t13r): YES on access at b58c0aa and c309cb6. Ledger S2P-1 (a legacy local drive row may say It's me for an account row; ruled matching the table, no change).
dori review + omo gate reviewer: run by relay-hub on this head.
Captures (new sentence only: the refusal line; the button and wait hint are the S2-33 set the owner saw)
(shared privately with the maintainer) (its-me-, its-me-refused-). Lead OK on the refusal sentence pending.
Validation
bun run check fast on c309cb6 via dori heavy (hosthatch): workflow syntax, generated types/themes, typecheck, build, unit 20814 pass / 0 fail. Skipped: full / browser suites (CI).
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.
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
Open sign-in notices now offer an “It’s me” option when the current account and connection support it. A signed-in PC can confirm the request and allow the device to proceed.
If the PC doesn’t respond, the request is retried once. If it refuses, a message explains that the device can try again.
Notices explain that other devices are contacted first and may allow the sign-in.
The change adds an “It’s me” action for eligible open admissions. The response is sent through the admission PC’s relay socket, and a matching confirmation ends the admission and stops retries. If confirmation does not arrive after one retry, the UI displays a refusal.
Changes: Device admission response
Layer / File(s)
Summary
Relay and server admission handling src/lib/relay/joinHold.ts, src/lib/relay/joinHold.test.ts, server/core/socket.ts, server/core/socket.test.ts, server/account/its-me-route.contract.test.ts
Relay helpers construct “It’s me” answers and track PCs awaiting answers. The socket forwards an answer only when notices are enabled and the client has a device ID and proved key. The route contract test checks the confirmation, drive session, and closed notice.
A later its_me confirmation matches an open admission by its row, key, number, and account. answerOnPc resolves when a matching notice or replay arrives; ordinary notice-answer result handling remains in place.
Eligible open admissions show “It’s me” alongside “Not me.” The action retries once, displays refusal if confirmation does not arrive, and can be pressed again. The button, layout, translations, and tests cover the action and its states.
devswha/ovis#4324: Adds the account device-list trust path and defines the earlier not_supported response that this change replaces.
Merge Risk: Minimal · previous review c309c
This change lets an older device end a new device's 10-second hold with "It's me" when OVIS_ACCOUNT_OPENS_ALL is on. The inspected server path publishes the confirmation that the app waits for, so no likely user-facing failure remains. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main behavior change: an older device's "It's me" ends a new device's hold immediately, behind the OVIS_ACCOUNT_OPENS_ALL flag. The changeset matches this. The title is long (118 c…
Description check
The description follows the template's Change and Validation sections. The Change section explains the behavior and lists the affected server, app, and relay files. The Validation section lists the co…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main behavior change: an older device's "It's me" ends a new device's hold immediately, behind the OVIS_ACCOUNT_OPENS_ALL flag. The changeset matches this. The title is long (118 characters) and uses an internal tag (OD3, T53), but it is specific and accurate.
Full details: Description check
Explanation
The description follows the template's Change and Validation sections. The Change section explains the behavior and lists the affected server, app, and relay files. The Validation section lists the commands run (bun run check fast on c309cb6, with unit results) and states that full and browser suites were skipped. The template asks for a linked issue for features. The description cites an owner decision (OD3) and a PR-local reference but gives no linked issue, and it has no explicit HTTP/WS contract-test coverage note beyond a mention of its-me-route.contract.test. Those gaps are minor. The description also contains a capture link on a private IP address and several internal ledger and review references that a reviewer outside the team cannot check.
Resolution
Optionally link the issue or owner decision where maintainers agreed to the feature. Optionally state the contract-test result for the WS route explicitly in Validation, and replace the private-network capture link with an accessible artifact.
Finishing Touches
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.
Reviewing files that changed from the base of the PR and between 40b79ff and c309cb6.
Files selected for processing: 16
server/account/its-me-route.contract.test.ts
server/core/socket.test.ts
server/core/socket.ts
src/App.deviceNotices.test.tsx
src/components/AccountDeviceNotices.test.tsx
src/components/AccountDeviceNotices.tsx
src/components/JoinWait.css
src/components/JoinWait.test.tsx
src/components/JoinWait.tsx
src/lib/account/noticeAnswer.ts
src/lib/deviceNotices.ts
src/lib/i18n/devices.ja.ts
src/lib/i18n/devices.ko.ts
src/lib/i18n/devices.zh.ts
src/lib/relay/joinHold.test.ts
src/lib/relay/joinHold.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
Gate findings at c309cb6: BLOCK (dori BLOCK + omo gate reviewer BLOCK; t13r YES on access)
One fix round, one commit, reds first:
HIGH (gate: OD3, P17, T53): "It's me" ends the hold on the PC, but the waiting device does not come in early. src/lib/relay/shell.tsx:308-316 schedules the next AUTH for the full remaining hold, and the refusal already closed the channel, so the early end never reaches it. The wire test (shellAccountOpen.test.tsx:280-302) pins the late entry. Fix: the waiting device retries before the deadline (for example a short bounded retry while held, or one the PC wakes), and a test shows it enters early when the PC confirms.
MEDIUM (dori): server/core/socket.ts:205: notices.itsMe is not wrapped. A journal or save failure throws, and an async ws handler throw kills the server on Bun 1.4.4. Wrap it like Not me (console.error + notice_decision_failed), with a test that the connection survives.
MEDIUM (gate): add tests that a confirm from the right PC for the wrong admission leaves it open, that a first-attempt match prevents the resend, and that neither attempt posts to a records route.
LOW (dori): before showing "did not accept", check that the admission is still open in that PC's notices.
LOW (dori): one in-flight lock per notice across It's me and Not me.
LOW (gate): joinHold.test.ts:40-44 tests multi-PC bookkeeping for a one-PC notice; prefer the single-PC behaviour test.
Verified by the gate reviewer: 177 tests passed, typecheck clean, no proved-key bypass, flag off unchanged.
HIGH (gate): a held device re-asks from 1 s, doubling, never past the PC's deadline (src/lib/relay/shell.tsx), so a hold It's me ended on the PC is not waited out. Wire red: a 10 s hold, the second AUTH goes at 1000 ms and the device follows the PC's new answer at once.
MEDIUM (dori): notices.itsMe is wrapped like Not me: a journal or save failure logs and answers notice_decision_failed; the connection survives (socket.test).
MEDIUM (gate): tests that a confirm for another admission on the same PC leaves it waiting and resends once, that a first-try confirm sends no second time, and that no attempt goes to a records route.
LOW (dori): one answer out per notice across It's me and Not me (AdmissionActions).
LOW (dori): a decided admission is never shown as refused (pinned).
LOW (gate): It's me keeps one PC's bookkeeping; withItsMeSent / withItsMeAnswered / ItsMeWaiting and their multi-PC test are gone (export table above: those rows no longer apply).
Validation: bun run check fast on 77eab68 via dori heavy (old-desktop): unit 20804 pass / 0 fail, typecheck, build, generated files, actionlint.
Gate findings at 77eab68: BLOCK (omo gate reviewer; dori CLEAR with 3 LOW; t13r YES on access)
The HIGH is fixed in production code. With a 10-second hold, the app mounted at 1000 ms when the PC answered AUTH_OK. While the PC kept the hold, AUTH ran at 0, 1, 3, 7 and 10 s: bounded, with no hold extension or bypass. What is left is mostly tests that would still pass with the bug. One commit, tests first:
MEDIUM: src/lib/relay/shellAccountOpen.test.tsx:280-297 returns an admission refusal and asserts pairing, so it passes without the app ever opening. Answer AUTH_OK on the retry, await the app mount before the deadline, and assert no pairing navigation.
MEDIUM: AccountDeviceNotices.test.tsx:306-323 still passed when a broken control removed the card. Assert the original card stays open. Move the records-route spy into the two-PC case, so there is another PC it could wrongly post to.
MEDIUM: server/core/socket.test.ts:36-46 asserts only notice_decision_failed, so a handler that sends the error and then closes would pass. Assert no close and await a pong on the same connection.
LOW: AccountDeviceNotices.tsx:210-215,283-293. Switching Desk, Lab, then Desk while It's me is pending re-enables both buttons, and a second press re-sends. Use one app-level lock per PC and notice, and test switching away and back.
LOW: AccountDeviceNotices.test.tsx:375-381 passes even if the admission stays open. Await both timeout stages and use an open card as the control.
dori's LOWs (the resend loop at :55-66, the exports table in the body, tests :218-381): answer them in the body or fold them in.
…er PC and notice across switching; the card stays for another admission's confirm; a failed It's me keeps the relay connection answering (OD3, T53, P15)
MEDIUM: the early-entry wire test now answers AUTH_OK on the retry and asserts the app mounts before the deadline with no pairing navigation (apps: 1 at 1000 ms of a 10 s hold). It fails with the old full-hold wait.
MEDIUM: in the two-PC case, the records-route spy is there (nothing goes to Lab or a records route); the wrong-admission confirm leaves the original card open, and its own confirm closes it.
MEDIUM: a relay-level contract test: an It's me the PC cannot record (itsMe throws) answers notice_decision_failed, the same connection then answers a ping, and the notice stays open. It fails against the unwrapped call (socket closed 1006).
LOW: one answer out per PC and notice app-wide (a lock held by the hook, not the card): switching Desk -> Lab -> Desk while It's me is out keeps both buttons held and a second press sends nothing.
LOW: the closed-admission test waits through both 5 s stages and checks the card is gone.
dori's LOWs: the resend loop is one PC's (2 tries, the PC's own socket); the export table: withItsMeSent, withItsMeAnswered, ItsMeWaiting are gone.
Validation: bun run check fast on c484ef3 via dori heavy (hosthatch): unit 20817 pass / 0 fail, typecheck, build, generated files, actionlint.
Merged through pr-merge at head c484ef3c9. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.
Reviews at c484ef3: dori CLEAR (receipt devswha__ovis_4337@c484ef3c9); omo gate reviewer (gpt-6.2-astra) three rounds, final round no HIGH (early entry verified at 1000 ms with a real AUTH_OK); security-triage (t13r) YES on access. Round cap reached; leftovers (2 MEDIUM + 2 LOW, tests and refusal feedback after switching PCs) ledgered as S2P-2..5 for a follow-up PR. Behind OVIS_ACCOUNT_OPENS_ALL. Relay-hub, on the lead's round-cap rule.
… cover the #4337 leftovers (S2P-2..5) (#4356)
## It's me follow-up: the #4337 round-3 leftovers (S2P-2..5)
Behind `OVIS_ACCOUNT_OPENS_ALL`. The final review round of #4337 (merged
as 222ca1a) had no HIGH; its leftovers were ledgered as S2P-2..5 for
one follow-up PR. No new on-screen sentence (existing copy only).
Device table rows: **OD3, T53, P15, P17**; ledger S2P-2, S2P-3, S2P-4,
S2P-5.
### What changes
- **S2P-4:** the "{PC} did not take It's me" refusal was kept in the
card's own state, so it was lost when switching Desk -> Lab -> Desk. It
is now kept at the hook level, keyed by PC and notice (beside the
app-wide answer lock), so it is still shown on Desk after coming back,
never shown on Lab (even when Lab has a notice with the same id), and
cleared by the next It's me press.
- `BlockNoticeAction` no longer keeps its own `sending` state next to
the shared lock; both answers read the one app-wide lock.
- `shell.tsx` uses the shared `holdWaitMs` for the early retry's wait
(same timing: only `join_hold` carries a deadline).
- `joinHold.ts` header describes what the code does now: It's me goes
only to the PC that issued the admission notice.
### Tests (red first)
- 64d6f12 (S2P-4 fails there: after Desk -> Lab -> Desk the refusal
line is gone, "Expected length: 1, Received length: 0"):
- **S2P-2:** the early-entry wire test runs BOTH AUTHs through the
account-open peer (the retry gets AUTH_OK from the peer), and waits for
the app-open event instead of counting microtask turns.
- **S2P-3:** after another admission's confirm on the same PC, the
original It's me action is still enabled.
- **S2P-4:** a refused It's me is still said on Desk after Desk -> Lab
-> Desk, and not on Lab.
- **S2P-5:** the switch test also holds Not me while It's me is out:
disabled after switching back, and a press sends nothing.
S2P-2, -3 and -5 were coverage gaps: they pass on main's code and now
guard it.
- 386b562: the fix.
### Review LOWs from #4337 (dori at c484ef3)
- shell.tsx early-retry wait: now the shared `holdWaitMs`.
- T34 test delays: the deadline tests already wait on a retry or
navigation event; their fake-clock advances stay, since the deadline is
what they test. The early-entry and no-deadline tests now wait on the
app-open event.
- ItsMeAction: no local refusal state left.
- joinHold.ts header: updated.
- Exports: nothing unused in the touched code.
### New exports
None.
### Reviews
dori review + omo gate reviewer via relay-hub (t13t); security-triage
(t13r): app-only change.
### Validation
`bun run check fast` on 386b562 via dori heavy (hosthatch): unit 20867
pass / 0 fail, typecheck, build, generated files, actionlint. `bun test
./src/components/AccountDeviceNotices.test.tsx
./src/App.deviceNotices.test.tsx ./src/lib/relay
./server/core/socket.test.ts
./server/account/its-me-route.contract.test.ts ./src/lib/i18n.test.ts
./src/conventions.test.ts`: 662 pass.
…tine ui-access-regression until #4357 (#4371)
## Summary
`scripts/ui-access-regression.ts` failed once and passed on its retry on
main 222ca1a (run 44793002896), which turned main red:
```
at openPhoneSettings (scripts/relay-panel-regression.ts:137:36)
TimeoutError: waitFor: Timeout 15000ms exceeded.
- waiting for locator('.conn-live')
```
Tracked in #4357. The lead's rule: fix at the cause, or quarantine the
repo way if it is not fixable within 2 hours. It was not reproduced in
about 76 runs, so this PR does the second and makes the next failure
name its cause.
## Change
- `openPhoneSettings` (scripts/relay-panel-regression.ts): on a timeout
it now reports the page's URL, its connection chip (`.conn` class and
text), the number of terminals, open dialogs, and every WebSocket the
page created, closed or errored, with times from the navigation. A
forced failure prints, for example, `page
{"url":".../?ws=...&pane=w1%3Ap1&view=terminal","conn":["conn conn-live
conn-quiet: live"],"terminals":1,"dialogs":[]}; sockets ["663ms created
/ws"]`.
- `scripts/ci-browser-quarantine.ts`: `scripts/ui-access-regression.ts`
until 2026-12-20, issue #4357.
## What is known about the cause
`.conn-live` is `connected` in `src/App.tsx`, which comes from the
selected pane's terminal socket being open (`useTerminalMount` ->
`HerdrSocket.connected`). The page reopened at
relay-panel-regression.ts:524 either never opened that socket or never
selected a pane within 15 s. #4337 (the commit main went red on) does
not touch either path.
## Validation
- Not reproduced: 32 runs locally under load, 20 in the CI runner image
on hosthatch (4 at a time), and 4 rounds of the full CI `ui-regression`
job (6 suites, `BROWSER_RETRY=0`) in the image. One of those rounds
failed in another script, `ui-contexts-regression.ts`; noted separately.
- Forced timeout prints the diagnostics above; the unforced script
passes; typecheck ok.
- `bun run check fast`: all steps ok.
- `scripts/ci-browser-parallel.test.ts` (quarantine checks): 30 pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's me ends a new device's 10-second hold at once, behind OVIS_ACCOUNT_OPENS_ALL
Owner decision OD3 (a new device signed in through the account waits 10 s; "It's me" pressed on an older device lets it in at once). Step-2 item postponed until after the owner's trial; built now behind the flag.
Device table rows: P15, P17, T53, T57, OD3.
What changes
server/core/socket.ts): thenotice-answerits_meroute no longer answersnot_supported. It callsnotices.itsMe(deviceId, id, provedKey)only with the session's proved key, never a bare device id, and replies nothing; the PC's publishedconfirmnotice is the answer. The checks are the ones already merged in feat(account): the PC trusts the account's device list behind OVIS_ACCOUNT_OPENS_ALL (S2-24..S2-29) #4324 (devices.itsMe->provedSayer->promotedHolds.mayConfirm/joinedRows.itsMe->mayEndHold: older, live, not held, admitted here over an hour ago, not stale, not failing closed).confirmmatching row, key, number and account (confirmsAdmission). The new device's wait card again says other devices can let it in.Flag off
A PC without the flag has no notices: an
its_meanswer is ignored without a reply, as on main (socket.test "flag off").Tests (each red at its own commit, before the code)
New exports and their production callers (tests excluded)
answerOnPc(its_me request form)confirmsAdmissionitsMeAnswer,withItsMeSent,withItsMeAnswered,ItsMeWaitingItsMeButtonReviews
Captures (new sentence only: the refusal line; the button and wait hint are the S2-33 set the owner saw)
(shared privately with the maintainer) (its-me-, its-me-refused-). Lead OK on the refusal sentence pending.
Validation
bun run check faston c309cb6 via dori heavy (hosthatch): workflow syntax, generated types/themes, typecheck, build, unit 20814 pass / 0 fail. Skipped: full / browser suites (CI).