Skip to content

feat(mobile): let the page hand a link to the device through the shell (OTA phase C, C2.3) - #21597

Merged
Jinwoo-H merged 13 commits into
mainfrom
ota-c2-3-external-link
Sep 19, 2026
Merged

Jinwoo-H merged 13 commits into
mainfrom
ota-c2-3-external-link

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​480 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​474
Prod 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​240 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​226

What this is

OTA phase C, C2.3: the second shell verb of the C2 series. A page has no way to open a URL in whatever the device opens it with: react-native-web's Linking.openURL calls window.open(url, '_blank', 'noopener') and resolves whether or not anything opened (only tel: assigns window.location), and neither shell opts into window.open: iOS sets javaScriptCanOpenWindowsAutomatically = false and its createWebViewWith returns nil; Android sets the same flag false, setSupportMultipleWindows(false), and onCreateWindow returns false. So the native path reports success into a tap that did nothing, which is the dead tap the grant exists to rule out. This PR gives the page a seam that hands the URL to the shell, and gives the shell the verb to receive it.

Independent PR off main (1ef947394b), not stacked. Inert for released phones (no consumer posts the name yet; the tasks route is native until the C2.1 consumer PR) and for the dev-flagged page (no call site uses the seam yet).

What changed, by layer

  • Contract (bridge-envelope.ts, bridge-notify-grants.ts, page-route-policy.ts): notify { name: 'externalLink', url } joins the closed client union, with its own grant name in MOBILE_WEB_SHELL_GRANTS. Not a verb of navigate: navigate opens a screen this app carries; this hands a URL to the device, and a shell implementing one and not the other is a real shell the route policy must be able to describe. BRIDGE_PROTOCOL_VERSION is unchanged. The url is bounded by the envelope's existing href cap.
  • Host (bridge-host.ts, bridge-host-contract.ts, MobileWebShellScreen.tsx, use-mobile-web-shell-bridge.ts): the shell screen calls Linking.openURL. The scheme rule (https:, http:, mailto: only) is parsed with new URL().protocol, not prefix-matched, because startsWith('https:') reads an allowed scheme out of javascript:alert("https://x"); a frame carrying a refused scheme never reaches the handler: it dies at the envelope as unrecognised-message, the same way any frame outside the closed union does, and nothing opens.
  • Page (bridge-client-notifications.ts, bridge-rpc-client.ts, src/platform/external-link.ts with its .web.ts sibling, web-entry/index.tsx): one seam module. Native is Linking.openURL with the rejection swallowed (every caller is a tap handler, and openURL rejects for a URL no installed app claims). Web runs the same parsed scheme check at the call site, so a tap knows it went nowhere, then posts the notify; the shell refuses again on the frame, so a page that skipped its own check still cannot reach the device handler. The opener is published by the entry rather than read from context, matching publishPageStorage, because the callers are plain functions in trees the provider does not wrap. The override is registered in web-overrides.json, whose gate fails on an unlisted .web.* file.

What the consumer PR (C2.1) inherits

The seam replaces Linking.openURL at ten call sites in the tasks page closure: nine under src/tasks across seven files (one more than the design listed, mobile-tasks-provider-item-list.tsx:170), all reachable through the mobile-tasks-dependencies barrel that re-exports Linking, so they swap in one line; and MobileMarkdown.tsx:68, which imports react-native directly. The four PR-sidebar and mobile-pr-url sites root at other screens and are not in the tasks closure by import trace; the closure computation decides.

Checks

Mobile tsc, tests-typecheck ratchet, whole-tree oxlint, format, both changed-code gates against main, root config/scripts suite (the override gate reads web-overrides.json), full mobile suite including the bridged parity gate (787 goldens, classes unchanged).

Review round 1 (approve; three folds, one declined)

