Repository navigation
feat(setup): lead the guide's Connect your phone with the Ovis relay QR - #2692
Conversation
Where the relay is offered, this browser may control it and nothing blocks it, the first-run guide's Connect your phone box now offers to turn the relay on and shows its pairing QR code right there. A browser in only because nothing is paired yet pairs itself first, since starting the relay closes the open device gate. "Use Tailscale or Wi-Fi instead" keeps the previous behaviour, which is also all the box shows where the relay cannot lead.
|
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 22 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. |
…er ways reachable Review follow-up: a relay QR answers another relay QR's code by saying its own expired instead of minting a new offer (the guide's and Settings' QRs could replace each other's without end); the guide's box offers Use Tailscale or Wi-Fi instead while it waits for the relay's first answer; and that link is off while the relay starts, whose gate closing would spend the other way's code.
|
Review round (Codex adversarial at the pre-push merge efb8e0a7, same change as 0738a85; all findings source-traced, none run in a browser). No HIGH. Fixed in 7506c94:
LOW, left as is: after a phone pairs through the guide's relay QR, the QR stays up until it expires or New code (Settings' relay QR behaves the same). Validation at 7506c94: |
…re shows Adds a test that mounts two relay QR panels and expects two offers and one expired code (it times out on the earlier announcement handling), and shows a failed retry's own error even while the relay still reports the earlier start failure.
…two relay QRs on one code Review follow-up: the guide's relay QR watches the device list as its address QR does and gives way to Paired and New code once a phone used its single-use code; and a relay QR that hears another relay QR's code keeps showing it when it is the same code, or asks for the offer again without announcing it (the server's offer reuses its pending code), instead of calling it expired.
|
omo review at 7506c94 (BLOCK) reproduced two more; fixed in 0ffe92f, with 65c8b95 adding the two-panel test:
Left as is (LOW, unreproduced): a relay error that never clears has no reset button in the guide; Use Tailscale or Wi-Fi instead stays available, and Settings → Connect a phone has the reset. The box polls relay status while open, as Settings does. Validation at 0ffe92f: |
|
Merge note: owner approved the first-run relay QR screens from screenshots on 2026-11-04. CodeRabbit was rate-limited for this head; merged on the omo review (CLEAR at the head), the Codex Terra review (findings fixed with tests) and green required checks. |
Summary
The setup guide's Connect your phone box now leads with the Ovis relay QR code. Before this change it showed the page's own address QR, or, on the PC's loopback page (the usual case), sent the user to Settings → Phone & devices.
RelayPairing).server/relay/service.ts). A browser that got in only because the gate was open (via: "open", a LAN or tailnet address) pairs itself first with the existingpairThisBrowser(), as the address-QR path already does. If that pairing fails, the relay is not turned on. The PC's own loopback (via: "local") is never gated (server/access.ts).src/lib/setupGuideFlow.ts(phoneWay,relayStep), with tests. The security summary comes from App's existing access state.Screenshots
Before/after at 1280 and 390 px, light and dark, were taken on an isolated test session with
/api/relay*stubbed in the browser, and reviewed by the maintainer before this PR.Validation
bun run check fast(withTMPDIRon disk) at 0738a85: all steps ok, unit 10896 pass / 0 fail / 42 skip.bun run typecheckinserver/herdr-core/adapter.ts, and this PR does not touch that file.bun test src/lib/setupGuideFlow.test.ts src/lib/i18n.test.ts src/lib/useSetupGuide.hook.test.ts src/lib/pairing.test.ts src/conventions.test.ts scripts/conventions.test.ts scripts/changelog-fold.test.ts: 113 pass.via: "open"self-pair-then-relay flow end to end in a browser. That flow was checked against the server code only.