Skip to content

Lock the mobile shell viewport scale - #5432

Closed
MateoCerquetella wants to merge 1 commit into
get-bb:mainfrom
MateoCerquetella:fix-bb-mobile-thr_a5abvgd24p
Closed

MateoCerquetella wants to merge 1 commit into
get-bb:mainfrom
MateoCerquetella:fix-bb-mobile-thr_a5abvgd24p

Conversation

@MateoCerquetella

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

The native mobile shell left the embedded page zoomable. On iOS, an accidental pinch could persist a fractional WKWebView page scale, shrinking the bb interface into the top-left portion of the screen instead of keeping the app at the device viewport size.

What changed

The mobile bridge now preserves the page's existing viewport directives while forcing maximum-scale=1.0 and user-scalable=no inside the native shell. Android's native WebView zoom controls are also disabled. Browser and installed PWA surfaces remain zoomable because the restriction is applied only by the native bridge injection.

No server/daemon wire fields changed, so HOST_DAEMON_PROTOCOL_VERSION is unchanged. No CLI or Plugin SDK surface changed.

How you verified

  • Added an owner-boundary regression test that replaces a conflicting maximum scale and preserves the remaining viewport directives. It fails before the fix because bridge injection does not modify the viewport.
  • pnpm exec turbo run test typecheck lint --filter=@bb/mobile-bridge --filter=@bb/mobile
    • 38 mobile bridge tests passed.
    • 327 mobile tests passed.
    • Typechecks passed.
    • Lint passed with six pre-existing React Compiler warnings in untouched files.
  • pnpm exec oxfmt packages/mobile-bridge/src/inject.ts packages/mobile-bridge/test/inject.test.ts apps/mobile/src/screens/webview/ProfileWebViewScreen.tsx
  • git diff --check
  • iOS device/Simulator visual confirmation was not available on this host.

AGENT GENERATED

@github-actions

Copy link
Copy Markdown
Contributor

This is an automated message. We have closed this pull request because it has been open for more than two weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant