Skip to content

fix(web): keep iOS Safari status bar a consistent navy across pages#54

Open
ginoleeswan wants to merge 1 commit into
mainfrom
claude/ios-safari-status-bar-color-68ncje
Open

fix(web): keep iOS Safari status bar a consistent navy across pages#54
ginoleeswan wants to merge 1 commit into
mainfrom
claude/ios-safari-status-bar-color-68ncje

Conversation

@ginoleeswan

Copy link
Copy Markdown
Owner

What & why

On mobile iOS Safari the top status-bar strip (time/battery) changed color as you moved between pages — beige on the character detail page, dark navy on Explore.

Root cause: In a plain Safari tab, the top status-bar strip and the bottom toolbar are both tinted from the document <body> background — this is Safari's own chrome, which no in-page element can repaint and which ignores the app's dynamic theme-color meta. Each screen was painting <body> its own content color via useScreenChrome's canvas (beige on content pages, navy on Explore), so the system chrome mirrored whatever page you were on. The existing AdaptiveStatusBarCover + theme-color machinery only takes effect in a Home-Screen/standalone install, not a normal tab. And because the top and bottom bars share the same <body> source, a two-tone "dark top / beige bottom" is not achievable in a tab.

Decision: consistent navy chrome everywhere (top + bottom), preserving the bottom content flow-through.

Changes

  • Pin <body>/<html> to the app's deep-navy on every route. useScreenChrome no longer repaints the body with each screen's content color, so the status bar + bottom toolbar read a consistent navy on every page. (src/hooks/useScreenChrome.ts, app/+html.tsx)
  • Prevent a navy leak past the fold. With a navy body, a beige container clamped to one viewport (flex:1, which RNW pins to 100dvh via min-height:0) would show navy under the content below the fold. Each light screen's canvas container now uses a full-height beige fill (minHeight:'100dvh', grows with content) so beige backs the entire scroll. Fixed screens: character, profile (mobile + desktop), biography (desktop), legal, title, issue.
  • Dark screens (Explore / Search / Arena / category / team) already declare a dark canvas, so they're unaffected.

The bottom content flow-through is preserved — only the system chrome and overscroll gutters read navy, which is the intended tradeoff.

Verification

  • Layout fix verified in Chromium (faithful reproduction of the RNW layout): flex:1 leaves ~1556px below the fold un-backed by the beige canvas (where navy would leak), while minHeight:'100dvh' backs the full document height (leak = 0).
  • No test files exercise the changed code; the style edits reuse the already-shipped minHeight:'100dvh' … } as object pattern from the auth screens.
  • Could not run yarn test:ci / tsc in the CI sandbox (registry bulk-fetch is blocked by egress policy); the diff touches only web view styles and a web-only hook.

On-device note

Privacy/Terms (legal) pages declare a light top but will now get a navy status bar like every other page — consistent with "navy everywhere," but worth an eyeball if a different treatment is wanted there.

🤖 Generated with Claude Code

https://claude.ai/code/session_017yG9ADfyP9B9MvageS3FL7


Generated by Claude Code

In a plain iOS Safari tab the top status-bar strip and the bottom toolbar
are both tinted from the document <body> background. Each web screen was
painting the body its own content colour via useScreenChrome's `canvas`
(beige on content pages, navy on Explore), so the system chrome flipped
per page — the status bar went beige on the character page and navy on
Explore. The theme-color meta + AdaptiveStatusBarCover that were meant to
hold the top dark only take effect in a Home-Screen/standalone install,
not a normal tab.

Pin <body>/<html> to the app's deep-navy on every route so the status bar
and bottom toolbar read a consistent dark everywhere. Light screens keep
their beige look by painting it on their own container.

Because the body is now navy, any light container clamped to one viewport
(flex:1, which RNW pins to 100dvh via min-height:0) would leak navy under
the content past the fold. Give every light canvas container a full-height
beige fill (minHeight:100dvh, growing with content) so beige backs the
whole scroll — verified in Chromium that flex:1 leaves ~1556px un-backed
below the fold while minHeight:100dvh backs the full document height.

Screens fixed: character, profile (mobile+desktop), biography (desktop),
legal, title, issue. Explore/Search/Versus/Arena/category/team already use
a dark canvas. The bottom content flow-through is preserved; only the
system chrome + overscroll gutters read navy (per product decision).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017yG9ADfyP9B9MvageS3FL7
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mythique Ready Ready Preview, Comment Jul 2, 2026 8:40pm

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.

2 participants