Repository navigation
feat(mobile): budget the browser pane's frames and put its inputs on the web seam (OTA phase C, C6.3+C6.4) - #21760
Conversation
…TA phase C, C6.2) The pane's frame path is written against React Native's native-prop writer, which does not exist on React Native Web: a ref there is the DOM node, so both writes throw and the pane never shows a frame. Three `.web.ts` siblings, each for a measured gap. - The image and layer writes move out of `mobile-browser-frame-state.ts` into `browser-frame-layer-paint.ts`, whose sibling paints the frame as a `background-image` on the element RN Web sizes and flips the double buffer with one opacity write per layer. The pane still never re-renders while it streams. - A `background-image` write fires no load event, so the offscreen layer would never become visible. The sibling arms the flip from an image decode instead, and the flip itself is shared with the native `onLoad` path rather than written twice. - The data URI keeps the base64 the bridge already carried instead of encoding the bytes back into the same string. Measured in this tree against the `buffer` shim the page bundle resolves: 0.256 ms per frame at 45,815 bytes and 2.61 ms at 463,942, against under a microsecond for the carried string. Per C6 ruling 5 the pane asks for binary frames only when the shell granted the lane, and renders its existing stream-error state otherwise, so a page never waits on frames a shell without the encoder cannot send. The grant name is a placeholder until C6.1 reports it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…cap (OTA phase C, C6.3) A screencast frame crosses the bridge as one message under BRIDGE_MAX_MESSAGE_BYTES. Measured here: the phone's mobile view at the native device scale factor asks for a 390x712 viewport at 2x, which is 1,110,720 device pixels, and at the worst case JPEG has at quality 72 that is a 807,559-byte message against a 655,360-byte cap — 123% of it. The `.web.ts` sibling holds the mobile view inside that. The budget is computed rather than written down: the cap, less an envelope this measures from the frame's own shape at its widest (435 bytes), is what the base64 may occupy; three quarters of that is the JPEG; divided by one named worst-case constant of 0.545 bytes per pixel it is an area of 901,271 pixels. The phone lands on a device scale factor of 1.80 and a 654,205-byte message, 99.8% of the cap. A cap that moved and a budget that did not would be a pane going dark on a page it could have streamed. Web view mode is untouched, and byte-identical to the native request: there the frame is a desktop viewport letterboxed into maxWidth/maxHeight, which the page cannot predict, so C6 ruling 1's drop-the-over-cap-frame rule is its only protection. Native is unchanged. The constants and the assembly move to a third module because a `.web.ts` cannot import a value from the file it shadows — the bundler resolves the specifier back to the sibling itself — and two copies of them would drift. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
… seam (OTA phase C, C6.4) The pane has two text inputs, the address bar at 12px and the key row's "Type on page…" at 14px, and neither went through TEXT_INPUT_FONT_SIZE. In a browser an input under 16px makes iOS zoom the page on focus and never zoom back, and keyboard-occlusion.web.ts reads a visual viewport scale other than 1 as "no keyboard" — so one focus would leave the pane's keyboard lift at 0 for the rest of the typing session. C4.2's failure exactly, on a screen its census does not walk: that census walks the source-control hub and the review route, and the pane is in neither until C7 lists a route that mounts it. The key row's input goes straight onto the seam, whose native value is the theme's body size, so it renders at the 14px it already did. The address bar is a `.web.ts` split instead, so native keeps the 12px meta size it has always shown; the input and the label painted over it move together, or the address would resize on every focus. The address bar also gets inputMode="url" on the web only. keyboardType is a native enum a browser does not read, so the page's address bar was falling back to a plain keyboard; inputMode takes precedence over keyboardType, so it stays undefined on both native platforms. One consequence recorded rather than fixed, and pinned in config/scripts/mobile-web-app-browser-pane-text-inputs.test.mjs: the C4.2 census resolves an import through .ts/.tsx only, never .web.ts, so it reads the native address style that no browser loads and reports it as an offender. Whoever lists the pane's route either teaches resolveLocal the extensions the builder already prefers, or moves the address bar onto the seam natively at 14px. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
C6.1 has decided the name: `screencastBinary`, one camelCase token. Replaces the placeholder this PR landed with while C6.1 was still choosing. The placeholder was also unusable, which the test added here would have caught: `GRANT_NAME_PATTERN` in the manifest contract admits a bare name or a `native.`-prefixed verb and nothing else, so a route declaring `browser.screencast.binary` would have been refused by the bundle before any shell saw it, and the pane would have taken its stream-error branch for a reason no screen could report. The name is now checked against `MobileWebBundleRouteSchema` itself rather than against a restated regex, with the dotted spelling as the failing case beside it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
This branch is stacked on the C6.2 branch, which renamed the binary screencast grant from its placeholder to `screencastBinary`. Merged forward rather than left behind: after C6.2 squash-merges to main, a child still carrying the placeholder would put it back. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
… (OTA phase C, C6.4)
`findByType('TextInput')` does not typecheck: a host-component string is not an
`ElementType`, so the file fell out of `tsc -p tsconfig.test.json` and the tests-typecheck
ratchet reported it. Found by reading the ratchet's exit code rather than its piped tail,
which is how it was missed the first time. The element is looked up by its placeholder
instead, and the ratchet is green with 732 test files in the program.
Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…phase C, C6.2) Round 1 folds on #21754. The undecodable arm freed the pending slot without checking whose frame had failed, while the displayable arm checked. Reproduced: frame 2 goes pending on layer 1, frame 3 repoints the same layer, frame 2's decode rejects and clears the slot layer 1 is holding for frame 3, then frame 3 decodes and the flip is refused because the slot no longer names its layer. The newest frame sits decoded at opacity 0 behind an older one, and a page that has gone still sends no further frame to recover with. Web only; native never calls this. Both arms now answer for the frame they were armed with. The displayable arm's own guard had no test: deleting it left `src/browser/` and the full suite green, because the case that exercised it settled both decodes and asserted an end state both orders produce. The harness now settles one decode at a time, keyed on the source it was given, and the ordered case reds without the guard. Also: the paint sibling's opacity test claimed "no re-render" while asserting two style strings, so it is named for what it checks and the claim is counted where React is — across ten streamed frames the three state setters are called once each, on the mount frame. And the overrides allowlist is rebuilt from main's bytes plus the new entries, so two pre-existing reasons keep their literal em dash instead of a re-serialized escape. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Stacked on the C6.2 branch, so its folds and the `screencastBinary` rename have to come forward or a squash-merge of C6.2 would see a child putting them back. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…C, C6.4)
`findByType('TextInput')` does not typecheck — a host-component string is not an
`ElementType` — so the file dropped out of `tsc -p tsconfig.test.json` and the
tests-typecheck ratchet reported it. The imported component is what the element is looked
up by now; the react-native mock stands it up as that same string at runtime, so the
lookup is unchanged and the file is back inside the ratchet's program.
Why the earlier run reported 0: the command was
`node scripts/check-tests-typecheck-ratchet.mjs 2>&1 | tail -2; echo $?`, and `$?` after a
pipeline is the exit code of `tail`, which is always 0. The banner line that printed was
the last line of the failure banner, not the success one. Every gate in this branch's
report is now read from the command itself, unpiped.
Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…OTA phase C, C6.4) The census followed an import through `.ts`/`.tsx` only, while the closure it walks comes from esbuild, which prefers `.web.tsx`/`.web.ts`. So a style module with a platform sibling was judged on the half no browser loads. That fails in the direction that matters: a split whose web half sits under the focus-zoom floor reads as clean because its native half is on the seam, which is the exact shape the seam exists to catch. `resolveLocal` now tries the extensions in the builder's own order. The seam comparison collapses a resolved path onto its module identity before matching, because the seam is itself a split — `text-input-font-size.web.ts` is where the raise lives — and without that every binding in the tree would stop naming the seam: deleting it reds both C4 route closures. The browser pane's own census flips from pinning its address field as an offender to expecting none. The two C4 route closures still answer 0 offenders and 0 unresolved, run with the closure tests enabled. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
|
Run failed. View the logs →
|
… (OTA phase C, C6.4) Round 1 folds on #21760. The envelope estimate serialized each metadata field as a 16-character double, so the bound was 435 where a real frame event at its widest measures 516. Since the budget spends whatever the cap leaves, that 81-byte shortfall was the whole margin: a frame on the budget would have gone over the cap and been dropped. The bound is now the skeleton plus the widest a double can print, for the nine metadata keys imported from the protocol module rather than copied, so a tenth field cannot be added without being paid for. Two corrections to the fold as written, both measured here. The widest is 25 characters, not 24. Exponential form tops out at 24 (`-1.7976931348623157e+308`), but ToString only leaves fixed notation below 1e-6, and just above it a double prints as sign, `0.`, five zeros and seventeen digits: `-0.0000012345678901234567`. A sweep over four million random bit patterns found 25 and nothing longer; a deterministic sweep over both forms is in the test. And the base64 expansion has to count padding. Three quarters of the room claims up to two characters base64 does not have for an image of 3k+1 bytes, which at a margin the budget now spends exactly is a dropped frame. The two agree at today's envelope size because the room happens to divide by four, so this is a latent fix rather than a reproduced one, and the test pins the discrepancy directly instead of implying it. Budget moves from 901,271 to 901,161 pixels; the phone's mobile view stays at a device scale factor of 1.80. Pinning the bound against C6.1's real encoder is C6.5's, once both are on main; the docstring says so, and says what the bound does not cover: the metadata object is loose, so unknown keys and web view mode's letterboxed frame are ruling 1's to drop rather than this budget's to predict. Also: the pane census listed its own closure by hand, so "no unresolved styles" said the walk read those files, not that they are the pane's set. It now scans `src/browser` for every non-test module that renders a `TextInput` and asserts the list matches; a third module planted there reds it. And the seam's native-consumer pin names the key row and the address bar directly rather than transitively, matched at the `fontSize` property instead of anywhere in the file — a file-wide search survives the change, because the import line does. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…mage (OTA phase C, C6.2) Round 2 folds on #21754. Every test for the web paint sibling handed it a `div > div` of its own making, so the assumption it rests on — that the host's first element child is the one carrying the frame — was only ever checked against a shape written to match it. React Native Web also renders an accessibility `<img>` in there, and a release that reorders those children would keep all of them green while the pane painted nothing. One test now renders the real component, asks it which child it painted, and checks the write lands on that one. Pointing the sibling at `lastElementChild` reds it and leaves the hand-built cases passing, which is the gap. A second case records what the `<img>` does: the streaming path writes styles and never props, so it keeps the source it mounted with for the life of the pane, and that is what a screen reader and the image context menu see. react-native-web ships no type declarations, so the component comes through `createRequire`, whose return is `any` at its own signature; the one prop it renders with is declared rather than asserted, and the file stays inside the tests-typecheck ratchet. The module docstring also claimed more than the code does. The frame path adds no render, but a render from any of the pane's other state — address focus, a dialog, the view mode, zoom — repaints both layers from `renderedFrameSource`, which reads `frameUriRef.current`, so both land on the newest frame whether or not it has decoded. Native clobbers the same way through `setNativeProps`. Said plainly, along with what restores the buffering. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Stacked on the C6.2 branch, so its folds come forward or a squash-merge of C6.2 would see a child putting them back. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…phase C, C6.2) pullfrog is right, and the test carried the same wrong claim. The note said the hidden `<img>` keeps the frame it mounted with for the life of the pane, two paragraphs after saying a render from the pane's other state passes `renderedFrameSource` as `source` — and React Native Web derives that image's `src` from the same prop it paints the background from, so the first such render moves it. Measured here rather than reasoned about: rendering the real component, writing a frame imperatively, then re-rendering with a new source moves the `src` and leaves the background where the imperative write put it. The two halves are now two cases, named for what each one shows, and the note says the streaming writes never touch it while a render does — so it holds the frame the pane last rendered with, not the one on screen. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
C6.2 is on main as one squashed commit; this branch carries the same hunks as the commits it was stacked on, so the merge is a no-op for that content and this only moves the base. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb # Conflicts: # mobile/web-entry/web-overrides.json
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This is the first pullfrog review on this PR; the full delta against ota-c6-2-frame-path (17 files) was read end-to-end, and the tests, mobile typecheck, and tests-typecheck ratchet were run locally.
- Budgeted the mobile view's frame area against the bridge cap.
browser-screencast-request.web.tsderives the mobile view'sdeviceScaleFactorfromBRIDGE_MAX_MESSAGE_BYTESless a measured envelope bound, spends base64 in whole 4-character groups, and divides by a worst-case bytes-per-pixel constant; web view mode is left byte-identical to native. - Put the pane's text inputs on the platform seam. The key-row input binds
TEXT_INPUT_FONT_SIZEdirectly (native body size, byte-identical), and the address bar becomes a native/web style split that keeps 12px natively and raises input plus overlaid label to 16/20 on web, withinputMode="url"on web only. - Extracted the shared request constants and assembly into
browser-screencast-request-parameters.tsso the.web.tssibling can reuse them, and exportedMETADATA_KEYSso the budget sizes the envelope from the protocol list rather than a copy. - Taught the C4.2 census to read the file the page runs.
resolveLocalnow tries.web.tsx/.web.tsahead of.tsx/.ts(the builder's own order), andmoduleIdentitycollapses a resolved path onto its module identity so the split seam still counts as the seam. The false-pass direction is covered by a planted.web-off-seam case. - Added a hand-run pane census with a presence precondition that scans
src/browserfor everyTextInput-rendering module, plus the twoweb-overrides.jsonentries for the new.web.tsfiles.
Verified externally this run: the builder resolves .web.tsx/.web.ts first (config/scripts/build-mobile-web-app-bundle.mjs:184); RN 0.83.10's TextInputProps declares inputMode with documented precedence over keyboardType; react-native-web 0.21.2 honors inputMode ahead of keyboardType; and the host applies the page's deviceScaleFactor verbatim (browser-screencast-device-metrics.ts:37), so the budget reaches CDP.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
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)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change adds text-input census coverage for the mobile browser pane and platform-aware resolution for
Priority: ➖ Normal 🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 44.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 67 functions across 35 files. (1 skipped: 1 unsupported.) Full details: Description checkExplanation The description provides extensive technical context and testing details, but it does not follow the repository template. It omits the required ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, AI Disclosure, Review, Notes, and Checklist sections. Resolution Rework the description using the repository template. Add the required sections and include a linked issue using
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: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: f5a838fe-c27c-4acd-8a90-0d7a3a842313
📒 Files selected for processing (36)
config/scripts/mobile-web-app-browser-pane-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/browser/MobileBrowserAddressField.test.tsxmobile/src/browser/MobileBrowserAddressField.tsxmobile/src/browser/MobileBrowserPane.tsxmobile/src/browser/browser-address-field-base-styles.tsmobile/src/browser/browser-address-field-styles.tsmobile/src/browser/browser-address-field-styles.web.test.tsmobile/src/browser/browser-address-field-styles.web.tsmobile/src/browser/browser-frame-data-uri.tsmobile/src/browser/browser-frame-data-uri.web.test.tsmobile/src/browser/browser-frame-data-uri.web.tsmobile/src/browser/browser-frame-layer-flip.tsmobile/src/browser/browser-frame-layer-paint.tsmobile/src/browser/browser-frame-layer-paint.web.test.tsmobile/src/browser/browser-frame-layer-paint.web.tsmobile/src/browser/browser-screencast-request-parameters.tsmobile/src/browser/browser-screencast-request.tsmobile/src/browser/browser-screencast-request.web.test.tsmobile/src/browser/browser-screencast-request.web.tsmobile/src/browser/mobile-browser-frame-state.tsmobile/src/browser/mobile-browser-frameless-stream.test.tsxmobile/src/browser/mobile-browser-pane-styles.tsmobile/src/browser/use-browser-binary-screencast-grant.tsmobile/src/browser/use-browser-binary-screencast-grant.web.test.tsxmobile/src/browser/use-browser-binary-screencast-grant.web.tsmobile/src/browser/use-mobile-browser-frame-apply.tsmobile/src/browser/use-mobile-browser-frame-apply.web.test.tsxmobile/src/browser/use-mobile-browser-pane-layers.tsmobile/src/browser/use-mobile-browser-stream.tsmobile/src/mobile-web-shell/bridge/bridge-rpc-client-frames.test.tsmobile/src/mobile-web-shell/bridge/bridge-screencast-binary.tsmobile/src/platform/text-input-font-size.test.tsmobile/src/transport/browser-screencast-protocol.tsmobile/web-entry/web-overrides.json
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.
| const surface = host.firstElementChild | ||
| const target = surface instanceof HTMLElement ? surface : host | ||
| // A data URI is base64 and a scheme, so it carries no quote to escape. | ||
| target.style.backgroundImage = `url("${uri}")` |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,130p' mobile/src/browser/browser-frame-layer-paint.web.ts
rg -n "frameUriRef|browserImageRefs|useMobileBrowserPaneLayers|<Image|accessib|importantForAccessibility|alt=" mobile/src/browser/MobileBrowserPane.tsx mobile/src/browser/use-mobile-browser-pane-layers.ts mobile/src/browser/use-mobile-browser-frame-apply.ts mobile/src/browser/browser-frame-layer-paint.web.test.ts
sed -n '125,248p' mobile/src/browser/browser-frame-layer-paint.web.test.tsRepository: stablyai/orca
Length of output: 12412
🏁 Script executed:
sed -n '300,390p' mobile/src/browser/MobileBrowserPane.tsx
sed -n '1,125p' mobile/src/browser/use-mobile-browser-frame-apply.ts
sed -n '1,90p' mobile/src/browser/use-mobile-browser-pane-layers.ts
rg -n -C 6 "renderedFrameSource|browserImageRefs|accessib|importantForAccessibility|accessibilityLabel|alt=|source=" mobile/src/browser/MobileBrowserPane.tsx mobile/src/browser/*.tsxRepository: stablyai/orca
Length of output: 34995
🏁 Script executed:
sed -n '145,242p' mobile/src/browser/MobileBrowserPaneView.tsx
rg -n -C 5 "browserImage|hidden|accessib|Image" mobile/src/browser/mobile-browser-pane-styles.ts mobile/package.json package.json pnpm-lock.yaml yarn.lock package-lock.json 2>/dev/null
rg -n "react-native-web" --glob 'package.json' --glob '*lock*' --glob '*.ts' --glob '*.tsx' .Repository: stablyai/orca
Length of output: 37028
🌐 Web query:
react-native-web Image component hidden img accessibilityLabel alt source background-image implementation exact version
💡 Result:
<search_synthesis>
In react-native-web, the Image component is implemented to ensure both visual rendering and accessibility compliance [1][2]. Because the component historically relied on CSS background-image for layout (to support features like object-fit/cover), it renders a hidden <img> element alongside the visible container to provide accessibility and browser-native functionality (such as the ability to save the image or trigger context menus) [3][4][2]. Implementation Details: - Visible Rendering: The image is typically displayed using a container element (often a div) with a background-image property [3][2]. - Hidden Accessibility Element: A hidden <img> tag is rendered within the component [5][3][2]. This element is styled to be invisible (e.g., opacity: 0, position: absolute, or similar CSS to remove it from the visual flow) while remaining accessible to screen readers and browser tools [2]. - Accessibility Labeling: The accessibilityLabel prop provided to the React Native Image component is mapped to the alt attribute of this hidden <img> element [5][6]. If no accessibilityLabel is provided, the component typically defaults to an empty alt attribute (alt="") to prevent screen readers from announcing the image as an unlabeled graphic [5][3]. Key Considerations: - Accessibility: You should use the accessibilityLabel prop to provide descriptive text for images [6]. This ensures the hidden <img> tag receives the correct alt text [5]. - CSS Overrides: Because the hidden <img> tag is managed internally by react-native-web, attempting to override its styles (such as position or visibility) can break the component's layout or accessibility behavior [2]. - Evolution: While older versions of react-native-web relied heavily on the background-image approach, the library has explored and implemented modern alternatives (such as using the native <img> tag directly with object-fit) to simplify the implementation and improve performance [4][7]. There is no single "exact version" where this implementation is static, as the library has undergone iterative changes to its internal rendering logic to balance compatibility with modern web standards [4][7]. You should always rely on the official accessibilityLabel prop rather than attempting to manipulate the underlying DOM structure directly [1][8].
</search_synthesis>
<source_evidence>
Citations:
- 1: https://necolas.github.io/react-native-web/docs/image/
- 2: https://stackoverflow.com/questions/61834378/how-to-override-react-native-web-pre-defined-css
- 3: https://cdn.jsdelivr.net/npm/[email protected]/src/Image/index.tsx
- 4: GitHub pull request 2207 in necolas/react-native-web (link omitted to avoid creating a cross-reference)
- 5: GitHub issue 1636 in necolas/react-native-web (link omitted to avoid creating a cross-reference)
- 6: GitHub issue 1002 in necolas/react-native-web (link omitted to avoid creating a cross-reference)
- 7: GitHub issue 1786 in necolas/react-native-web (link omitted to avoid creating a cross-reference)
- 8: https://necolas.github.io/react-native-web/docs/accessibility/
🌐 Web query:
react-native-web 0.21.2 Image source hidden img alt accessibilityImage implementation GitHub
💡 Result:
<search_synthesis>
In react-native-web version 0.21.2, the Image component handles accessibility and the underlying HTML img element's alt attribute primarily through the accessibilityLabel prop [1][2][3]. When you provide an accessibilityLabel to an Image component, react-native-web maps this value to the alt attribute of the rendered hidden img element [1]. This ensures that screen readers and other assistive technologies receive the appropriate text description [2]. Historically, there have been issues regarding the automatic setting of the alt attribute [1][3]. Specifically, in some versions, the library would default to setting an empty alt attribute (alt="") on the hidden img element if no accessibilityLabel was provided, which could interfere with browser-level accessibility features [1]. Recent updates, including those leading up to and within the 0.21.x release cycle, have included fixes to ensure that alt text is correctly applied and that accessibility props are handled consistently [4][5][3]. Key points regarding this implementation: - accessibilityLabel: This is the standard React Native prop used to define the alternative text for the image [2][6]. - Underlying DOM: The Image component renders a container (typically a View/div) and a hidden img element [1]. The accessibilityLabel is used to populate the alt attribute of this img element [1]. - Version 0.21.2: This version includes specific fixes related to alt text on the Image component [4][7], addressing previous regressions where accessibility labels were not correctly propagating to the underlying HTML attributes [3]. If you are experiencing issues with accessibility labels not appearing as expected, ensure you are using the accessibilityLabel prop rather than an alt prop, as the latter is not a standard React Native Image prop and may not be supported or correctly passed through to the DOM [8][3].
</search_synthesis>
<source_evidence>
Citations:
- 1: GitHub issue 1636 in necolas/react-native-web (link omitted to avoid creating a cross-reference)
- 2: https://necolas.github.io/react-native-web/docs/accessibility/
- 3: GitHub issue 2665 in necolas/react-native-web (link omitted to avoid creating a cross-reference)
- 4: necolas/react-native-web@0.19.10...0.21.2
- 5: necolas/react-native-web@0.19.10...0.21.0
- 6: https://github.com/brainee/react-native-web/blob/4cf4905fc25fd5500338386abd5a05abdbd8a8f8/docs/components/Image.md
- 7: https://github.com/necolas/react-native-web/releases/tag/0.21.2
- 8: GitHub issue 1002 in necolas/react-native-web (link omitted to avoid creating a cross-reference)
Keep React Native Web's hidden image synchronized with the painted frame.
The streaming path updates only backgroundImage, so React Native Web's adjacent <img> keeps the last React-rendered URI. Browser-native image actions can therefore use a stale frame during ordinary streaming. Update the hidden image source with the same URI. The pane provides no accessibilityLabel, so do not rely on this element as meaningful screen-reader content.
| const viewportArea = Math.round(layout.width) * Math.round(layout.height) | ||
| const budgeted = Math.sqrt(mobileBrowserFrameAreaBudget() / viewportArea) | ||
| return Math.max(1, Math.min(MOBILE_VIEW_DEVICE_SCALE_FACTOR, Math.floor(budgeted * 100) / 100)) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
set -eu
printf '%s\n' '--- candidate file ---'
cat -n mobile/src/browser/browser-screencast-request.web.ts | sed -n '1,180p'
printf '%s\n' '--- relevant symbols and encoder references ---'
rg -n -S 'mobileBrowserFrameAreaBudget|MOBILE_VIEW_DEVICE_SCALE_FACTOR|viewportArea|screencast|encode|JPEG|jpeg|width.*height|height.*width' mobile/src/browser mobile/src | head -250
printf '%s\n' '--- candidate files ---'
git ls-files | rg '(^|/)(.*screencast.*|.*browser.*|.*jpeg.*|.*encoder.*)' | head -200Repository: stablyai/orca
Length of output: 49617
🤖 get_repo_knowledge executed:
get_repo_knowledge stablyai/orca /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings
Length of output: 22679
🏁 Script executed:
set -eu
cat -n mobile/src/browser/browser-screencast-request.web.ts | sed -n '1,180p'
rg -n -S 'mobileBrowserFrameAreaBudget|MOBILE_VIEW_DEVICE_SCALE_FACTOR|viewportArea|screencast|encode|JPEG|jpeg' mobile/src | head -250
git ls-files | rg '(^|/)(.*screencast.*|.*browser.*|.*jpeg.*|.*encoder.*)' | head -200Repository: stablyai/orca
Length of output: 50369
🤖 get_repo_knowledge executed:
get_repo_knowledge stablyai/orca /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings
Length of output: 20685
🏁 Script executed:
pwd
git status --short
wc -l mobile/src/browser/browser-screencast-request.web.ts
sed -n '90,135p' mobile/src/browser/browser-screencast-request.web.tsRepository: stablyai/orca
Length of output: 2448
🏁 Script executed:
set -eu
printf '%s\n' '--- request parameters ---'
cat -n mobile/src/browser/browser-screencast-request-parameters.ts | sed -n '1,110p'
printf '%s\n' '--- binary bridge ---'
cat -n mobile/src/mobile-web-shell/bridge/bridge-screencast-binary.ts | sed -n '1,180p'
printf '%s\n' '--- frame protocol ---'
cat -n mobile/src/transport/browser-screencast-protocol.ts | sed -n '1,120p'
printf '%s\n' '--- direct producer/encoder candidates ---'
rg -l -S 'Page.captureScreenshot|screencastFrame|Screenshot|screenshot|jpegQuality|quality.*72|browser.screencast' src mobile config --glob '*.ts' --glob '*.tsx' --glob '*.mjs' | sort | head -120Repository: stablyai/orca
Length of output: 16580
🏁 Script executed:
set -eu
rg -n -S 'Page\.captureScreenshot|screencastFrame|browser\.screencast|captureScreenshot|deviceScaleFactor|scale' src/main mobile/src --glob '*.ts' --glob '*.tsx' | head -180
printf '%s\n' '--- browser frame data URI ---'
cat -n mobile/src/browser/browser-frame-data-uri.web.ts
printf '%s\n' '--- bridge screencast binary ---'
cat -n mobile/src/mobile-web-shell/bridge/bridge-screencast-binary.ts
printf '%s\n' '--- request parameters ---'
cat -n mobile/src/browser/browser-screencast-request-parameters.tsRepository: stablyai/orca
Length of output: 29598
🏁 Script executed:
set -eu
printf '%s\n' '--- runtime screencast controller ---'
if [ -f src/main/runtime/runtime-browser-screencast-controller.ts ]; then
cat -n src/main/runtime/runtime-browser-screencast-controller.ts | sed -n '1,260p'
else
printf '%s\n' 'runtime controller implementation not present at expected path'
fi
printf '%s\n' '--- bridge decoder ---'
cat -n mobile/src/mobile-web-shell/bridge/bridge-screencast-binary.ts | sed -n '1,180p'
printf '%s\n' '--- frame URI web path ---'
cat -n mobile/src/browser/browser-frame-data-uri.web.ts | sed -n '1,100p'Repository: stablyai/orca
Length of output: 12138
🏁 Script executed:
set -eu
printf '%s\n' '--- producer outlines ---'
ast-grep outline src/main/browser/browser-screencast-stream.ts
ast-grep outline src/main/browser/browser-screencast-image-size.ts
ast-grep outline src/main/browser/browser-screencast-frame-budget.ts
ast-grep outline src/main/browser/browser-screencast-cdp-events.ts
printf '%s\n' '--- producer source ---'
cat -n src/main/browser/browser-screencast-image-size.ts
cat -n src/main/browser/browser-screencast-stream.ts | sed -n '1,300p'
cat -n src/main/browser/browser-screencast-frame-budget.ts | sed -n '1,260p'
cat -n src/main/browser/browser-screencast-cdp-events.ts | sed -n '1,220p'
printf '%s\n' '--- relevant tests ---'
cat -n src/main/browser/browser-screencast-snapshot-scaling.test.ts | sed -n '1,240p'Repository: stablyai/orca
Length of output: 20841
🏁 Script executed:
set -eu
printf '%s\n' '--- snapshot capture ---'
cat -n src/main/browser/browser-screencast-snapshot-capture.ts | sed -n '1,300p'
printf '%s\n' '--- device metrics ---'
cat -n src/main/browser/browser-screencast-device-metrics.ts | sed -n '1,240p'
printf '%s\n' '--- stream types ---'
cat -n src/main/browser/browser-screencast-stream-types.ts | sed -n '1,240p'
printf '%s\n' '--- viewport fit ---'
cat -n src/main/browser/browser-screencast-viewport-fit.ts | sed -n '1,220p'
printf '%s\n' '--- frame metadata ---'
cat -n src/main/browser/browser-screencast-frame-metadata.ts | sed -n '1,220p'Repository: stablyai/orca
Length of output: 18367
🏁 Script executed:
set -eu
printf '%s\n' '--- mobile stream request call ---'
rg -n -C 8 'buildMobileBrowserScreencastRequest|pixelRatio|PixelRatio|get\(' mobile/src/browser/use-mobile-browser-stream.ts mobile/src/browser/MobileBrowserPane.tsx mobile/src/browser/MobileBrowserPaneView.tsx mobile/src/browser --glob '*.ts' --glob '*.tsx' | head -240
printf '%s\n' '--- exact stream hook sections ---'
cat -n mobile/src/browser/use-mobile-browser-stream.ts | sed -n '170,270p'
cat -n mobile/src/browser/MobileBrowserPane.tsx | sed -n '200,250p'Repository: stablyai/orca
Length of output: 27981
Budget against per-axis rounded dimensions. The mobile stream passes PixelRatio.get() as the stream scale and sends a separate fractional deviceScaleFactor. The producer accepts DPR-sized frames whose dimensions are rounded per axis, so the continuous viewportArea * scale² calculation can exceed the bridge budget. For example, 1.01 produces 998 × 903 = 901,194 pixels for a 988 × 894 viewport, above the stated 901,161-pixel budget. Calculate the candidate area from the effective integer output dimensions, including maxWidth and maxHeight, before accepting the scale.
| frameUriRef.current = nextFrameUri | ||
| pendingFrameLayerRef.current = nextLayer | ||
| updateBrowserImageSource(browserImageRefs.current[nextLayer], nextFrameUri) | ||
| armFrameLayerFlip(nextLayer, nextFrameUri) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,150p' mobile/src/browser/use-mobile-browser-frame-apply.ts
sed -n '150,270p' mobile/src/browser/MobileBrowserPane.tsx
sed -n '1,130p' mobile/src/browser/use-mobile-browser-pane-layers.ts
rg -n "frameUriRef|browserFrameUri|browserImage|source={{|source=" mobile/src/browserRepository: stablyai/orca
Length of output: 14279
🏁 Script executed:
set -e
rg -n -C 8 'frameUriRef|frameLayerRef|Image|source=|useMobileBrowserPaneLayers|useMobileBrowserFrameApply' mobile/src/browser/MobileBrowserPane.tsx
rg -n -C 5 'frameUriRef|source=|updateBrowserImageSource|setBrowserImageRef' mobile/src/browser -g '*.ts' -g '*.tsx'
cat -n mobile/src/browser/browser-frame-layer-flip.ts
cat -n mobile/src/browser/browser-frame-layer-paint.tsRepository: stablyai/orca
Length of output: 47730
Keep the pending frame URI out of the visible layer’s declarative source.
frameUriRef.current changes before settleBrowserFrameLayer runs. An unrelated render then passes that URI as source to both Image layers. This can replace the visible layer’s settled source before decode completes and bypass decode-gated double buffering. Store the source per layer, or keep the visible source unchanged until settlement.
The two C6.1 screencast pins now expect the base64 C6.2's decoder carries. Nothing on this branch touched those files; this only moves the base. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

Summary
Phase C, C6.3 + C6.4: the browser pane's request budget and text inputs on the web (
design-ota-c6.md§1 (b), §2; rulingsrulings-ota-c6.md2 and 6). Was stacked on #21754 (C6.2, now merged as6f0fb3fe39) because both append toweb-entry/web-overrides.json, whose census demands an exact match with the.web.*files on disk; retargeted to main, with main merged in twice (the second merge carrying #21769, the test-only fix for the semantic merge of C6.1's exact frame pins with C6.2'sb64, which this lane found). Inert: no route reaches the pane, native byte-identical where stated.3f562b626e,3faba56c4dorigin/mainat4e9d5b577e(the pin fix) and6f0fb3fe39(C6.2's squash; one conflict in the overrides list, both sides kept after checking the twenty shared entries byte-identical)b310813050,ff28f973bb8917dd8280and0d9d5feaeb(its pullfrog note and round-2 fold)5949c4fc84-0.0000012345678901234567; a four-million-pattern sweep found nothing longer), so the margin on a frame exactly on budget was one byte; the bound is now 516 B with the nine metadata keys imported from the protocol module, and the base64 room is taken in whole groups (floor(available / 4) * 3, pinned against the 3/4 ratio's over-claim at 3k+1 bytes). Budget 901,271 → 901,161 px; the phone stays at scale 1.80 (654,286 B, 99.8% of the cap). The pane census gains a presence precondition (every non-test module undersrc/browserrendering aTextInputmust be in its list; a planted third module reds it). The native seam pin names the key row and the address field, and its source check now matchesfontSize: TEXT_INPUT_FONT_SIZEat the property rather than anywhere in the file, which the file-wide form let a surviving import satisfycf50a84eef.ts/.tsxonly, never.web.ts, so it read the native address style no browser loads (found here: the pane's.web.tsstyle split would have been reported as the native file's offence once C7 lists a route mounting the pane).resolveLocalnow tries.web.tsx,.web.ts,.tsx,.tsthen the index forms, the builder's own order, and the seam comparison collapses a resolved path onto its module identity because the seam is itself a split. Red-first three ways: the pane census flipped to expect no offenders; two scratch-tree cases in the seam suite, one read through its.websibling and one where the.webhalf is the one off the seam (the false-pass direction); deleting only the seam collapse reds five cases including both C4 route closures. Both C4 closures still answer 0 offenders / 0 unresolved and still carry the seama5090a7a18,d1cf88a101TextInputtype (first by its placeholder ind1cf88a101, then by the type);findByType('TextInput')did not typecheck and the file had dropped out of the tests-typecheck ratchet (the lane's first gate report read the exit off a pipe ending intail)9228c43cf0,09f9193869a7bafab6acTEXT_INPUT_FONT_SIZE(the native seam is the theme's body size, so byte-identical); the address bar is a.web.tsstyle split (browser-address-field-styles.web.ts: native keeps 12 px, web 16 px with line height 20, the overlaid file label following so focus does not resize the address);inputMode="url"on the web only (it takes precedence overkeyboardType, soundefinedeverywhere else)cae2d38e79browser-screencast-request.web.tsapplies the mobile-mode area budget, derived and never typed:BRIDGE_MAX_MESSAGE_BYTESless the binary event's envelope bound (first measured at 435 B from the event's shape; 516 B after round 1 made it a true upper bound), the base64 room taken in whole groups, overWORST_CASE_JPEG_BYTES_PER_PIXEL = 0.545(random noise at quality 72, in its docstring) = 901,161 px (901,271 at the first envelope figure). The rows above are recomputed from the landed code: a frame exactly on budget encodes to exactly the cap, margin 0 by design. The constants and the request assembly move tobrowser-screencast-request-parameters.tsbecause a.web.tscannot import a value from the file it shadows. Web view mode is byte-identical to native, assertedMeasured (phone 390×712, mobile view mode)
A tablet (834×1112) floors at scale 1: below it the page would ask for fewer device pixels than CSS pixels, and ruling 1's drop rule (#21758) covers what still does not fit. Web view mode gets no budget: the frame is the desktop's viewport letterboxed into the request's bounds, which the page cannot predict.
Not in this PR
Verified
cf50a84eef: mobile tsc, ratchet (732 files), whole-tree oxlint, oxfmt, root oxlint and oxfmt on the changed files, full mobile suite (736 files, 8289 passed, noErrorsline), config/scripts with mobile deps required (224 files, 2059 passed), changed-code quality (34 files, 0 findings) and react-doctor againstorigin/main, merge-tree max-lines clean, machine-path grep clean.cf50a84eef): no blockers; every number reproduced (halving the cap moves the budget with it; the native request byte-identical across 1,152 layouts); its notes are5949c4fc84.3f562b626e): ship; every number reproduced (a realevent.binarywith nine 25-character doubles is 510 B against the 516 B bound; 5,215,743 layout cases byte-identical natively; every mutation red as claimed; the five registered route closures hold zerosrc/browsermodules); its two findings were this body's stale rows, corrected above.verify-gates.shoncf50a84eefand5949c4fc84against1bdda61add, onff28f973bbagainst0d9d5feaeb, and on3f562b626eagainst main4e9d5b577e(mobile 736/8289, 736/8294, 736/8296 and 739/8335, config 2059, 2061, 2061 and 2061, all exit 0, machine paths 0; the diff against main is the 17 C6.3+C6.4 files); on5949c4fc84, a planted thirdTextInputmodule undersrc/browserreds the pane census's presence case; ona7bafab6acthe ratchet was red as the lane later reported (theTextInputstring), green froma5090a7a18.Part of the mobile OTA plan (Phase C). Reference PR #13386, never merged.