Fresh reviewer at 643511741c ran a 40-input scheme matrix (the javascript: family in every case and encoding, data:, file:, intent:, blob:, tel:, protocol-relative, unparsable and over-cap strings all refused; punycode, user:pass@ and mailto: with headers allowed; new URL throws caught inside the predicate), confirmed the host's check is independent of the page's, confirmed an old shell refuses the frame as unrecognised-message and drops a route declaring the grant to native, and reproduced red-first per product commit. Folded: (1) a failed Linking.openURL on the shell (a mailto: with no mail account) was silent on both sides, the one place the dead tap this PR rules out actually happens; the host now reports it with name and error. (2) The check parsed the URL through the WHATWG parser, which strips tab, LF and CR and trims leading control characters, but the raw string was forwarded; both sides now post and forward the parsed href, with the cap applied to the normalized form as well (percent-encoding expands). Comparing against the normalization was rejected because https://example.com normalizes to https://example.com/. (3) The "no opener published" test never exercised the module default because earlier tests had published one; it now resets modules and asserts the refusal. Declined: a Promise<boolean> return on the seam; the ten inherited sites do not need it and it changes shape once one does. A fourth commit fixes the lane's own item-1 test, whose Promise.reject built at mock setup produced an unhandled rejection: a passing count with exit 1.

Review round 2 (SHIP WITH NITS, all folded)

Fresh reviewer at 52191bab02 ran a 16-input normalization matrix (IDN and punycode, credentials, backslashes, dot segments, encoded dots, default ports, IPv6, mailto: with headers, the four whitespace shapes, https:example.com, uppercase scheme): the posted href equals the forwarded href byte for byte and new URL().href is idempotent on all; a raw string inside the cap whose normalized form leaves it is refused on both sides. Confirmed the round-1 fold's failure mode by restoring the old mock (all tests passed, one unhandled error, exit 1). Findings folded: the port-pair harness collected externalLinks and nothing read them, so the page-posts-what-the-host-forwards property is now asserted through the pair, plus a frame injected straight into the host so a host that forwarded raw would fail; mobile-pr-url.ts duplicated the native seam byte for byte and now imports it (its four callers are native routes, so nothing changes for them natively; they inherit the empty-URL guard and the failure report); Linking.openURL validates synchronously (invariant(url, 'Invalid URL: cannot be empty')) before returning a promise, so an empty url threw past the .catch and past the tap handler the seam promises to protect; both failure modes are now caught and reported (the test double was replacing the validating module with a plain resolve, so the red needed a validating double first); a 109-character comment reflowed; the failed-open warn matched to its neighbours' two-argument shape; a remaining setup-time rejection made per-call.

…A phase C, C2.3)

A page has no way to open a URL outside itself: `Linking.openURL` is the
app's, and inside the shell the page is a document that cannot reach it. Adds
`notify { name: 'externalLink', url }` and a new grant name of its own in
`MOBILE_WEB_SHELL_GRANTS`, rather than a verb of `navigate` — `navigate`
opens a screen this app carries, this hands a URL to whatever the device
opens it with, and a shell implementing one and not the other is a real shell
the route policy has to be able to describe.

`https:`, `http:` and `mailto:` only, and broad inside that: any host, any
path, because a grant that named GitHub would grow a row per provider. The
rule is parsed rather than prefix-matched, since a scheme is what a URL
parser says it is and `startsWith('https:')` reads one out of
`javascript:alert("https://x")`. It is enforced at the frame as well as at
the page's call site, so a page that skipped its own check still cannot reach
the device handler. Bounded by the route href cap, per the ruling.

`BRIDGE_PROTOCOL_VERSION` is not bumped. Inert until a consumer exists: no
call site and no barrel is touched here.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…hase C, C2.3)

The hook's own suite builds its caller options inline, so the new required
option made it stop typechecking. `tsc -p tsconfig.json` excludes test files;
only the tests-typecheck ratchet saw it.

Adds the case that goes with it: a URL the page hands over reaches the
caller that can leave the app, and nothing reaches the navigate path.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…phase C, C2.3)

`notifyExternalLink(url)` on the page client, gated on the `externalLink`
grant and on the same scheme rule the frame enforces.

Checked twice on purpose. Nothing crosses back for a notify, so the boolean
is the only answer a tap gets: a page that posted a URL the shell's reader
then dropped would report "opened" into a frame nobody acted on, which is
precisely the dead tap the grant exists to rule out.

False before `init`, false after `close`, and never a throw — the callers are
tap handlers with no catch around them.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…e (OTA phase C, C2.3)

