Skip to content

iOS app: inline-vis pages stay blank because the shell WebView blocks about:srcdoc frames #5986

Closed

Description

@Willhong

Summary

In the iOS app, every inline-vis page in an assistant message is a blank 224px area with only the source/expand buttons over it. Fenced ```inline-vis blocks and ::inline-vis{…} directives are both affected, even a static <div>. The same messages render in the desktop and web apps, and the expand button opens the page in the sidebar where it shows.

Versions and environment

  • iOS app 0.39.0 (75), TestFlight nightly dated 2026-10-21, on an iPhone, dark appearance
  • Reproduced in the iOS Simulator (iPhone 17 Pro, iOS 26.4) with a Release build of apps/mobile from source at 5b34962ab6de5644ae66b062f065d13e71593025 (npx expo run:ios --configuration Release --no-bundler), Direct server http://127.0.0.1:38886
  • react-native-webview 13.16.1. The relevant files are unchanged on main at d1627a4.

Steps to reproduce

  1. Open the bb iOS app and connect it to a bb server.

  2. In any thread, have the agent reply with:

    ```inline-vis
    <div style="padding:12px;border:2px solid #d97706;border-radius:8px">probe</div>
    ```
    
  3. Open that thread in the iOS app.

Expected vs actual

Expected: the orange "probe" box inside the message, as on desktop and web.
Actual:   an empty area 224px tall (FRAME_HEIGHT_BEFORE_FIRST_REPORT) with the source button in its top-right corner. The frame never reports a height, so the page never loads.

Evidence

Cause: ProfileWebViewScreen does not pass originWhitelist, so react-native-webview uses its default ['http://*', 'https://*'] (plus about:blank). inline-vis renders into <iframe srcDoc>, which navigates to about:srcdoc. react-native-webview cancels a load that misses the whitelist before it calls the app's onShouldStartLoadWithRequest, so the about: / blob: / data: subframe allowance added in #5508 is never reached.

  • iframe:
    srcDoc={srcDoc}
  • WebView props, no originWhitelist:
    sharedCookiesEnabled
    javaScriptEnabled
    domStorageEnabled
    allowsInlineMediaPlayback
    mediaPlaybackRequiresUserAction={false}
    mediaCapturePermissionGrantType="grant"
    hideKeyboardAccessoryView
    allowsBackForwardNavigationGestures={false}
    bounces={false}
    pullToRefreshEnabled={false}
    automaticallyAdjustContentInsets={false}
    contentInsetAdjustmentBehavior="never"
    webviewDebuggingEnabled={__DEV__}
    injectedJavaScriptBeforeContentLoaded={buildBridgeInjectionScript(
    handshake,
    )}
    onMessage={(event) => {
    canGoBack.current = event.nativeEvent.canGoBack;
    bridge.onMessage(event);
    }}
    onShouldStartLoadWithRequest={(request) => {
    if (
    request.isTopFrame === false &&
    allowsSubframeLoad(request.url, profile.serverUrl)
    ) {
    return true;
    }
    if (isShellNavigation(request.url, profile.serverUrl)) return true;
  • subframe allowance:
    const SUBFRAME_LOCAL_PROTOCOLS = new Set(["about:", "blob:", "data:"]);
    export function allowsSubframeLoad(url: string, serverUrl: string): boolean {
    let target: URL;
    try {
    target = new URL(url);
    } catch {
    return false;
    }
    if (SUBFRAME_LOCAL_PROTOCOLS.has(target.protocol)) return true;
    return resolveServerFileUrl(url, serverUrl) !== null;
    }
  • react-native-webview 13.16.1 src/WebViewShared.tsx: default whitelist at line 20, the whitelist check that cancels before the app callback at line 53

Confirmed fix: with originWhitelist={["http://*", "https://*", "about:*", "blob:*", "data:*"]} on the shell WebView, the same simulator Release build renders the inline-vis page inside the message. A PR follows.

Found in bb thread thr_m4g4n38gyp while building an inline status panel for a skill.

What you ruled out

  • Not the bb version on the phone: build 75 includes Handle iOS file downloads with WebKit’s native download API #5508 (2026-10-14), and the simulator build from source reproduces it.
  • Not the page content: a static <div>, a full-page background, transform:translateZ(0), a timer that repaints, and inline <svg> all stay blank.
  • Not WebKit itself or the mobile web layout: iOS Simulator and Playwright WebKit with iPhone emulation render the same thread through the web app.
  • Searched open and closed issues and PRs for originWhitelist, srcdoc, inline-vis iOS, inline-vis mobile. Lock the mobile shell viewport scale #5432 edits the same file but not the whitelist.

Suggested priority and effort

Medium. Every inline-vis page is invisible in the iOS app. The expand button works around it. Effort low, a one-prop change.

Also seen: the expanded view opens the raw file without the theme variables, so pages styled only with them fall back to light colours in dark mode. Separate from this bug.

AGENT GENERATED

Activity

  1. added theissue type on Oct 21, 2026
  2. added
    mobile
    inline-vis
    partial-repro
    on Oct 21, 2026
  3. bb-slop-cop commented on Oct 21, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority Medium · Effort Low; labels mobile, inline-vis.
    • Reproduction and root-cause report: PARTIALLY REPRODUCED, with high confidence in the JavaScript gate mechanism. Reproduction label: partial-repro.
    • Root cause: the installed WebView's default whitelist rejects local-document subframes before the shell's navigation callback can allow them.
    • Evidence: two clean trusted-main checkouts each reproduce three failing local-subframe cases; controls pass. All 341 existing mobile tests pass. Native iOS rendering remains unverified because this host cannot run iOS Simulator.
    • No new PR: linked Let inline-vis frames load in the iOS shell WebView #5988 is already open. The report also flags same-origin top-frame blob admission for navigation-boundary review before broadening the gate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    inline-vismobilepartial-repro

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions