Repository navigation
feat(mobile): take the session screen's inputs, links, clipboard and routers through the platform seams (OTA phase C, C7.2) - #21790
Conversation
…nt seam (OTA phase C, C7.2) The landed text-input census, run over `app/h/[hostId]/session/[worktreeId].tsx`, reports nine sizes that do not come from `TEXT_INPUT_FONT_SIZE`. Six declare the app's body size and move in place, which is the same number natively. Three do not — a 22px key-capture field and the chat's two 15px fields — so each gets a `.web.ts` sibling of the address bar's shape, with a shared base so the two halves can differ in nothing but the size. The capture field is the one the move shrinks rather than raises: 22 already clears the focus-zoom floor, and the census reads the seam as a binding rather than as a number, so there is no expression that keeps 22 and still says where the size came from. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…hind `oxlint` over the whole tree, which CI runs, reads it as an error. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…he platform seam (OTA phase C, C7.2) The landed external-link census, run over the session route's closure, reports three modules reaching react-native's `Linking`: a terminal link tap whose open mode is the phone's browser, and the two WebView-backed readers, each of which sends a tapped link to the system browser rather than navigating the artifact away. Inside the shell `Linking.openURL` calls `window.open`, which both shells refuse and which resolves either way, so all three reported success into a tap that did nothing. The seam also stops swallowing the failure: each site caught and discarded, and `openExternalLink` names it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
… the platform seam (OTA phase C, C7.2) `expo-clipboard` resolves to `navigator.clipboard` on the web, which needs a secure context — iOS serves the page from a custom scheme and Android from `https`, so that path works on one platform and silently not on the other. The landed census now reports the module out of the route's closure entirely. The seam grows its reader half, on the landed `native.clipboard.read` verb: text, a PNG, and a presence probe. Two degradations are recorded rather than implied. No shell serves an image, so the page answers null and the terminal's paste takes the branch an empty clipboard already took; and the shell serves no presence verb, so `contents` answers what this side knows rather than reading to find out, which would raise iOS's paste-consent prompt on every foreground. The copy-path sheet gains the failure toast its two neighbours already had: it showed "Path copied" before the write, and the seam rejects rather than returning false. The route parity pin moves with it: five clipboard hooks join the expanded route and one runtime string joins the sheet. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…doff seam (OTA phase C, C7.2) Inside the page a screen is one document standing in for one screen, and `useRouteHandoff` is the only thing that knows which targets the page keeps and which it hands back to the app. The three holders here are the workspace-missing bounce, the file-tap preview push, and the pane-tap param consume. The domain's census is narrower than the two landed ones because it has to be: eight of its hooks take `useFocusEffect` and two take `useLocalSearchParams`, neither of which can navigate, so the rule is a closed list of names rather than a ban on any value import — which also catches expo-router's module-singleton `router`, a spelling a `useRouter` rule would have read as clean. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
… added (OTA phase C, C7.2) The overrides census fails on an unlisted `.web.*`. One raises the chat's two 15px fields past the focus-zoom floor; the other lowers a 22px capture field onto the seam, and its entry says why a reduction is the right answer there. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…of the floor (OTA phase C, C7.2, ruling 12) The floor is the rule and the seam is the mechanism. A binding rule alone made the custom-key capture field an offender at 22, where nothing can zoom, and the only way to satisfy it was to lower a one-character field to 16 — the tail wagging the dog. The seam's web half now exports the floor it already computed `Math.max` against, and the census reads that number out of that file rather than carrying a second copy of 16. The rule becomes "the seam's binding, or a literal at or above the floor", with no per-site exemption: a literal under the floor is still reported, which is the case the seam exists for. A tree whose seam declares no floor is refused rather than judged against a number the census invented. So the capture field goes back to 22 on both platforms and its split, its override entry and its parity test go with it. The chat's two fields stay split, because 15 is under the floor however it is spelled. Red-first: with the rule removed, a planted literal 16 and a literal 22 are both reported and the refusal case does not throw; a literal 15 is reported either way. All three route closures that run this census — session, source-control, review — report 0 offenders and 0 unresolved. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe PR adds clipboard reader support and migrates session clipboard operations to shared hooks. It replaces direct router and link-opening calls with navigation and external-link seams. It centralizes web text-input font-size handling and splits chat input styles by platform. New census, closure, parity, and unit tests validate these seams and their dependency boundaries. Priority: ➖ Normal 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description provides detailed change scope, rationale, testing results, exclusions, and verification. It does not follow several required template sections, including ELI5, What Changed, Why, Linked Issue with a Fixes reference, Visual Proof or N/A, AI Disclosure, Review, Notes, and the checklist. Resolution Add the missing template sections and complete the required information. Include a valid linked issue using the required Fixes # format, add Visual Proof or explain why it is N/A, complete the testing and checklist items, and provide the required cross-platform, security, compatibility, and AI disclosure details.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 8b599f3c-b577-4764-906a-bcb715dfacbf
📒 Files selected for processing (40)
config/scripts/mobile-web-app-session-external-links.test.mjsconfig/scripts/mobile-web-app-session-text-inputs.test.mjsconfig/scripts/mobile-web-app-source-control-text-inputs.test.mjsconfig/scripts/mobile-web-app-text-input-font-size-seam.mjsmobile/src/components/CustomKeyModal.styles.tsmobile/src/components/MobileHtmlPreview.tsxmobile/src/components/MobileRichMarkdownEditor.tsxmobile/src/components/TextInputModal.tsxmobile/src/navigation/router-seam-census.test-support.tsmobile/src/platform/clipboard.test.tsxmobile/src/platform/clipboard.tsmobile/src/platform/clipboard.web.test.tsxmobile/src/platform/clipboard.web.tsmobile/src/platform/text-input-font-size.test.tsmobile/src/platform/text-input-font-size.web.tsmobile/src/session/MobileNativeChatAsk.tsxmobile/src/session/MobileNativeChatComposer.tsxmobile/src/session/MobileNativeChatQuestion.tsxmobile/src/session/MobileSessionSheets.tsxmobile/src/session/QuickCommandEditorForm.tsxmobile/src/session/QuickCommandRow.tsxmobile/src/session/QuickCommandsList.tsxmobile/src/session/mobile-native-chat-input-base-styles.tsmobile/src/session/mobile-native-chat-input-styles.tsmobile/src/session/mobile-native-chat-input-styles.web.test.tsmobile/src/session/mobile-native-chat-input-styles.web.tsmobile/src/session/mobile-session-command-input-styles.tsmobile/src/session/mobile-session-route-parity.test.tsmobile/src/session/session-router-seam-census.test.tsmobile/src/session/use-mobile-file-tap-handlers.tsmobile/src/session/use-mobile-session-accessory-selection.tsmobile/src/session/use-mobile-session-attachments.tsmobile/src/session/use-mobile-session-diff-comments.tsmobile/src/session/use-mobile-session-file-actions.tsmobile/src/session/use-mobile-session-foundation.tsmobile/src/session/use-mobile-session-markdown-actions.tsmobile/src/session/use-mobile-terminal-paste.test.tsmobile/src/session/use-mobile-terminal-paste.tsmobile/src/session/use-notification-pane-navigation.tsmobile/web-entry/web-overrides.json
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
Reviewed the full 40-file diff of the session screen's platform seams (OTA phase C, C7.2), including the census/rule changes, the new platform siblings, and the refreshed parity pins.
- Text-input font-size seam: nine session inputs onto
TEXT_INPUT_FONT_SIZE; six move in place at the body size, the two 15px chat fields split into a shared base plus native/.web.tssiblings, and the capture field keeps literal 22. - Census rule (ruling 12):
TEXT_INPUT_FONT_SIZE_FLOORexported from the web seam and read by the census, which now accepts a numeric literal at or above the floor and throws when the seam declares no floor. - External links: the three
Linking.openURLsites ontoopenExternalLink. - Clipboard: seven
expo-clipboardsites onto the platform seam;useClipboardReaderadded (readText/readImage/contents), with the webreadImagedegrading to null and the copy-path sheet gaining a failure toast. - Routers: the three session router holders onto
useRouteHandoff, with a new domain census andexpoRouterValueImports. - Pins/overrides: route-parity hook/string/hash pins refreshed (+5 hooks, +1 string) and a
web-overrides.jsonentry for the chat input styles.
ℹ️ Nitpicks
mobile/src/session/mobile-session-route-parity.test.ts:65— the comment says "five clipboard hooks joined the expanded route … a reader in the selection and attachment probes and in the terminal's paste", which enumerates six roles.useMobileTerminalPasteis not inLOGIC_EXPANSION_NAMES, so the reader inside it is not among the +5 inmain.hooks; the prose lists one source too many.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…ed writes `contents()` reported no text on a route that granted `native.clipboard.read` without the write, because it read `verbs.granted`, which is write AND read. The verbs hook now exposes the two grants separately and the web seam answers on the read one; `granted` keeps its meaning for the callers that need both. The Markdown copy action was the one write of eight in the session domain with nowhere for a rejection to go: the seam rejects when the pasteboard refused the text, the callback had no failure branch, and its caller drops the promise, so a refused write raised an unhandled rejection and still left "Copied" on screen. It now takes the error haptic and the "Couldn't copy" toast the other copy paths show. A census over `src/session` fails if any `writeText` call site lacks a failure branch, so the ninth site cannot arrive without one. The route parity pin moves with it: one callback body, one runtime string. Its refresh note claimed six clipboard hook sites for a delta of five; the walk from `SessionScreen` reaches five, and the terminal's paste is not among them. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…st the floor Moving the two clipboard probes into an object literal serialised them: the migrated `contents()` awaited `hasStringAsync` before `hasImageAsync` was called, where both callers had used `Promise.all`. That path runs on mount, on every AppState foreground and on every select-mode toggle. Restored, with an ordering probe that deadlocks unless both probes start before either answers. The floor case could not fail for the reason it named: its fixture declared 16, so a census carrying its own copy of 16 passed it. It now plants a seam declaring 20 and a literal 18, the size that is clean under one floor and an offence under the other. Two stale wordings from the reverted split: one closure case still said "both split style modules" over a one-element list. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The last of the seven migrated writes without the error haptic. The row already said "Couldn't copy" on its own control, in red, for the 1500 ms the toast the other six show would have lasted, so it never claimed a refused write had landed; what it had no way to say was anything the thumb still on the button could feel. Its first test, on the harness its list already uses: the seam rejects when the pasteboard refuses, and the two cases are the difference between the row that shows a green check over nothing copied and the row that does not. The list's own test gains the haptics mock the row's new import needs. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 51f32aa0-bcf7-4e83-96f9-feb7441ccad6
📒 Files selected for processing (13)
config/scripts/mobile-web-app-session-text-inputs.test.mjsconfig/scripts/mobile-web-app-source-control-text-inputs.test.mjsmobile/src/mobile-web-shell/bridge/use-native-verbs.tsmobile/src/platform/clipboard.test.tsxmobile/src/platform/clipboard.tsmobile/src/platform/clipboard.web.test.tsxmobile/src/platform/clipboard.web.tsmobile/src/session/QuickCommandRow.test.tsmobile/src/session/QuickCommandRow.tsxmobile/src/session/QuickCommandsList.test.tsmobile/src/session/clipboard-write-failure-branch-census.test.tsmobile/src/session/mobile-session-route-parity.test.tsmobile/src/session/use-mobile-session-markdown-actions.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- mobile/src/platform/clipboard.web.ts
- mobile/src/session/use-mobile-session-markdown-actions.ts
- config/scripts/mobile-web-app-session-text-inputs.test.mjs
- mobile/src/platform/clipboard.web.test.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
Reviewed the three commits since the prior pullfrog review (4ea945b → 02cbb52), which resolve the read-grant finding and harden the clipboard census.
- Per-verb clipboard grants:
NativeVerbssplitsgrantedintocanWriteClipboardText/canReadClipboardText, and the webcontentsnow answers on the read grant, with a read-only-route test. - Probe parallelism restored: the native
contentsusesPromise.allagain so both probes start before either is awaited, with an ordering test that deadlocks under sequential awaits. - Failure branches on the migrated writes: the Markdown copy action gains a
try/catch, the quick-command row an error haptic, and a new structural census asserts everywriteTextsite insrc/sessionhas a failure branch. - Pins and fixtures: the route-parity clipboard note is corrected and the string/JSX pins refreshed; the floor test now plants a seam declaring 20 with a literal 18; the "both split style modules" wording is fixed.
ℹ️ Nitpicks
mobile/src/mobile-web-shell/bridge/use-native-verbs.ts:28—grantednow has no production reader: the writer goes throughcall()'s own grant check andcontentsreadscanReadClipboardText, so onlyuse-native-verbs.test.tsxasserts it. Consider dropping it or marking it reserved.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…ends on
`hasFailureBranch` accepted any enclosing `try` with a `catch`, so the one shape
the census exists to stop passed it: `void clipboard.writeText(...)` inside a
try/catch is an unhandled rejection with a handler three lines above it that can
never run, because the block returns before the promise settles. It now requires
the call to be awaited inside the try's own block, or to carry a `.catch` along
its own chain. The boundary walk stopped only at function and method
declarations, so a `catch` outside an arrow answered for the call left running
inside it; every function-like node ends the search now.
Five cases over snippets read through the same reader, because a `void` write
would have to be committed to be tested against the real tree. Control on a real
site: making the Markdown write un-awaited inside its own try reports it.
Two provenance fixes. The runtime-string delta across C7.2 is two literals, not
one: "Couldn't copy path" took the count from 532 to 533 and "Couldn't copy" took
it to 534. And main's C7.4 made `BRIDGE_CLIPBOARD_MIMES` `['text']`, so an image
mime is a value the schema does not admit rather than a refusal the verb spells
out, with `native.media.pick { source: 'clipboard' }` waiting on C7.6; the web
seam and its test said otherwise. Behaviour unchanged.
Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…usal The haptic I added ran before the mounted guard, so a copy pressed on a row that then scrolled out of the list, or a sheet closed over it, still buzzed when the rejection arrived. A buzz with no row to explain it is feedback for nothing, and the guard was already there for the feedback state one line below. Red-first: press, unmount, then reject. The success path already guarded first. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 7828aa5a-008c-46de-9e8e-68e2c04489dd
📒 Files selected for processing (6)
mobile/src/platform/clipboard.web.test.tsxmobile/src/platform/clipboard.web.tsmobile/src/session/QuickCommandRow.test.tsmobile/src/session/QuickCommandRow.tsxmobile/src/session/clipboard-write-failure-branch-census.test.tsmobile/src/session/mobile-session-route-parity.test.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- mobile/src/platform/clipboard.web.ts
- mobile/src/session/mobile-session-route-parity.test.ts
- mobile/src/session/QuickCommandRow.test.ts
- mobile/src/session/QuickCommandRow.tsx
- mobile/src/platform/clipboard.web.test.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the two commits since the prior pullfrog review (02cbb52 → d1d9a59), which close out the open clipboard-census thread and add an unmount guard. The full 44-file diff was read for context; the delta is small and clean.
- Clipboard census hardened:
hasFailureBranchnow ends its upward walk at every function-like node (arrows and function expressions included) and only accepts a.catchon the write's own chain (parent.expression === node), and requires the write to be awaited inside thetry's own block; five snippet tests cover the three refused shapes and the two accepted ones. This resolves the prior review's boundary and chain concerns. - Quick-command row unmount guard: the
mountedRefcheck now runs before the error haptic, so a refusal that arrives after the row unmounts emits nothing; a new test presses copy, unmounts, then rejects, which reds without the reordering. - Comment rewords: the web clipboard reader's image-refusal prose now describes main's post-C7.4 contract (
BRIDGE_CLIPBOARD_MIMESis['text']; an image on the pasteboard isnative.media.pick { source: 'clipboard' }), and the route-parity note records the string count as 532 → 533 → 534.
The prior body-only nitpick about granted having no production reader is addressed by the expanded NativeVerbs.granted docstring, which explains it as the both-verbs question a copy-and-paste caller wants.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
… in it Any `.catch` property access counted as a failure branch, so two shapes that handle nothing passed: `clipboard.writeText(text).catch` reads the handler's name and registers nothing, and `.catch()` swallows the rejection while the caller goes on to say the write landed. The rule now requires `.catch` to be the callee of a call carrying at least one argument. Red-first with both shapes in the snippet reader, the accepting cases unchanged. Control on the real tree: emptying the notes sheet's handler reports `MobileSessionSheets.tsx:174`, and restoring it greens. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the single commit since the prior pullfrog review (d1d9a59 → 041222e) against the full 44-file diff. The delta tightens the clipboard write-failure census and adds two red-first snippet tests; no production code changed.
.catchmust be called with a handler:hasFailureBranchnow requires the.catchproperty access to be the callee of a call carrying at least one argument, so a bare.catchproperty read and an empty.catch()are both refused. Both new snippet tests fail against the prior condition (which matched on the method name alone), so they are genuine coverage rather than theatre.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…map taps through the page scale, and sweep the frame budget on the real encoder (OTA phase C, C6.7) (#21799) * fix(browser): settle a page's dialog on the stream that reported it (OTA phase C, C6.7) Chromium hands `Page.javascriptDialogOpening` to one CDP session and takes the answer only from that session; a client attaching afterwards is told `No dialog is showing`, and every renderer-bound command it sends first blocks behind the dialog it was sent to clear. Measured on Chromium 1217, 2026-09-20. `browser.dialogAccept` and `browser.dialogDismiss` went to the agent-browser bridge, which is always a later client, so the reply never reached `Page.handleJavaScriptDialog`: the page stayed blocked and its next dialog never opened. The screencast is the session that reported the dialog, so it is the session that answers it. With no stream live on the page the bridge path is unchanged. No RPC shape changes. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * fix(mobile): keep the browser dialog card until the page takes the answer (OTA phase C, C6.7) The card was cleared on the press, before the reply was sent. A page blocked on a dialog is still blocked until the host settles it, so the pane reported an answer the page never got and left the user looking at a stream nothing could move. The host's `dialogClosed` is what says the page took it, and that already clears the card. The port-pair case runs the pane against a host that only moves the page when the dialog is answered: alert, OK, the card stays while the reply is in flight, then the confirm raises its own card and resolves with the button's value. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * fix(mobile): map a tap through the page scale the frame was painted at (OTA phase C, C6.7) Mobile view emulates a phone viewport, and a page with no `<meta name="viewport">` lays out at Chromium's 980 px default and is scaled into it. The frame metadata says so: `deviceWidth` stays the emulated width and `pageScaleFactor` carries the ratio. The browser's input commands take page CSS pixels, so a tap sent in the frame's own device space landed at that fraction of the aim — 41% on the phone, which is how the C6.6 proof found it. The frame geometry now carries the scale the frame was painted at, and both the tap map and the finger-sized click radius go through it. Measured on Chromium 1217, 2026-09-20: `scrollOffsetX/Y` must not be added — the frame is the visual viewport and the commands take viewport-relative coordinates, so a click sent at `device / scale + scrollOffset` landed a screenful past its target while `device / scale` hit it. Web view mode reports a scale of one and is unchanged, and so is a frame whose metadata carries no usable scale. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): sweep the frame budget on the encoder the product runs (OTA phase C, C6.7) The C6.5 sweep encoded through `canvas.toDataURL` while the pane's frames come from `Page.startScreencast`, so the certification and the product were measuring two encoders. The sweep now drives the screencast, over the same 143 viewports and the same noise, through the same real shell. The two encoders agree to within a thousandth of a byte per pixel, and the screencast is the cheaper of them: across the 111 viewports the budget fits it measured 0.543986 to 0.552964 bytes per pixel, against 0.54470 to 0.55351 from `toDataURL`. `WORST_CASE_JPEG_BYTES_PER_PIXEL` stays 0.56, now stated as the screencast maximum plus 1.3%. So the encoder is not what made the C6.6 device proof drop 1 frame in 41 at 402x593 with the budget on. That frame needs about 0.5649 bytes per pixel, above everything either sweep has seen, and nothing here reproduces it. The docstring records that rather than folding it into the constant. The frame is emulated at one device pixel per CSS pixel and the page carries a viewport meta: headless Chromium composites at the DIP surface size whatever `deviceScaleFactor` says, so without both the canvas is scaled into the frame, the noise averages away and the sweep reads about 0.12 bytes per pixel. Also records what C6 ruling 1 costs, in the pane's docstring: "never dark" holds only for a page that produces some frame that fits. With every frame over the cap the pane sits on its busy spinner over an unpainted viewport, which is the budget's reason for existing. No code change for that. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): wait on the double buffer's flip, not on a digest (OTA phase C, C6.7) The render check waited for some painted layer to carry a digest other than the previous frame's. `applyFrame` writes the next frame's URI onto the hidden layer as soon as the frame lands and only flips the opacity once the decode resolves, so that predicate is true before the frame is on screen. Measured with a MutationObserver over the style writes, 2026-09-20: the URI landed 80.7 ms after the emit and the flip at 85.7 ms, a 5 ms window in which the wait returns and the visible layer is still the previous frame. The check usually outran it by the round-trip it spends reading the layers back, which is why it failed once in CI (#21790, d1d9a59) with the second frame's digest equal to the first's and no console errors. Both cases that used that predicate now wait on the flip itself: the visible layer must become the other one, which is one opacity write at `settleBrowserFrameLayer` and the behaviour under test rather than a proxy for it. Asserting the exact layer rather than any change keeps a pane with nothing visible from reading as a flip. The digest assertions stay, as the content check the wait no longer stands in for. With `settleBrowserFrameLayer` stubbed to skip the flip the case fails on the wait, so it is still an oracle for the behaviour and not only for the timing. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * fix(browser): one dialog reply shape, and no dialog outliving its stream (OTA phase C, C6.7 round 1) Round 1 findings 2 and 4. The reply body forked: `{}` when a pane was streaming the page and the agent-browser payload when one was not, so `orca browser dialog accept --json` printed a different body depending on whether anyone happened to be watching. Both paths now answer `{ accepted: boolean }`. The bridge's own body is not forwarded, because it is whichever JSON that agent-browser version prints, which is the thing a caller cannot rely on. Pinned by asserting the two paths answer the same value. A replacement stream can meet an open dialog: the last subscriber leaving stops the page's session, and a later subscribe builds a new one, which is what backgrounding and foregrounding the phone does. Measured on Chromium 1217, 2026-09-20, with the dialog up: detaching the session that reported it does not complete, `Page.enable` on a fresh session does not complete, and `Page.handleJavaScriptDialog` on it answers `No dialog is showing`. So carrying `dialogOpen` across would report a success the page never got, and the replacement's own start would hang before it could try. The stream therefore dismisses a dialog still open when it stops, before `Page.stopScreencast`, so no session is ever replaced with one outstanding. Dismissing is the conservative answer for every dialog type including beforeunload, and the automation path has taken it since `cdp-debugger-events.ts`. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * fix(mobile): say when a dialog answer did not land, and drop the sweep's inert emulation claim (OTA phase C, C6.7 round 1) Round 1 findings 1, 3 and 5. The sweep's `deviceScaleFactor` is inert and the docstring claimed otherwise. Headless Chromium composites at the DIP surface size whatever the factor says, so the sweep returns the same 0.543986 / 0.552964 to six decimals at 1 and at 3; `Emulation.setDeviceMetricsOverride` is there to size the surface and nothing else. What actually guards the measurement is the document's viewport meta, without which the page lays out at 980 px, the canvas is scaled into the frame and the noise averages away. That is no longer left to a comment: a case now measures the same frame with the meta removed and reads under 0.3 bytes per pixel, which is what proves the sweep's 0.5 floor is the thing that would catch it. The card cleared only on `dialogClosed`, but the request still suppressed its error and timed out at 5 s, so a refused or timed-out answer left the modal up with nothing said and a button that looked dead. A failed answer now marks the open card, which keeps its buttons live for the retry. The updater is what stops a late failure reopening a card the page has since closed. The "never dark" note moves onto the component it describes, from the detached block it was sitting in between the imports and the props type. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * fix(mobile): scale the wheel, answer a dialog once, and capture the sweep after the paint (OTA phase C, C6.7 bots) Three bot findings on 6341321. The wheel converted screen deltas with the frame fit and the zoom and left the page scale out, so a flick on a page with no viewport meta delivered about 41% of the scroll asked for — the same omission the tap had, one call site over. Both call sites now go through one scale, named for the three factors every screen-space quantity this pane sends has to carry. `dialogOpen` stayed true until `Page.javascriptDialogClosed`, so two answers in flight both sent `Page.handleJavaScriptDialog`. Chromium takes one per dialog: the second is refused, or settles the page's next dialog unseen if it has already been raised, and the rejection came back out of the RPC. One settlement promise per dialog now, handed to duplicate callers, cleared when the dialog closes or when the command fails — and only by its own dialog's generation, so a late failure cannot disarm the next dialog's answer. The stop path reuses a settlement already on its way rather than adding a second command. On the pane the card's buttons go dead while an answer is in flight, keyed on the token of the answer that armed them, so a reply landing after the page moved on writes to neither card. The sweep painted its noise before `Page.startScreencast` and accepted whatever frame the deadline left it, so a capture taken before the paint committed could have been measured as the cost of the canvas. The noise is now painted after the screencast is running, through the same CDP session and behind two animation frames, and only frames that arrive after that commit are used; none at all is an error rather than a fallback. Re-measured across all 111 budgeted viewports: 0.543986 / 0.552964, unchanged to six decimals, so the constant stays where it is and the capture is guaranteed rather than lucky. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): pin that a late dialog failure marks its own card, and quote the real case title (OTA phase C, C6.7 round 2) Round 2 delta findings a and b. The mis-stamp itself is already closed by the per-dialog token the bot fold added: the failure updater skips unless the open card still carries the token of the answer that armed it, and a dialog raised after that carries none. What was missing is the sequence that proves it. The case answers the alert, lets the page settle it and raise the confirm without the pane hearing the reply, then times that reply out: the confirm keeps its own card and its live buttons. With the token check reduced to the null guard it was reviewed with, the confirm is stamped with the alert's failure. The sweep docstring quoted a case title that does not exist, which is a pointer that reads as a citation and resolves to nothing. It now quotes the real one. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): give the browser pane the one dialog-state type (OTA phase C, C6.7 bots) pullfrog: the pane declared its own `BrowserDialogState` without `error` or `pending`, and only structural typing let the hooks' wider setter flow into it, so the fields the card renders were undeclared on the pane's own state. The pane now imports the exported type and the local declaration is gone. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

Summary
Phase C, C7.2: the session screen's seams (
design-ota-c7.md§3, §8; rulingsrulings-ota-c7.md9 and 12). Thirteen commits on96c1dd8b70, inert on the web until C7.7 registers the route. Native changes beyond the seams: the clipboard probes stay parallel, and every migrated write now surfaces a refused write as a failure (haptic and toast) instead of claiming success; the capture field's style object moves within its file with only comment lines changed.Measured by running the landed censuses over the session route's closure (4335 modules / 954 local at the head; 4341 / 952 at the base
96c1dd8b70), red-first with each:mobile-web-app-text-input-font-size-seam.mjs)mobile-web-app-external-link-seam.mjs)MobileHtmlPreview.tsx,MobileRichMarkdownEditor.tsx,use-mobile-session-file-actions.ts)expo-clipboardin the closureExpoClipboard.web.js)useRouterholders insrc/session(newsession-router-seam-census.test.ts)useRouteHandoffcallersuseFocusEffect+useLocalSearchParamscad2bb128c,dbca8bfe07TEXT_INPUT_FONT_SIZE: six declare the body size and move in place (the same number natively); the chat composer and question field sit at 15 and each gets a.web.tsof C6.4's shape over a shared base, native parity proved property-for-property and key-for-key against the pre-split objects4ea945bc7eMath.maxasTEXT_INPUT_FONT_SIZE_FLOOR, and the shared census reads it from that file (a tree whose seam declares no floor throws); the rule is now "the seam's binding, or a numeric literal at or above the floor", literals only, no per-site exemption. The custom-key capture field goes back to 22 on both platforms with no split. Red-first with the disjunct removed: a planted 15 is reported either way, 16 and 22 move from reported to clean20a0ead745Linking.openURLsites ontoopenExternalLink3b6f56a689expo-clipboardsites onto the platform clipboard seam, which gains its reader half over the landednative.clipboard.read: on the page an image answersnull(an image on the clipboard pastes nothing until C7.4/C7.6) andcontentsanswers{ text: granted, image: false }rather than probing, because a probing read raises iOS's paste-consent prompt on every foreground; both asserted. The copy-path sheet gains the failure toast its two neighbours already had (it claimed "Path copied" before the write)b097598c2auseRouteHandoff; the route parity pin moved (+5 hooks, +2 strings: "Couldn't copy" and "Couldn't copy path") and its counts and seven hashes (lines 68, 69, 71, 84, 91, 114, 116) are refreshed with the reason in the filed7a8a6fc84web-entry/web-overrides.json(the commit subject says two; the capture field's sibling was reverted by ruling 12 before it shipped)ceae480048canWriteClipboardText/canReadClipboardText, and the web seam'scontents()answers on the read grant (a route with read and no write reportedtext: false); the markdown copy action gains the error haptic and "Couldn't copy" (its writer's rejection was dropped); a census oversrc/sessionfails if anywriteTextsite lacks a failure branch; the parity note corrected to the five clipboard hook sites the walk fromSessionScreenreaches6418507171clipboard.tsprobeshasStringAsyncandhasImageAsyncin parallel again (Promise.all, as both callers did at the base; an ordering probe times out under sequential awaits); the floor fixture plants a seam declaring 20 with a literal 18, so a census carrying its own 16 reds; "both split style modules" wording02cbb52eeeQuickCommandRow.tsx:71showed the toast but lacked the haptic and gains it with a first test for the row60ecda47afcatchclause is not answered for by its try) or to carry a.catchon its own chain, and every function-like node ends the boundary walk; a snippet reader carries the five shapes a product file cannot plant (three refused, two accepted); the parity note names both strings and which commit took the count where (532 → 533 → 534); the image-refusal prose reworded against main, whereBRIDGE_CLIPBOARD_MIMESis['text']and the pasteboard's image isnative.media.pick { source: 'clipboard' }for C7.6 to wired1d9a59288041222e83d.catchto be the callee of a call carrying a handler, so a bare.catchproperty read and an empty.catch()(which registers a handler that reports nothing and lets the caller claim success) are both refused; control on the real tree: emptying the notes sheet's handler reportsMobileSessionSheets.tsx:174Gates (lead, on
041222e83dagainst96c1dd8b70;d1d9a59288plus one test-only commit)tsc 0, ratchet 0, oxlint 0, format 0, react-doctor 0, merge-max-lines 0, root vitest 226 files green, mobile vitest 743 files green, machine paths 0, merge-tree clean against main
e5181113ca, and the head merged with main passes the platform, session, shell and component suites (297 files) and the page family (19 files). Red-first reproduced by the lead: the ruling-12 disjunct removed reds 4 census cases; the markdown copy's try/catch stripped makes the write-site census name the site; the quick-command row's haptic moved back above its mounted guard reds the unmount case.Not in this PR
The terminal stream rules (C7.3, rulings 1 and 2), the media verbs (C7.4), the page's terminal (C7.5), the pickers and editor fallbacks (C7.6), the route (C7.7).
Verified
d7a8a6fc84, sequential, exit codes from the command: mobile tsc, ratchet, whole-tree oxlint, oxfmt, root oxfmt and oxlint on the two changed root files, full mobile suite (742 files, 8360 passed, noErrorsline), both changed-code gates (41 files, 0 findings), merge-tree max-lines clean; config/scripts red only onresolve-7za-path.test.mjs, untouched, a 500 from the signing-toolset download (environmental).verify-gates.shond7a8a6fc84against96c1dd8b70(mobile 742/8360, config/scripts 226 files / 2069 passed, all exit 0, machine paths 0).Part of the mobile OTA plan (Phase C). Reference PR #13386, never merged.