One module with a `.web.ts` sibling, which is the shape every platform gap in
this bundle already takes. Native is `Linking.openURL` with the rejection
swallowed, because every caller is a tap handler and `openURL` rejects for a
URL no installed app claims. Web posts the `externalLink` notify after the
same scheme check the frame enforces, names its refusals and throws nothing.

The opener is published by the entry rather than read from context, for the
reason `publishPageStorage` is: the callers are plain functions in render
trees the provider does not wrap. A document that published none refuses
every URL, which is the right answer for a page with no shell.

Registered in `web-overrides.json`: inside the shell's WebView, react-native
-web's `Linking.openURL` opens the URL in that WebView and replaces the page
rather than handing it to the system browser.

No call site and no barrel is touched. The consumer PR swaps them onto this.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…s (OTA phase C, C2.3)

The override reason claimed react-native-web's `Linking.openURL` opens the
URL in the shell's WebView and replaces the page. It does not. Read from
react-native-web 0.21.2: `openURL` calls
`window.open(url, '_blank', 'noopener')` and resolves whether or not anything
opened; only a `tel:` URL assigns `window.location`, and none of the three
allowed schemes is one.

The true failure is the worse one and the better argument for the verb. Both
shells refuse `window.open` outright, measured in their own sources: iOS sets
`javaScriptCanOpenWindowsAutomatically = false` and returns nil from
`WKUIDelegate`'s `createWebViewWith`; Android sets the same flag false, calls
`setSupportMultipleWindows(false)` and returns false from `onCreateWindow`.
So nothing opens, `openURL` resolves anyway, and the native path reports
success into a tap that did nothing — precisely the dead tap the grant exists
to rule out.

The seam's own comment now says the same, so the two files cannot drift.

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

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

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: 7231061a-6c02-4335-b6d3-5bed88f40959

📥 Commits

Reviewing files that changed from the base of the PR and between 52191ba and a5a579a.

📒 Files selected for processing (7)
  • mobile/src/components/mobile-pr-url.ts
  • mobile/src/mobile-web-shell/MobileWebShellScreen.test.tsx
  • mobile/src/mobile-web-shell/MobileWebShellScreen.tsx
  • mobile/src/mobile-web-shell/bridge/bridge-client-notifications.ts
  • mobile/src/mobile-web-shell/bridge/bridge-rpc-client.test.ts
  • mobile/src/platform/external-link.test.ts
  • mobile/src/platform/external-link.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • mobile/src/mobile-web-shell/bridge/bridge-client-notifications.ts
  • mobile/src/mobile-web-shell/MobileWebShellScreen.tsx

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


📝 Walkthrough

Walkthrough

The mobile web shell now supports an externalLink bridge grant. The client validates and normalizes http, https, and mailto URLs before sending notifications. The host routes accepted notifications to an external-link callback. Native code reports Linking.openURL failures. Web code forwards URLs through the bridge and reports refused requests. Tests cover validation, grant handling, host routing, hook callbacks, and platform behavior.

Priority: ⬇️ Low

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 58.82% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 26 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description gives detailed technical context, implementation details, rationale, and test coverage. However, it does not follow the required template and omits several required sections, including… Restructure the description using the repository template. Add the linked issue number, provide the required visual proof or write exactly N/A with a reason if there is no visual or interaction change, complete the Testing section and pla…
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly identifies the main change: allowing a page to pass an external link through the mobile shell to the device. The OTA phase reference adds useful context without making the title misl…
Full details: Description check

Explanation

The description gives detailed technical context, implementation details, rationale, and test coverage. However, it does not follow the required template and omits several required sections, including ELI5, Linked Issue, Visual Proof or the required N/A statement, Testing checkboxes, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist.

Resolution

Restructure the description using the repository template. Add the linked issue number, provide the required visual proof or write exactly N/A with a reason if there is no visual or interaction change, complete the Testing section and platform details, add the required AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections, and ensure the ELI5 and Why sections are explicit.

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

The shell swallowed `Linking.openURL`'s rejection. Nothing crosses back to
the page for a notify, so an open that failed — a `mailto:` on a phone with
no mail account — was silent on both sides. That is the one dead tap this
verb does not rule out, and it was the only one with no record at all.

Warned with the URL and the error, in the shape the two neighbouring reports
in this screen use, and still not rethrown: this runs on the native frame
handler. The contract now asks for the report rather than only for the
absence of a throw.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
… sent (OTA phase C, C2.3)

The scheme check reads the protocol through the WHATWG parser, which strips
tab, LF and CR from anywhere in a URL and trims leading C0 and space before
the scheme is visible. So `ht\ntps://example.com`, `https://example.com/a\r\n`,
`  https://example.com/a  ` and `https:example.com` all passed the check, and
both sides then forwarded the original string. Not a scheme escape — the
parser had already decided the scheme — but the device handler was given a
URL the check never looked at, which is a dead tap through an allowed URL.

`readBridgeExternalLinkUrl` answers the parsed href, and the page posts it
and the host forwards it. Normalizing rather than comparing, because
`https://example.com` differs from its own href by a path slash: refusing
what differs from its normalization would refuse an ordinary URL.

The cap now applies to the normalized form as well as the raw string, since
percent-encoding expands and a string inside the cap can leave it.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…ed one (OTA phase C, C2.3)

The case named for a document that published no opener published one first,
and `post` is module state every earlier case had already set, so the default
at the top of the module was never the thing under test. The only assertion
was `not.toThrow()`, which passes against any implementation.

`vi.resetModules()` and a fresh import, and the refusal reason is asserted.
Confirmed to discriminate: flipping the default to `() => true` turns this
case red and leaves the other three green.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The case added for a failed open used
`mockReturnValue(Promise.reject(failure))`, which builds the rejected promise
at setup time. Nothing attaches a handler until the notify frame arrives
several awaits later, so the suite reported an unhandled rejection and exited
1 with every test passing — a red run that reads as green in the counts
alone.

A fresh rejection per call closes the window, and `openUrl` is reset between
cases so the mock cannot leak into one that does not expect it.

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.

ℹ️ Minor suggestions only — one test that does not exercise what it claims, and one duplicated scheme list.

Reviewed changes

This run reviewed the full 24-file diff for the new externalLink shell verb (initial review at 643511741c).

  • Contract — a new closed-union notify externalLink with its own grant name, mapped into BRIDGE_NOTIFY_GRANTS and MOBILE_WEB_SHELL_GRANTS so it flows into init.grants.native; BRIDGE_PROTOCOL_VERSION unchanged.
  • Scheme rule — isBridgeExternalLinkUrl parses with new URL().protocol against https:/http:/mailto: and enforces it in the envelope's zod .refine and in the page's notifyExternalLink, so a page that skips its own check still cannot reach the device handler.
  • Host — forwardNotify routes the notify to a required onExternalLink, wired in MobileWebShellScreen to Linking.openURL.
  • Page — native/web seam pair plus the opener published by the web entry, registered in web-overrides.json.
  • Tests — caps matrix, host handling (allowed/refused/before-ready/advertised), page client, hook plumbing, both seams.

I independently traced the security path and the mixed-version negotiation and found no bypass and no skew hazard in either direction; the scheme check's correctness rests on Expo's winter runtime installing a WHATWG URL over RN's own non-spec polyfill, which is already assumed elsewhere in the app.

ℹ️ Nitpicks

  • The allowed-scheme list now exists in two places — BRIDGE_EXTERNAL_LINK_SCHEMES in mobile/src/mobile-web-shell/bridge/bridge-caps.ts:95 and ALLOWED_SCHEMES in mobile/src/components/pr-sidebar/markdown-link-scheme.ts:4 — with the same three entries. Worth a shared constant if a future scheme addition should apply to both.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@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

This run re-reviewed the four commits since the prior pullfrog review at 643511741c, against the full 25-file diff.

  • Forward the URL the parser read — isBridgeExternalLinkUrl became readBridgeExternalLinkUrl, returning the parsed href; both the page's notifyExternalLink and the host's forwardNotify now put that href on the wire instead of the caller's raw string, and the normalized form is held to the same 2048-char cap (percent-encoding can expand a string past it).
  • Report a failed open — the shell's onExternalLink now logs a URL Linking.openURL rejected rather than swallowing it, which is the one dead tap this verb otherwise leaves silent.
  • Tests — host and page normalization, the normalized-form cap, the shell warn, and the default-opener case (the prior inline thread) now assert exact values; the openURL rejection is built per call so no unhandled rejection escapes.

