Skip to content

fix(account): offer Invite a PC on every device that may write the account's list - #4711

Closed
devswha wants to merge 1 commit into
mainfrom
fix/invite-screen-reachable
Closed

devswha wants to merge 1 commit into
mainfrom
fix/invite-screen-reachable

Conversation

@devswha

@devswha devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes staging QA failure 3 of the signed member list (B6/B7): no shipped app could open Invite
a PC
, so nobody could make an invite, and ovis join --invite-file (the way an agent adds a PC)
had no line to use.

This widens where an invite can be made (any device that may already write the list); it changes
nothing about what an invite can do or who may write the list.

Verified on main, from the code

InvitePc was drawn only by AccountRelayPanel, and only when inMacApp() (an OvisMac/ user
agent) and pageAccountList() was not null (src/components/ConnectStart.tsx:636). The page
list is set only by the hosted shell's account controller (src/lib/relay/accountController.ts:167),
which mounts only on a page marked <meta name="ovis-shell" content="relay"> (src/main.tsx),
and only with an account service (shellAccountServiceOf: the phone apps' native sign-in, or the
app.ovis.sh origin).

Surface Hosted shell (AccountRelayPanel) Page list OvisMac/ Invite before
iOS / Android apps yes yes (native sign-in) no no
Hosted app in a browser (app.ovis.sh) yes yes no no
Native Mac app (app/mac) no: a WKWebView on the PC's own 127.0.0.1 page (App.tsx), no OvisAuth bridge no yes no
Electron app (Mac, Windows, Linux) no: the PC's own 127.0.0.1 page no no no

The only combination that drew it was a browser with the Mac marker faked, which is how QA ran
B6/B7.

The change (the lead's ruling)

  • AccountRelayPanel draws InvitePc wherever the page holds the account's list: the phone apps
    and the hosted app in a browser, in the same place (Add PC → Ovis relay). InvitePc keeps its
    own rule: it draws nothing for a device that may not write the list (list.writer() === null).
    Let the PC join by itself and its warning line are unchanged.

  • A PC's own page (the Mac app, the Electron app, a browser on the PC's address) cannot sign
    invites, and this PR does not make the PC a signer. When it is signed in to the account whose
    signed list the PC follows (list of GET /api/account/status), its Add a connection → Ovis
    relay
    now shows one sentence (ko/ja/zh added):

    To give an agent an invite that adds a PC, make one in the Ovis phone app or at app.ovis.sh:
    Add PC → Ovis relay → Invite a PC.

    An account without a list has no invites, so the sentence does not appear there.

  • docs/account-list.md "Invites" says where the section is and what a PC's page shows instead.
    docs/account.md has no "in the Mac app" line about invites, so it is unchanged.

Design reference (src/AGENTS.md): Tailscale's admin console, where any signed-in browser makes an
auth key for a new machine, not only one client app. The section itself is unchanged; only where
it is offered moved.

What a person sees

Before:

  • In the Ovis phone app, or at app.ovis.sh in a browser, signed in to an account that keeps a list,
    Add PC → Ovis relay showed the sign-in line and the QR/code, and no invites. The Mac and desktop
    apps had no such tab at all.
  • Nothing anywhere told a person where to make an invite.

After:

  • On a phone, or at app.ovis.sh, as a device in the account's list, the same tab shows Invite a
    PC
    : Make an invite, the switch, and the line with Copy and the one-line command for an
    agent. A device that may not write the list still sees none of it.
  • In the Mac or desktop app, on a PC that follows its account's list, Add a connection → Ovis relay
    has one line saying where to make an invite.

Tests

Written first; both failed before the fix.

  • src/components/InvitePc.test.tsx: the relay tab offers invites on a device that may write the
    list for each of the following user agents, and never on a device that waits to be let in or on a
    page with no list:

    • desktop Safari and Chrome
    • an iPhone WebView
    • an Android WebView
    • the Mac app's agent

    This replaces the test that pinned Mac-only.

  • src/components/ConnectPhoneDialog.test.tsx: a PC's page signed in to the account whose list
    the PC follows says where to make an invite, and draws no invite section. The sentence is absent
    on an account with no list, on a PC in no account, and on a PC in another account.

  • src/components/RelayShell.test.tsx: one fixture's stub page list now answers writer() (null),
    since the signed-in relay tab asks every page list that.

