Skip to content

feat(setup): show Connect your phone on a first run on the PC, and drop the desktop app's false alerts notice - #2801

Merged
devswha merged 3 commits into
mainfrom
feat/desktop-first-run
Nov 4, 2026
Merged

devswha merged 3 commits into
mainfrom
feat/desktop-first-run

Conversation

@devswha

@devswha devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner

What

The desktop app's first launch already goes connection screen -> Ovis -> the setup guide (agents found on this PC, Start with one). Adding the phone, though, sat behind a closed Connect your phone button under Start, so a new user had to know to look for it.

On a first run on the PC itself (the desktop app, or a browser on the PC's loopback), the guide now shows the Connect your phone box open from the start. It leads with the Ovis relay, and the relay is still off until Turn on the Ovis relay is tapped (the tap is the consent). Then the same pairing QR code Settings shows (RelayPairing, already on main) appears there.

  • phoneBoxOpensFirst(state, onThisPc): open from the start on a first run on the PC only. A guide reopened from Settings and a page another device opened (a phone) keep the closed button.
  • phoneBoxStays(opening, way): a box that came open by itself leads with the relay only. Where the relay cannot lead (phoneWay says other), it closes again instead of sending the page to Settings -> Phone without a tap. A tapped box behaves as before, and so does "Use Tailscale or Wi-Fi instead".
  • No new strings, no new route, no server change. The connection screen (app/electron/renderer/*) already hands over (Opening Ovis..., then the server's page), so it is unchanged.

Design reference: Paseo keeps its relay off until Enable relay (Settings -> host -> Pair a device, https://paseo.sh/docs/connectivity), and so do we. Unlike Paseo, which leaves pairing in Settings, our first run on the PC shows it, because a phone is the next device to add. The DESIGN.md setup guide entry says so.

Screenshots (isolated hc session, fresh state folder, demo HOME)

Connection screen, unchanged, handing over:

connect

Before After
Desktop 1280 before 1280 after 1280
Desktop 1280, scrolled (box closed) after 1280 box
Phone 390 (page on the tailnet address, not the PC) before 390 after 390

On the phone nothing changes: the page is not on the PC, so the box stays closed.

Validation

  • bun test src/lib/setupGuideFlow.test.ts: 38 pass (2 new cases).
  • bun test src/lib/pushHealth.test.ts src/lib/push.test.ts src/lib/push-removal.test.ts src/components/PushHealthNotice.test.tsx: 59 pass; the new desktop-app case failed first on main's code.
  • bun run check fast: passed (workflow syntax, generated types/themes, typecheck, build, unit tests).
  • Manual: the real Electron app (app/electron, bun scripts/build.ts stage, then electron . under Xvfb with a fresh --user-data-dir, HC_SESSION and XDG folders). After I'm new to Ovis, the box is open with Turn on the Ovis relay, and no alerts notice shows (it did before). The PR screenshots come from the same build served by an isolated server (fresh OVIS_STATE_DIR, own HC_SESSION, temporary HOME), at 1280 on loopback and 390 on the tailnet address.
  • Not run: turning the relay on against the live relay service (the QR part is the unchanged RelayPairing); macOS.

Fix: a false alerts error on the desktop app's first launch

On its first launch the desktop app showed a red "This device's push subscription is missing. Turn alerts on again." notice, the first thing a new user saw. Alerts are on by default, and Electron grants the server's page the notification permission (allowPermissions in app/electron/src/main.ts). Its PushManager has no push service behind it, though, so subscribe always fails, and the health check read that as a lost subscription.

pushSupported() (src/lib/push.ts) is now false in the desktop app (Electron/ in the user agent). The app then behaves as a browser without push: no notice, and the open window's own notifications carry the alerts. The window stays loaded in the tray when closed, so those still arrive. The new pushHealth.test.ts case failed before the change ("missing") and passes after it.

Desktop app, first launch Before After
Welcome before after
Setup, scrolled to the phone box (box closed) after

Known wording gap (LOW, not changed): in the desktop app, Settings -> Alerts' push hint still says push alerts need HTTPS or the iPhone home-screen app.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between b2d9e5d and a2f5a6b.

Files selected for processing: 7
  • DESIGN.md
  • changelog.d/setup-guide-phone-first-run.md
  • src/components/SetupGuide.tsx
  • src/lib/push.ts
  • src/lib/pushHealth.test.ts
  • src/lib/setupGuideFlow.test.ts
  • src/lib/setupGuideFlow.ts
  • 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

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Review round (omo: CLEAR at 7cc58f4; Codex Terra 6.1 xhigh: no HIGH). Fixed in the one fix round:

  • MEDIUM (Codex): a first-run box withdrew if the relay turned blocked after Turn on the Ovis relay (for example identity_unreadable), hiding the error. Now once the relay has led in the box, it is the user's: a relay blocked since shows the other ways there and never closes it (phoneBoxStays(..., led), new test case).
  • LOW (Codex): Look again remounted the agents screen and reopened a box the user had closed. The guide now remembers the close. Checked in the browser against the isolated server: open first, closed by a tap, still closed after Look again.

Validation: bun run check fast passed (11251 unit tests), and bun test src/lib/setupGuideFlow.test.ts passes (39).

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Final self-check (one gate reviewer, read-only): APPROVE, no blockers. It re-ran the related tests (92 pass), confirmed that the new pushHealth test fails on main's push.ts, and traced alerts in the desktop app: with push unsupported, pushOn stays false and the window's own notifications deliver alerts (useAlertSignals.ts), as before, minus the false notice. It found no regressions for the phone app (its plugin is checked first, and it opens the PC's real address), the relay shell, or tailnet browsers.

omo re-review at a2f5a6b: CLEAR.

LOW notes, left as they are:

  • pushHealth.test.ts removes its navigator.userAgent override with delete instead of restoring a saved descriptor. Harmless today because each test file runs in its own process.
  • In the desktop app, the Alerts hints (alertsBell.ts, PushTestControls.tsx) still say closed-app alerts need HTTPS. The real reason is that the desktop app has no push service.
  • Where the relay is blocked on loopback, a box that opened by itself shows a spinner briefly, then closes.

Theme: the change adds no CSS and reuses the guide's existing parts, so the dark captures cover it. Ovis uses its own theme setting, not the system's light/dark preference.

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Screenshots reviewed (1280 desktop app, setup guide with the phone box open): approved for merge (owner delegated picture OKs to the lead on 2026-11-05).

@devswha
devswha merged commit ab1937d into main Nov 4, 2026
15 checks passed
@devswha
devswha deleted the feat/desktop-first-run branch November 4, 2026 23:57
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