I re-ran the affected mobile suites (7 files, 119 tests) and they pass. I verified the WHATWG normalization and href-idempotency assumptions directly (378k random allowed-scheme inputs, no non-idempotent case), and confirmed the accepted set only narrows — the normalized-form cap is new — so there is no scheme bypass or dead-tap regression from the change.

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

…A phase C, C2.3)

`Linking.openURL` validates before it returns anything: `_validateURL` is an
`invariant` that throws for an empty string (react-native 0.83.10,
`Libraries/Linking/Linking.js:117-123`). So the seam's `.catch` was attached
to a promise that, in that case, never existed, and the throw went straight
through a tap handler — contradicting the module's own claim to be safe in
one.

Both failure modes are now caught and reported, and neither is rethrown. The
test double validates the way the real module does, because a mock that only
rejects cannot reproduce the failure that escapes.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…m (OTA phase C, C2.3)

`mobile-pr-url.ts` was the seam's native body already, byte for byte, written
before it. It now re-exports the seam under its own name, so the empty-URL
guard and the failure report reach its four callers too.

Nothing changes natively: the seam's native form is what those callers were
running. On the web they would now post the notify instead, which is the
behaviour they should have had; it is unreachable today, since none of them
is in a page route's closure.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…ase C, C2.3)

The pair harness grew `externalLinks` and nothing read it. This is the
`navigate` twin's shape, over the six normalization inputs: what the page put
on the wire and what the shell forwarded are the same strings, read back off
the frames rather than recomputed, and nothing reaches the shell's client.

Two halves on purpose. The page normalizes before it posts, so over the
client the host only ever receives an already-normalized URL and forwarding
it raw would pass — the frame injected straight into the host at the end is
what holds the host to the rule on its own. Confirmed to discriminate:
reverting the host to forward `message.url` turns that assertion red.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…TA phase C, C2.3)

Three of a kind, none behavioural:

- the notify guard's docstring had a 109-character line; reflowed
- the shell's could-not-open warning passed three arguments where the three
  other reports in that screen pass two; it now passes `{ url, error }`
- the native seam's suite built its rejection with `mockReturnValue`, which
  is the shape `52191bab02` removed elsewhere; it now builds one per call,
  through the same double that validates the way the real module does

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

This run re-reviewed the four commits since the prior pullfrog review at 52191bab, against the full 27-file diff.

  • Guarded the synchronous openURL throw — openExternalLink now wraps Linking.openURL in a try/catch alongside the promise .catch, because Linking.openURL runs _validateURL (an invariant) before it returns a promise; an empty URL would otherwise escape the tap handler the seam promises to protect. I confirmed the contract directly against react-native 0.83.10's Libraries/Linking/Linking.js — openURL is not async and validates synchronously, so the guard is reachable and the validating test double is faithful.
  • Collapsed the duplicate native wrapper — mobile-pr-url.ts is now a one-line re-export of openExternalLink as openMobilePrUrl instead of carrying its own Linking.openURL copy; its four native callers are unchanged.
  • End-to-end port-pair test — bridge-rpc-client.test.ts asserts the page posts the normalized href, the host forwards byte-for-byte what the page posted, and a raw frame injected straight into the host is normalized on the host's own side.
  • Test fidelity and cleanup — the native seam double now validates synchronously like the real module, so the empty-string case is reachable; the shell screen's failed-open warn was reshaped to its neighbours' two-argument form; the notify-guard doc counts externalLink; MobileWebShellScreen.test.tsx resets its openUrl double per test.

The prior inline thread on the default-opener test is addressed (ad1d4db) and resolved. The security path is unchanged: the accepted set only narrows and there is no scheme bypass.

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

@Jinwoo-H
Jinwoo-H merged commit 57fdf68 into main Sep 19, 2026
24 checks passed
@Jinwoo-H
Jinwoo-H deleted the ota-c2-3-external-link branch September 19, 2026 07:33
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