Validation

  • bun run check fast was not run locally: the PC's heavy queue did not open for over an hour (load above 150); ran the typecheck, the convention tests and the touched test files; CI's Fast checks run the unit suite.
  • Ran: bun run typecheck (exit 0); bun test --timeout 60000 over
    src/components/InvitePc.test.tsx, src/components/ConnectPhoneDialog.test.tsx,
    src/components/RelayShell.test.tsx, src/components/ConnectStart.test.ts,
    src/lib/api.test.ts, src/lib/i18n.test.ts, scripts/changelog-fold.test.ts and the three
    conventions.test.ts files: 445 pass, 0 fail.
  • Skipped locally: integration and browser runs (CI runs them). No screenshots: no new layout. The
    invite section is the existing one, and the own window's line is one settings-hint paragraph.

🤖 Generated with Claude Code

…count's list

The invite section of Add PC > Ovis relay was drawn only where the page was the Mac app's
(`OvisMac/` in the user agent) and held the account's list. No shipped app has both: the Mac app
and the Electron app show the PC's own page, which never mounts the hosted shell or holds a page
list, and the phone apps and the hosted app hold a list but are not the Mac app. So no invite
could be made for `ovis join`.

- AccountRelayPanel now draws InvitePc wherever the page holds the account's list. InvitePc keeps
  its own rule and draws nothing for a device that may not write the list. The switch and its
  warning line are unchanged.
- A PC's own page (Mac and desktop apps, a browser on the PC's address), signed in to the account
  whose signed list the PC follows, says in Add a connection > Ovis relay where an invite is made.
  The PC itself signs no invites.
- docs/account-list.md "Invites" says where the section is; a changelog fragment.

This widens where an invite can be made (any device that may already write the list); it changes
nothing about what an invite can do or who may write the list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 25, 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 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 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 b0f20e7 and d26352f.

Files selected for processing: 11

  • changelog.d/invite-screen-reachable.md
  • docs/account-list.md
  • src/components/ConnectPhoneDialog.test.tsx
  • src/components/ConnectPhoneDialog.tsx
  • src/components/ConnectStart.tsx
  • src/components/InvitePc.test.tsx
  • src/components/RelayShell.test.tsx
  • src/lib/api.ts
  • src/lib/i18n/devices.ja.ts
  • src/lib/i18n/devices.ko.ts
  • src/lib/i18n/devices.zh.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 25, 2026

Copy link
Copy Markdown
Owner Author

Review standing in for CodeRabbit (its review was rate limited on this PR)

No CodeRabbit review ran here. I read the diff (ConnectStart.tsx, ConnectPhoneDialog.tsx, api.ts, the tests, docs/account-list.md).

  • The invite section is now drawn wherever the page holds the account's list (the phone apps and the hosted app in a browser), not only under the native Mac app's user agent, which no page holding a list ever carried. InvitePc itself is untouched: it still draws nothing for a device that may not write the list, and the switch "Let the PC join by itself" keeps its warning line.
  • A PC's own page signs no invite. Where it is signed in to the account whose list the PC is pinned to (GET /api/account/status), it says in one line where an invite is made.
  • This widens where an invite can be MADE, to devices that may already write the list. What an invite can do, how long it lasts, and who may write the list are unchanged.

No finding. The staging QA re-runs the invite checks from a real device after the merge.

@devswha

devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Closed in favour of #4723, which merges this branch together with the other fixes the signed-list staging QA asked for. Nothing of this pull request was dropped: #4723 is main with these branches merged in. The reason is CI capacity: twelve separate runs and twelve merges, each waiting for Fast checks on a new base, had filled the self-hosted runners for every session.

The description, the tests and the review of this change stay here; #4723's table links back to it.

@devswha devswha closed this Nov 25, 2026
@devswha
devswha deleted the fix/invite-screen-reachable branch November 25, 2026 13:00
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