Skip to content

fix(mobile): the page never removes a host, and stops bundling push - #22283

Merged
Jinwoo-H merged 3 commits into
mainfrom
ota-fu-page-host-removal
Sep 22, 2026
Merged

Jinwoo-H merged 3 commits into
mainfrom
ota-fu-page-host-removal

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​312 $\color{#cf222e}{\Huge{\mathbf{−}}}$​81 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​231
Prod 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​177 $\color{#cf222e}{\Huge{\mathbf{−}}}$​91 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​86

Two page defects from the emulator runs (follow-ups 9 and 10), cut at one boundary. Inert today: the page shell only mounts in an EXPO_PUBLIC_MOBILE_SHELL=ota build.

Removing a host from the page reported success for nothing. removeHostAndCloseClient ran unregisterPushForRemovedHost (a write of orca:remotePushHostRegistrations through the refusing page storage adapter, the second storage-write-dropped behind a control) and then removeHost, which on web resolves without doing anything, so the screen navigated away from a host that was still paired. Host removal is pairing work and the page holds neither the host list nor the credential (host-store.web.ts), so the page never removes a host:

  • transport/host-removal-lifecycle.web.ts refuses with PageHostRemovalUnavailableError (code page_host_removal_unavailable, "Remove this host from the host list in the Orca app."). No write, no navigation, no client forget. The screen's catch shows that message instead of re-opening the confirm with "try again".
  • The page shows no control that can only refuse. The auth-failed banner is reachable on the page (the shell forwards the native client state and auth-failed is in the wire enum), and all three of its actions are inert there: forceReconnect is a resolved promise on the page client context, /pair-scan is outside the page's route root app/h, and removal refuses. AuthFailedBannerActions.web.tsx renders one line, "Reconnect or re-pair from the Orca app.", and no pressable. The banner's sentence is unchanged; native renders the three actions as before.

The page bundled the push subsystem it can never run. host-removal-lifecycle.ts was the only path from a page route into push-registration.ts; the .web sibling is the fence. src/notifications/ is now absent from the shipped page bundle, asserted by mobile-web-app-push-subsystem-closure.test.mjs (the former expo-notifications fence, whose presence precondition went false once push-token.web.ts and desktop-notification-channel.web.ts left with the rest).

Page-closure pin tables lose the two families that left the closure (notifications.push-registration, transport.capability-probe), rows removed, nothing re-recorded; the goldens still serve the native app. Per-table: C1 22→20 families / 103→94 goldens, C2 70→68 / 266→257, C3 28→26 / 125→116, C5 27→25 / 134→125, all replay-confirmed. Session-route closure pin SESSION_ROUTE_MODULES 4,211→4,207.

Left as follow-ups: runtime-capability-probe.ts stays in the page bundle through two session imports; other page-inert controls behind the page client context (close, drop, re-dial) are unaudited.

The page holds one host profile from `init.host` and no credential, so
`removeHost` on web resolved without doing anything and the screen reported
success for a host that was still paired. Its `.web` sibling refuses with a
typed error instead, and the auth-failed banner's Remove — the one surface
that opens the confirm — is absent on the page, because a control that can
only refuse should not be there.

Refusing is also the fence that keeps `push-registration.ts` out of the page
bundle: the native lifecycle file's import was that subsystem's only path
into a page route.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
`host-removal-lifecycle.web.ts` was `src/notifications`'s only path into a
page route, so the whole directory left the page bundle and the capability
probe left the C1 layout closure with it. The derived family set shrank by
two; the pin tables and their counts now match what the closure reaches.

The expo-notifications fence grows a second claim and loses a precondition
that had become false: `push-token.web.ts` and
`desktop-notification-channel.web.ts` are no longer in the bundle either, so
the fence is stated as the absence of the directory.

C1 20 families / 94 goldens, C2 68 / 257, C3 26 / 116, C5 25 / 125.
Session route closure 4211 -> 4207 modules.

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

The banner is reachable on the page — the shell forwards the native client's
state verbatim (`bridge-host.ts:381`) and `auth-failed` is in the wire enum
(`bridge/bridge-envelope.ts:43`) — and the page can honour none of its three
actions. `forceReconnect` is `() => Promise.resolve()` there
(`client-context.web.tsx:55`, read through `host-client-hooks.ts:87`),
`/pair-scan` sits outside the page's route root of `app/h`
(`mobile-web-app-route-manifest.mjs:6`), and removal refuses. The previous
commit hid only Remove and claimed the other two still worked; they do not.

The whole action row moves into `AuthFailedBannerActions`, whose `.web`
sibling renders no control and one line naming the app. The sentence above it
is unchanged: re-pairing from the desktop is still what to do.

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

pullfrog Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

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

@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: 0eb7d896-65d5-4bec-a748-bee106f98bb0

📥 Commits

Reviewing files that changed from the base of the PR and between 3bb9a4e and f6225d2.

📒 Files selected for processing (23)
  • config/scripts/mobile-web-app-page-closure-families.test.mjs
  • config/scripts/mobile-web-app-push-subsystem-closure.test.mjs
  • config/scripts/mobile-web-app-session-terminal-closure.test.mjs
  • mobile/src/components/AuthFailedBanner.tsx
  • mobile/src/components/AuthFailedBannerActions.tsx
  • mobile/src/components/AuthFailedBannerActions.web.tsx
  • mobile/src/components/auth-failed-banner-actions-page.test.tsx
  • mobile/src/components/auth-failed-banner-actions.test.tsx
  • mobile/src/components/auth-failed-banner-styles.ts
  • mobile/src/host-screen/host-screen-action-error.test.tsx
  • mobile/src/host-screen/use-host-worktree-actions.ts
  • mobile/src/test-support/bridged-parity/c1-page-closure.test.ts
  • mobile/src/test-support/bridged-parity/c1-page-closure.ts
  • mobile/src/test-support/bridged-parity/c2-page-closure.test.ts
  • mobile/src/test-support/bridged-parity/c2-page-closure.ts
  • mobile/src/test-support/bridged-parity/c3-page-closure.test.ts
  • mobile/src/test-support/bridged-parity/c3-page-closure.ts
  • mobile/src/test-support/bridged-parity/c5-page-closure.test.ts
  • mobile/src/test-support/bridged-parity/c5-page-closure.ts
  • mobile/src/transport/host-removal-lifecycle.web.test.ts
  • mobile/src/transport/host-removal-lifecycle.web.ts
  • mobile/src/transport/page-host-removal-refusal.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.


📝 Walkthrough

Walkthrough

The change adds a classified web host-removal refusal and handles it without reopening confirmation. The authentication-failed banner now uses shared native actions and a web-specific static message. Tests cover both platform behaviors and the refusal path. Bundle checks exclude the notifications directory. C1, C2, C3, and C5 closure pins and expected totals are updated after removing two families.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to f6225

The web refusal and banner behavior have no remaining actionable risk from this review.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description gives a detailed explanation of the two fixes, their user impact, and the testing scope. However, it omits required template sections, including the linked issue, visual proof or an ex… Add the required template sections. Provide the linked issue after “Fixes #”. Add before-and-after visual proof, or write “N/A” with a reason if no visual or interaction change applies. Complete the testing checklist and document manual pla…
Docstring Coverage ⚠️ Warning Docstring coverage is 43.75% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 22 files. (1 skipped:… 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 summarizes both primary changes: preventing unsupported host removal on the page and excluding the push subsystem from the page bundle.
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.
Full details: Description check

Explanation

The description gives a detailed explanation of the two fixes, their user impact, and the testing scope. However, it omits required template sections, including the linked issue, visual proof or an explicit N/A justification, the testing checklist, AI disclosure, review, boundary, notes, and final checklist.

Resolution

Add the required template sections. Provide the linked issue after “Fixes #”. Add before-and-after visual proof, or write “N/A” with a reason if no visual or interaction change applies. Complete the testing checklist and document manual platforms, AI disclosure status, review notes, agent-skill boundary status, compatibility considerations, and the final checklist.

Full details: Docstring Coverage

Explanation

Docstring coverage is 43.75% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 22 files. (1 skipped: 1 unsupported.)

  • 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.

@Jinwoo-H
Jinwoo-H merged commit a8786c0 into main Sep 22, 2026
32 of 33 checks passed
@Jinwoo-H
Jinwoo-H deleted the ota-fu-page-host-removal branch September 22, 2026 16:49
Jinwoo-H added a commit that referenced this pull request Sep 23, 2026
#22283 dropped all three banner actions on the page, on the claim that
/pair-scan sits outside the page's route root so Re-pair cannot work there.
It does work: the host screen's router is the route handoff, which posts a
target the page does not serve to the shell (route-handoff.web.ts:207), and
on the emulator the tap opened the native scan screen and Back returned to
the same page document.

The page's sibling now renders Re-pair as native does, wired to the same
onRepair, plus a muted line for the two it still cannot honour: "Reconnect
or remove this host from the Orca app." forceReconnect stays null on the
page and removal keeps refusing; native renders its three actions as
before. The doc comments and the web-overrides reason are corrected, and
the reason's drifted citations re-resolved.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
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