#7989 · Native shell page-scale configuration
Trusted main: 35a03bbbb3f4d8dc814c1a152db5a463102b4250.
Verdict: PARTIALLY REPRODUCED · Root-cause confidence: medium · Reproduction label: partial-repro.
1. TL;DR
The reported symptom is accidental magnification of the native app's embedded web interface. Two clean checkouts confirm that the shell passes no explicit page-zoom restriction to its WebView, the actual app document specifies an initial scale but no maximum scale, and the initialization bridge does not access the document or register a window event listener. These findings support a missing native-shell zoom policy as a probable cause, not a demonstrated WKWebView gesture failure. This Linux host has no iOS simulator or device, so neither pinch nor double-tap was exercised and no screenshot is available. No fix PR is safe under the autopilot requirements because a native behavioral reproduction and failing regression test are still missing.
2. Claims vs findings
| Claim | Status | Evidence |
|---|---|---|
| The main shell does not explicitly disable page zoom. | Verified configuration | The JSX attribute inventory below contains no zoom control; the wrapper forwards those props directly to WebView. |
| The embedded page's viewport leaves zoom unrestricted. | Verified configuration | apps/app/index.html contains initial-scale=1.0 with no maximum-scale or user-scalable directive. |
| The marketing website root determines the native shell's viewport. | Evidence corrected | The shell builds a URL on the paired server. Its app document is apps/app/index.html, not the separately rendered marketing root in apps/web. |
| Pinch and double-tap actually magnify the iOS shell. | Unverified | No WKWebView execution or physical/simulator gesture was possible on this host. Initial scale is not a runtime scale lock. |
| Android also enables zoom by default. | Dependency configuration verified; gesture unverified | Installed react-native-webview 14.0.1 defaults setBuiltInZoomControls to true in its Android wrapper. This is not an iOS control. |
| All double-taps zoom all targets. | Unverified / overbroad | The app sets touch-action: manipulation on controls; the exact target and native recognizer behavior must be tested. |
3. Environment
- Public target repository: get-bb/bb; trusted origin/main was fetched from the target repository and remained at the recorded base during the investigation.
- Linux; Node 22.19.0; pnpm 9.15.0; React Native 0.88.1; Expo ~58.0.23; react-native-webview 14.0.1.
- Two separate clean temporary clones, named
baseandverification, detached at the same full SHA. Both had frozen installs; both remained free of tracked modifications. - No iOS runtime, xcrun, Android emulator/adb, or Maestro executable was available. No provider, account, real user runtime data, server process, data directory, or network listener was used.
- Native app compilation was not attempted on Linux. The scoped Turbo prerequisite build succeeded; this is not an iOS build.
4. Minimal repeatable configuration audit
This diagnostic inventories source configuration and runs the actual bridge initializer in a Node VM. It does not emulate WKWebView, synthesize a native pinch, measure a visual viewport, or constitute a failing behavioral regression test. No source-grep test or production change is proposed for landing.
- Save the complete diagnostic below as
config-audit.mjsoutside the checkout. - Prepare a clean trusted checkout and dependencies, then run it:
git clone https://github.com/get-bb/bb.git base cd base git checkout --detach 35a03bbbb3f4d8dc814c1a152db5a463102b4250 pnpm install --frozen-lockfile --prefer-offline pnpm exec turbo run build --filter=@bb/mobile node --import ./node_modules/tsx/dist/loader.mjs ../config-audit.mjs .
- Expected for an explicitly fixed-scale native shell: an effective native-only policy that prevents gesture scaling without changing normal-browser accessibility. Observed configuration: no zoom-control prop, no viewport scale cap, no document access or window listener during actual bridge initialization.
Complete diagnostic
import { readFileSync } from "node:fs";
import { createRequire } from "node:module";
import { resolve } from "node:path";
import { pathToFileURL } from "node:url";
import { execFileSync } from "node:child_process";
import { runInNewContext } from "node:vm";
const checkout = resolve(process.argv[2] ?? ".");
const require = createRequire(resolve(checkout, "apps/mobile/package.json"));
const typescript = require("typescript");
const screenPath = "apps/mobile/src/screens/webview/ProfileWebViewScreen.tsx";
const screenSource = readFileSync(resolve(checkout, screenPath), "utf8");
const screen = typescript.createSourceFile(
screenPath,
screenSource,
typescript.ScriptTarget.Latest,
true,
typescript.ScriptKind.TSX,
);
const views = [];
function visit(node) {
if (
(typescript.isJsxSelfClosingElement(node) ||
typescript.isJsxOpeningElement(node)) &&
["ShellWebView", "WebView"].includes(node.tagName.getText(screen))
) {
views.push({
component: node.tagName.getText(screen),
line: screen.getLineAndCharacterOfPosition(node.getStart()).line + 1,
attributes: node.attributes.properties.map((attribute) =>
typescript.isJsxSpreadAttribute(attribute)
? `...${attribute.expression.getText(screen)}`
: attribute.name.getText(screen),
),
});
}
typescript.forEachChild(node, visit);
}
visit(screen);
const html = readFileSync(resolve(checkout, "apps/app/index.html"), "utf8");
const viewport = html.match(/<meta\s+name="viewport"\s+content="([^"]+)"/u)?.[1];
if (viewport === undefined) throw new Error("Shell viewport was not found");
const { buildBridgeInjectionScript } = await import(
pathToFileURL(resolve(checkout, "packages/mobile-bridge/src/inject.ts")).href
);
const observations = [];
const pageWindow = {
addEventListener: (...args) => observations.push(["window.addEventListener", args[0]]),
ReactNativeWebView: { postMessage: () => {} },
};
const pageDocument = new Proxy({}, {
get: (_target, property) => {
observations.push(["document.get", String(property)]);
return undefined;
},
});
runInNewContext(buildBridgeInjectionScript({
bridgeVersion: 5,
appVersion: "audit",
platform: "ios",
profileMode: "direct",
secureContext: true,
safeArea: { top: 0, right: 0, bottom: 0, left: 0 },
capabilities: [],
}), { window: pageWindow, document: pageDocument });
if (pageWindow.bb?.native?.platform !== "ios") {
throw new Error("The actual bridge injection failed to initialize");
}
const mobile = JSON.parse(readFileSync(resolve(checkout, "apps/mobile/package.json"), "utf8"));
console.log(JSON.stringify({
base: execFileSync("git", ["-C", checkout, "rev-parse", "HEAD"], { encoding: "utf8" }).trim(),
evidenceKind: "configuration inventory and bridge initialization; not a native gesture reproduction",
webViewVersion: mobile.dependencies["react-native-webview"],
views,
shellViewport: viewport,
bridgeInstalled: true,
bridgeInitializationDomOrWindowListenerAccesses: observations,
nativeGestureResult: "UNVERIFIED: no iOS runtime on this Linux host",
}, null, 2));
Actual output, identical in both checkouts
{
"base": "35a03bbbb3f4d8dc814c1a152db5a463102b4250",
"evidenceKind": "configuration inventory and bridge initialization; not a native gesture reproduction",
"webViewVersion": "14.0.1",
"views": [
{
"component": "ShellWebView",
"line": 355,
"attributes": [
"key",
"ref",
"initialUrl",
"style",
"originWhitelist",
"sharedCookiesEnabled",
"javaScriptEnabled",
"domStorageEnabled",
"allowsInlineMediaPlayback",
"mediaPlaybackRequiresUserAction",
"mediaCapturePermissionGrantType",
"hideKeyboardAccessoryView",
"allowsBackForwardNavigationGestures",
"bounces",
"pullToRefreshEnabled",
"automaticallyAdjustContentInsets",
"contentInsetAdjustmentBehavior",
"webviewDebuggingEnabled",
"injectedJavaScriptBeforeContentLoaded",
"onMessage",
"onShouldStartLoadWithRequest",
"onFileDownload",
"onOpenWindow",
"onNavigationStateChange",
"onLoadEnd",
"onError",
"onHttpError",
"onContentProcessDidTerminate",
"onRenderProcessGone"
]
},
{
"component": "WebView",
"line": 474,
"attributes": [
"...props",
"ref",
"source"
]
}
],
"shellViewport": "width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content",
"bridgeInstalled": true,
"bridgeInitializationDomOrWindowListenerAccesses": [],
"nativeGestureResult": "UNVERIFIED: no iOS runtime on this Linux host"
}
Exit status: 0 in both runs. This means the inventory completed, not that a runtime zoom bug was reproduced. Evidence is embedded here rather than publishing raw logs or repro files, as required by the reports repository's policy.
Native follow-up still required
On a clean iOS Simulator or physical iOS build against an isolated paired development server, record scale 1 at load; pinch the sidebar and thread body separately; double-tap a text surface and a control separately; record scale after each gesture. Obtain real before/after screenshots and confirm whether zoom occurs without any text field focus. Then repeat on a candidate native-only fix, including navigation/reload and the existing image viewer. These are pending steps, not completed results.
5. Root cause
Probable configuration cause: the native shell inherits page-scaling behavior rather than applying an explicit shell-only scale policy. The page's initial-scale=1.0 selects its starting scale; it does not by itself specify a maximum. The local wrapper does not add any policy, and the bridge initializer performs no document adjustment. Native gesture recognition and the final scale were not measured, so a complete runtime causal claim remains unverified.
- ShellWebView props and bridge injection.
- Wrapper forwards props directly to WebView.
- Shell URL is based on the active server.
- Actual app-shell viewport.
- Actual bridge initialization entry; its initialization was executed, not reimplemented.
- Control-specific touch-action policy makes broad double-tap claims unsafe.
<meta name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content" />
function ShellWebView({ initialUrl, ref, ...props }: ShellWebViewProps) {
const [source] = useState(() => ({ uri: initialUrl }));
return <WebView {...props} ref={ref} source={source} />;
}
6. Proposed fix / next experiment
First obtain a native behavioral regression that fails on trusted main. If confirmed, constrain scaling only inside the native shell using the appropriate platform mechanism; do not globally disable user zoom in the shared browser document. Android's built-in-zoom prop does not implement an iOS fix. Verify pinch and double-tap separately, plus keyboard focus, navigation, image pan/zoom, and ordinary-browser accessibility. The final approach requires evidence that it preserves these interactions, not merely a prop or source-string assertion.
No PR opened: the report does not reproduce the native gesture bug, so the mandatory simple-fix gate and failing-before/passing-after behavioral test cannot be satisfied. No production branch, patch, or commit was created.
7. Related issues and PR check
A repository search located #3770, a separate mobile focus-zoom report. That is not evidence for native gesture reproduction. Issue cross-reference metadata and an open-PR body search for 7989 returned no linked open pull request at investigation time; no PR branch or diff was run.
8. Verification
The same agent created a second clean temporary clone at the exact recorded trusted SHA, ran a separate frozen install, and repeated the complete diagnostic with that clone's own installed loader and dependencies. Both runs exited 0 and their JSON outputs compared byte-for-byte equal using diff -u (exit 0). This is repeat verification of configuration evidence, not an independent review and not a second native gesture reproduction.
cd verification pnpm install --frozen-lockfile --prefer-offline node --import ./node_modules/tsx/dist/loader.mjs ../evidence/config-audit.mjs . > ../evidence/second-run.json diff -u ../evidence/first-run.json ../evidence/second-run.json second audit exit: 0 audit diff exit: 0
Report correction after verification: the marketing-page viewport is not used as the shell evidence; the report instead links the actual app document. verified: true in the index metadata means the second clean run supports this limited verdict. It must not be interpreted as confirmed WKWebView reproduction.
9. Appendix: checks and limits
pnpm exec turbo run build --filter=@bb/mobile Tasks: 3 successful, 3 total pnpm exec turbo run test --filter=@bb/mobile --filter=@bb/mobile-bridge @bb/mobile: Test Files 49 passed; Tests 356 passed @bb/mobile-bridge: Test Files 3 passed; Tests 40 passed Tasks: 6 successful, 6 total git status --short (empty in both source clones)
The passing baseline tests do not cover native WKWebView gesture scaling. The scoped build exercises repository prerequisites, not a simulator binary. No screenshot or visual proof was fabricated; this report has no image because the necessary native runtime was unavailable. All issue content was treated as untrusted claims; only trusted main and the locally authored diagnostic were executed. Public output excludes machine identifiers, private paths, account data, and raw install logs.