Skip to content

fix(mobile): the page offers no control whose only effect is a re-dial it cannot make - #22326

Merged
Jinwoo-H merged 11 commits into
mainfrom
ota-fu-page-inert-controls
Sep 22, 2026
Merged

Jinwoo-H merged 11 commits into
mainfrom
ota-fu-page-inert-controls

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 26 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​986 $\color{#cf222e}{\Huge{\mathbf{−}}}$​26 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​960
Prod 24 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​152 $\color{#cf222e}{\Huge{\mathbf{−}}}$​97 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​55

The page still offered controls whose only effect is a re-dial the page cannot make (follow-up from #22283). Inert today: the page shell only mounts in an EXPO_PUBLIC_MOBILE_SHELL=ota build; native renders every control as before.

Fixed at the seam, not with .web siblings. RpcClientContextValue.forceReconnect is now ForceReconnect = ((hostId) => Promise<void>) | null, and the page's provider (client-context.web.tsx) returns null instead of a resolved promise. The compiler then listed every caller in the page closure, and each one was decided:

caller on the page
host header Reconnect hidden
session header "tap to retry" not offered; the verdict label stays, without the promise of a tap
Retry in agent history, explorer root, file preview, git history, source-control status, diff review hidden when only a re-dial would help (new transport/connection-retry-action.ts); a plain reload stays
explorer per-folder Retry kept: its queued read runs when the shell's own client reconnects
auth-failed banner already hidden by #22283
release, forgetHostClient, updateLastConnected left; removal already refuses on the page first
updateHostNameAndEndpoint (edit.tsx) left; not a page route, handed to the native app

The rpc-recording adapters still pass a function, so no golden moves.

The capability probe stays on the page, and the fence comment now says why. runtime-capability-probe.ts sends status.get, which carries no client identity and writes nothing; the bridge forwards it and the desktop's mobile allowlist admits it. Its other importer is reached only from accounts.tsx, which the page never serves.

Tests: one behavioural case per hidden control against the page context (red on main's product files, green here) and the native counterpart for each. Reviewer-found gap closed: the premise behind hiding a Retry is that the screen reloads on its own when the shell's client reconnects, and only the explorer pinned that, so each of the other five sites (agent history, file preview, diff review, git history, source-control loaders) now has a reload-on-reconnect case that goes red when the client/connState dependency it guards is removed. Session-route closure pin SESSION_ROUTE_MODULES 4,212→4,213, the one joiner being connection-retry-action.ts; session host-JSX parity hash re-measured; C1/C2/C3/C5 page-closure pins unchanged.

Left as follow-ups: /pair-scan from the page hands a rooted link to the shell and may open natively after all, unverified on a device; a pre-existing React Doctor prefer-useReducer note at MobileFileExplorerPanel.tsx:43.

…ng dials

Six failed-load screens share one Retry shape: re-dial a host that is not
connected, otherwise re-read. On the page the re-dial is inert
(`client-context.web.tsx:55`) and each screen's load already re-runs when the
shell's client reconnects, so in the disconnected state that Retry did
nothing at all. `connectionRetryAction` makes the decision once and answers
null when a re-dial is needed and none exists; agent history, the file
explorer root, the file preview, git history, the source-control status gate
and the diff review render no Retry for null.

The explorer's per-folder Retry keeps its control: it queues the folder, and
the queue drains on the next `connected` whoever brought it back.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
`forceReconnect` on the page was `() => Promise.resolve()`: the shell owns
the connection and nothing in the document can re-dial it. The host header's
Reconnect and the session header's "tap to retry" were wired to it and did
nothing there. The context member is now nullable and the page's provider
hands out null, so the compiler found every caller: both headers render no
reconnect affordance for null, and the session status keeps the verdict
label without promising a tap.

Native providers and the recording adapters still pass a function, so
nothing a phone renders changes. The session route's host-JSX parity hash
moves for the header's extra null check; the page test doubles that stubbed
the old inert re-dial now stub null.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Three comments and the banner's override reason still said the page's
`forceReconnect` was an inert `() => Promise.resolve()`, and cited
`client-context.web.tsx` lines the previous commit moved. They now say null
and point at the lines that hold it.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
`connection-retry-action.ts` is the one module the Retry fix adds to the
session route's page closure, reached through the explorer, source control
and git history it docks. Measured on this head with all five generators run
first, and diffed against the pre-change closure: one local module added,
none removed.

Session route closure 4207 -> 4208 modules, local 1021 -> 1022.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The push fence excluded `runtime-capability-probe.ts` because the session
route and the host screen run it. The session half holds, and the probe
works there: `status.get` carries no client identity and makes no write, the
shell forwards it like any non-`native.` request, and the desktop's mobile
allowlist admits it. The host-screen half no longer does:
`codex-reset-credit-capability.ts` is reached only from `accounts.tsx`, which
the bundle carries and the page hands to the native screen.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The formatter wrapped the cast onto the line after the disable comment,
which left it uncovered. The cast now sits on its own line directly below
the SAFETY note.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Conflicts:
- config/scripts/mobile-web-app-session-terminal-closure.test.mjs: main's two
  paragraphs (terminal submit seam, page Back claim) kept first in landing
  order; this branch's Retry-decision paragraph re-measured on top. Session
  route closure 4211 -> 4212 modules, local 1025 -> 1026: the one joiner is
  src/transport/connection-retry-action.ts, this branch's only new source
  file, found in the measured closure list.
- mobile/src/session/mobile-session-route-parity.test.ts: host-JSX hash moved
  by both sides (the dock fields' submit seam and the header's reconnect
  null check); set from the measured value on the merged head.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…doff reads

Main's page route handoff now subscribes to `usePathname` (#22300), and the
Retry suite this branch added mounts that handoff with an `expo-router` mock
that lacked it. Same one-line addition main made to the back-handoff suite.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 561a5ddb-e0e4-4755-8d56-81588e841dab

📥 Commits

Reviewing files that changed from the base of the PR and between b6c3148 and df98ca6.

📒 Files selected for processing (1)
  • mobile/src/source-control/use-mobile-source-control-loaders.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • mobile/src/source-control/use-mobile-source-control-loaders.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The transport contract now represents forceReconnect as nullable. A shared connectionRetryAction selects reconnect, reload, or no retry action. Session, file, source-control, host, and review screens use this action and hide controls when reconnection is unavailable. Web page providers return null for reconnect capability. Tests, mocks, comments, route baselines, and closure checks were updated.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to df98c

No actionable merge-blocking issue is identified in the supplied review context.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, rationale, linked issue, and tests. It omits the required visual proof for behavior changes and does not complete several template sections and checklists. Add before-and-after visual proof, or state N/A with a reason if no visual proof applies. Complete the applicable AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections.
Docstring Coverage ⚠️ Warning Docstring coverage is 13.04% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 46 functions across 49 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: the mobile page no longer offers controls that only attempt a re-dial it cannot perform.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: ec34e39d-b172-43de-9c3a-a7e7ca0e5e8a

📥 Commits

Reviewing files that changed from the base of the PR and between 18696bd and c4a901b.

📒 Files selected for processing (49)
  • config/scripts/mobile-web-app-push-subsystem-closure.test.mjs
  • config/scripts/mobile-web-app-session-terminal-closure.test.mjs
  • mobile/app/h/[hostId]/edit.tsx
  • mobile/src/agent-history/MobileAgentSessionHistoryPanel.tsx
  • mobile/src/agent-history/agent-history-back-handoff.test.tsx
  • mobile/src/agent-history/agent-history-retry.test.tsx
  • mobile/src/agent-history/use-mobile-agent-history-state.ts
  • mobile/src/browser/use-browser-binary-screencast-grant.web.test.tsx
  • mobile/src/components/AuthFailedBannerActions.tsx
  • mobile/src/components/AuthFailedBannerActions.web.tsx
  • mobile/src/components/MobileDiffReviewBody.tsx
  • mobile/src/components/MobileDiffReviewScreenView.tsx
  • mobile/src/components/auth-failed-banner-actions-page.test.tsx
  • mobile/src/components/use-html-preview-link-grant.web.test.tsx
  • mobile/src/files/MobileFileExplorerPanel.test.ts
  • mobile/src/files/MobileFileExplorerPanel.tsx
  • mobile/src/files/MobileFilePreviewBody.tsx
  • mobile/src/files/MobileFilePreviewScreen.tsx
  • mobile/src/files/mobile-file-preview-retry.test.tsx
  • mobile/src/home/MobileHomeScreen.tsx
  • mobile/src/host-screen/host-screen-header-reconnect.test.tsx
  • mobile/src/host-screen/host-screen-header.tsx
  • mobile/src/host-screen/host-workspace-list.tsx
  • mobile/src/mobile-web-shell/bridge/use-native-verbs.test.tsx
  • mobile/src/navigation/route-handoff.web.test.tsx
  • mobile/src/platform/clipboard.web.test.tsx
  • mobile/src/platform/dictation-capture-bridge-budget.test.tsx
  • mobile/src/platform/dictation-capture.web.test.tsx
  • mobile/src/platform/media-picker.web.test.tsx
  • mobile/src/session/MobileSessionHeader.tsx
  • mobile/src/session/mobile-dictation-mic-control.web.test.tsx
  • mobile/src/session/mobile-diff-review-retry.test.tsx
  • mobile/src/session/mobile-session-connection-retry.test.tsx
  • mobile/src/session/mobile-session-route-parity.test.ts
  • mobile/src/session/use-mobile-diff-review-controller.ts
  • mobile/src/session/use-mobile-diff-review-interactions.ts
  • mobile/src/session/use-mobile-session-presentation.ts
  • mobile/src/source-control/MobileGitHistoryList.test.tsx
  • mobile/src/source-control/MobileGitHistoryList.tsx
  • mobile/src/source-control/MobileSourceControlPanel.tsx
  • mobile/src/source-control/source-control-status-retry.test.tsx
  • mobile/src/transport/client-context.web.test.tsx
  • mobile/src/transport/client-context.web.tsx
  • mobile/src/transport/connection-retry-action.test.ts
  • mobile/src/transport/connection-retry-action.ts
  • mobile/src/transport/force-reconnect-page-seam.test.tsx
  • mobile/src/transport/host-client-hooks.ts
  • mobile/src/transport/rpc-client-context-contract.ts
  • mobile/web-entry/web-overrides.json

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Comment thread mobile/src/home/MobileHomeScreen.tsx Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — initial review of the full branch (49 files, 8 commits; base main @ 11db2b9a7d, head c4a901b2bb).

  • Nullable re-dial seam — RpcClientContextValue.forceReconnect becomes ForceReconnect = ((hostId: string) => Promise<void>) | null, and the page provider returns null instead of an inert promise, so the compiler forces every caller to decide.
  • connectionRetryAction — new mobile/src/transport/connection-retry-action.ts centralises the "reload / re-dial / offer nothing" decision for a failed screen's Retry.
  • Controls hidden on the page — host-header Reconnect, session-header tap-to-retry, and Retry in agent history, file-explorer root, file preview, diff review, git history and source-control status; native renders as before.
  • File-explorer per-folder Retry kept — it queues the read, which drains when the shell's client reconnects.
  • Tests & census pins — one behavioural case per hidden control, a real-hook page-seam pin, the helper's unit test, and refreshed SESSION_ROUTE_MODULES / HEAD_HOST_JSX_SHA256 pins.

I re-ran the affected suites (13 files / 49 tests), the two closure censuses, the forceReconnect consumer suites, the RPC-recording pilot goldens, the mobile tests-typecheck ratchet and the changed-code quality gate — all green.

ℹ️ Auto-reload-on-reconnect is pinned for only one of the six hidden Retries

The safety argument for hiding a Retry is that the screen's load re-runs on its own when the shell's client reconnects. The explorer's per-folder retry test pins that drain, but agent history, file preview, diff review, git history and source-control status are only tested for the Retry's absence — their auto-reload rests on the load effects' client/connState dependencies, which I confirmed in source but which no test pins. Not blocking and no change requested; noting it only because it is the load-bearing assumption behind the change.

Technical details
# Auto-reload coverage asymmetry

## Affected sites
- mobile/src/files/MobileFileExplorerPanel.test.ts — pins the folder-queue drain on reconnect (the one positive case).
- mobile/src/agent-history/use-mobile-agent-history-state.ts:152-155 — load effect re-runs via `loadSessions` deps `[..., client, connState, ...]`; no reconnect-reload test.
- mobile/src/files/MobileFilePreviewScreen.tsx:156-158 — effect re-runs via `loadPreview` deps `[client, connState, ...]`; no reconnect-reload test.
- mobile/src/session/use-mobile-diff-review-controller.ts:113-115 — effect re-runs via `loadReviewData` deps `[client, connState, worktreeId]`; no reconnect-reload test.
- mobile/src/source-control/MobileGitHistoryList.tsx:57-82 — effect deps include `client, connState`; no reconnect-reload test.
- mobile/src/source-control/use-mobile-source-control-state.ts — `loadStatus` re-runs on reconnect per the panel comment; no reconnect-reload test.

## Required outcome
- None; this is an informational observation, not a defect or a requested change.

## Open questions for the human
- Is the explorer drain test intended as the representative proof of the auto-reload premise, or would a reload-on-reconnect case per hidden Retry be worth the extra suites?

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H

Copy link
Copy Markdown
Contributor Author

Taking the observation: the premise behind hiding a Retry is that the load re-runs when the shell's client reconnects, and one pinned site out of six is thin for a load-bearing assumption. Adding one reload-on-reconnect case per hidden site (agent history, file preview, diff review, git history, source-control status), each shown to go red when the client/connState dependency it guards is removed. Lands on this PR with the merge of main it needs anyway.

Hiding a Retry on the page rests on the screen's load re-running when the
shell's client reconnects, because nothing on the page re-dials. Only the
explorer's folder drain pinned that. Each other site now has a case that
starts unreachable with no Retry and asserts the load goes out on the
client and state the reconnect delivers: agent history (status.get), file
preview (the preview read), diff review (the snapshot load), git history
(git.history) and source-control status (git.status, in the loaders suite
because the panel test mocks the state hook).

Each goes red when the `client`/`connState` dependencies it guards are
removed; for source control that is both `loadStatus` and the
`loadBranchCompare` it depends on.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Conflict: config/scripts/mobile-web-app-session-terminal-closure.test.mjs.
Main's #22299 paragraph (4211 -> 4212, `agent-session-journal-producer.ts`)
kept first in landing order; this branch's Retry-decision paragraph
re-measured on top of it. Session route closure 4212 -> 4213 modules, local
1026 -> 1027: the one joiner is `src/transport/connection-retry-action.ts`,
this branch's only new source file, read off the measured closure list.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — the delta since the prior pullfrog review (c4a901b2bb → b6c31480af, 2 commits): a test-only follow-up that closes the auto-reload-on-reconnect coverage gap flagged in that review.

  • Reload-on-reconnect cases for the five remaining hidden Retries — agent history, file preview, diff review, git history and source-control status each drive the screen from an unreachable host (client: null, reconnecting) to a live client and assert the load re-fires (a status.get / git.history / git.status request or a loadSnapshot call). I reverted client/connState out of loadSessions' dependency list and confirmed the agent-history case goes red, so the new cases pin the real dependency rather than an incidental re-render.
  • Session-header tap-to-retry case — new mobile-session-connection-retry.test.tsx runs useMobileSessionPresentation with forceReconnectHost null and non-null, pinning both the showConnectionRetry gate and the "Can't reach desktop" vs "— tap to retry" summary split.
  • Census and docs refresh — SESSION_ROUTE_MODULES 4212 → 4213 for the connection-retry-action.ts joiner, and the capability-probe comment explaining why status.get legitimately stays on the page.

I re-ran the nine affected mobile suites (38 tests), both mobile closure censuses, the session route-parity pins and the mobile tests-typecheck ratchet — all green.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H
Jinwoo-H merged commit 0e6862c into main Sep 22, 2026
31 checks passed
@Jinwoo-H
Jinwoo-H deleted the ota-fu-page-inert-controls branch September 22, 2026 23:41
brennanb2025 added a commit that referenced this pull request Sep 24, 2026
…e machine live

Pairing:
- An unreadable status.get reply no longer strands the pairing race: the
  descriptor read ran inside the race's success handler and threw, so the
  candidate was never counted and a direct-only pairing sat on
  "Connecting..." until the timeout. The race now reads the status through
  a reader that returns null instead of throwing.
- A pending pairing is now a small state machine: a save in flight owns the
  outcome (Cancel, back, or unmount no longer clear the journal under it),
  a failed save stays pending and the naming screen shows the error with
  Save still available, and Cancel never rejects.
- When the desktop refuses relay provisioning, the journal is cleared before
  the naming step instead of at save, so an app kill on that screen no longer
  blocks every later scan with "recovery pending".
- A pairing that resolves after the screen went away is cancelled rather
  than left with its journal.
- The screens keep their root ref callbacks stable (the latest pending
  pairing is read from a ref) instead of re-creating them per pairing.
- The label field's placeholder shows the name that an empty label saves.
- "Is this an existing host" is derived from the id identity resolution
  hands back, so host-store and its tests go back to main's shape.

Machine descriptor:
- Mobile keeps the host-reported machine name and OS in memory only, filled
  by the status reads that already happen, and labels it "Last known" from the
  row's own connection state. This drops the per-host AsyncStorage copy, its
  web sibling and web-overrides entry, and the removal cleanup. It also fixes
  a latch: freshness used to stay true for the whole process once a host
  had answered.
- Desktop reads the descriptor through lastVerifiedRuntimeStatus and marks
  it "Last known" using the same reachability verdict as the row's dot.
- Drops the unused hostname/previousPlatform resolver inputs and moves the
  "OS · machine" formatting into the shared resolver.

Also restores main's page-only Reconnect gate in the host header (#22326),
undoes the no-op toStoredHostProfile reformat, and re-measures the web
session route at 4222 modules (one fewer: the dropped web persistence file).
brennanb2025 added a commit that referenced this pull request Sep 25, 2026
* feat(mobile): confirm host identity after pairing

* refactor(mobile): unify host descriptor state

* chore(i18n): translate the last-known host descriptor label

The remote-host row's "Last known" label shipped in English only. Every other locale now carries it, worded as each catalog already words "last known".

* fix(mobile): make the pairing naming step safe to abandon and show the machine live

Pairing:
- An unreadable status.get reply no longer strands the pairing race: the
  descriptor read ran inside the race's success handler and threw, so the
  candidate was never counted and a direct-only pairing sat on
  "Connecting..." until the timeout. The race now reads the status through
  a reader that returns null instead of throwing.
- A pending pairing is now a small state machine: a save in flight owns the
  outcome (Cancel, back, or unmount no longer clear the journal under it),
  a failed save stays pending and the naming screen shows the error with
  Save still available, and Cancel never rejects.
- When the desktop refuses relay provisioning, the journal is cleared before
  the naming step instead of at save, so an app kill on that screen no longer
  blocks every later scan with "recovery pending".
- A pairing that resolves after the screen went away is cancelled rather
  than left with its journal.
- The screens keep their root ref callbacks stable (the latest pending
  pairing is read from a ref) instead of re-creating them per pairing.
- The label field's placeholder shows the name that an empty label saves.
- "Is this an existing host" is derived from the id identity resolution
  hands back, so host-store and its tests go back to main's shape.

Machine descriptor:
- Mobile keeps the host-reported machine name and OS in memory only, filled
  by the status reads that already happen, and labels it "Last known" from the
  row's own connection state. This drops the per-host AsyncStorage copy, its
  web sibling and web-overrides entry, and the removal cleanup. It also fixes
  a latch: freshness used to stay true for the whole process once a host
  had answered.
- Desktop reads the descriptor through lastVerifiedRuntimeStatus and marks
  it "Last known" using the same reachability verdict as the row's dot.
- Drops the unused hostname/previousPlatform resolver inputs and moves the
  "OS · machine" formatting into the shared resolver.

Also restores main's page-only Reconnect gate in the host header (#22326),
undoes the no-op toStoredHostProfile reformat, and re-measures the web
session route at 4222 modules (one fewer: the dropped web persistence file).

* test(mobile): re-record RPC goldens for the deferred pairing save

Repins baseline to the pairing fix commit and re-records every golden.
Against main, 781 goldens move only in the header (baseline everywhere,
adapterSha256 for the pairing adapter family). Six pairing goldens move in
the body, and only in effect order: the pairing now resolves (closing its
candidate sockets) before the naming step saves the host, and a refused
relay provision clears its journal before the save rather than after. The
set of effects and every outcome match main.

This also removes the unhandled-rejection effects and the failed
result-absent/result-null cells that the previous recording captured from
the pairing race's throwing status read.

* fix(mobile): keep the machine name out of the host header title while the label loads

The host screen starts with an empty saved label and loads it asynchronously. With a descriptor
already in memory, the resolver fell back to the machine name as the title for that window, so
opening "Windows-Low Spec" briefly titled the header with the Mac's name. Read the descriptor
only once the label is known.

* test(mobile): build the pending-pairing status through its schema so the test typechecks

The mobile tests typecheck ratchet rejected a partial status literal: the reply type keeps every
optional field as a required key. Parsing the literal through the status schema yields that shape
without a type assertion.

* test(mobile-web): re-pin the session route closure after merging main

#22301 added two src/shared modules this route reaches; its own CI never ran this suite, so the
merged branch read 4224 against the 4222 pin. Measured on the merge.

* feat(mobile): name each host by what its desktop reports

Pairing saves the host immediately again and names it after the machine name the
desktop publishes; every connection refreshes that name and OS, so a rename on the
desktop reaches the phone. A name typed on the phone's Edit screen is kept as a
phone-local override that wins; clearing it returns to the desktop's name.

- Stored host profiles gain optional personalName, lastKnownMachineName and
  lastKnownHostPlatform; `name` stays the resolved value older builds read.
  Legacy records classify a generated "Host N" as desktop-named and any other
  name as a phone override.
- The connection layer runs one retrying status probe per connected host and
  records the descriptor; the capability probe becomes a projection of it.
- Rows and the header always show the OS, add the machine name under a phone
  override that hides it, and mark it "Last known" while the host is offline.
- Removes the deferred-save naming screen and the one-shot home status fetch.
- Name rules move to host-name-identity.ts and the host-list mutation queue to
  host-list-mutation-queue.ts; an unchanged mutation no longer rewrites storage.

* test(mobile): restore the RPC recordings to main's

Pairing saves the host back to back again and the recording adapter is main's, so
every recording matches main byte for byte; the earlier deferred-save re-record and
its baseline repin no longer apply.

* fix(mobile): keep stored host name identity across snapshot saves and on the web page

A connection re-saves its host profile snapshot on relay credential rotation or relay
re-resolution. The re-pair merge let that snapshot's name identity win, so a phone rename
cleared or changed since connect came back, and a newer desktop machine name rolled back.
The stored record now keeps the name identity on every save; the save supplies the rest.

The web page receives only the app's resolved host name, with no identity fields, so the
docked host header treated a phone rename as "no override" and titled the host with the
live machine name. The display hook now reads such a source the way storage reads a legacy
record: a non-generated name is the user's label.

* fix(mobile): hand the web page the host's stored name identity

The page received only the app's resolved host name, so it had to guess whether that
name was the phone's override or the desktop's name. It guessed "override" for any
non-generated name, which froze a desktop-adopted name as the title after the desktop
was renamed, and left an offline page header without the last-known OS and machine name.

The shell now puts the stored personalName and last-known descriptor on the init host as
optional fields. The page reads them exactly as the app does; a page handed its host by an
older shell still falls back to classifying the name, and an older page ignores the fields.

* fix(mobile): drop an unreadable host name field, not the whole host

The stored host record and the page's init host checked the platform against a closed list
and required non-empty names. A value this build does not know, such as a platform added in a
later build, failed the whole record: the host list dropped the paired host and the next write
persisted the list without it, and the page refused its init message. Those three optional
fields are now salvaged, so an unreadable value drops only that field.

Also states the one exception to the stored name rule (an OS reported without a machine name
keeps the adopted name), and brings four mobile test files in line with the branch: the edit
screen now saves `personalName`, and host opens now start a descriptor status probe.

* refactor(mobile): name the shared host name fields for their role

* fix(mobile): drop the "Last known" prefix from the host machine line

The OS and machine name line under a host's name reads the same whether or not the
host is connected; the connection status already says when it is offline, and a
prefix that users could read as applying to the name added nothing. Removes the
resolver's liveness input and the desktop row's translation key.
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