Repository navigation
fix(pwa): permanent top-edge bar so iPadOS never sees "no bar" and latches into content blur - #1022
Merged
Merged
Conversation
…tches into content blur Measured on iPadOS 27.0.1 with the /pwa-lab probe, each run from a fresh document (Reload): - a real Next navigation with the sticky header on screen throughout: strip stays clean; - removing + re-adding the viewport meta: clean; - hiding the sticky header for 2 s: FADED, and it stays faded for the life of the document (a reload clears it; the iPhone recovers on its own, the iPad does not). So the rule is: the first time iOS samples the top edge and finds no fixed/sticky bar, it switches the status-bar strip from the bar's colour to a blur of the page content and never switches back. The real app has such moments on every route change — the [locale] loading skeleton (`bg-background grid min-h-screen`) has no header, which the device logs caught right after each navigation — which is why every in-app navigation flipped it while the standalone test apps (never navigating) never did, and why #1014/#1016 (head-tag changes) could not help. Fix: a 12px fixed, full-width, app-background bar as the first child of <body> in the root layout. It is under every real header (z-0 vs their z-20/z-30) so it is invisible in normal use, and it is what the sample point hits whenever a header is absent. Verified locally: headerless page → backstop; page with sticky header, at rest and scrolled → header; header hidden → backstop. WebKit ignores edge bars ≤ 10px, hence 12. Probe: two new triggers hide the header with a 12px / 32px fixed bar behind it, to confirm on-device that 12px is enough.
This was referenced Oct 5, 2026
Merged
mbryantms
added a commit
that referenced
this pull request
Oct 5, 2026
… the backstop (#1024) Device runs (iPadOS 27.0.1): hiding the header with a 12px bar behind it latched the strip into content blur, so 12px — what #1022's root backstop and the reader's status-bar strip use — is not accepted there (WebKit main says > 10px counts; the shipped build evidently differs). The 32px run was invalid: the probe's bar was inserted before the root backstop at the same z-index, so the 12px backstop painted on top and was what the sample hit both times (the log's `edge:` line shows it). The triggers now insert the bar at z-index 1, above the backstop, in a ladder: 16, 20, 24, 32, 44px. Verified locally that the probe bar is the sampled container at each height. The smallest height that stays clean sets the backstop and the reader's strip.
mbryantms
added a commit
that referenced
this pull request
Oct 5, 2026
…a different bar (#1026) Root cause, measured on iPadOS 27.0.1 with a parameterised probe served from the dev box (no releases): the status-bar strip is painted in the colour of the fixed/sticky element iOS finds at the top edge, and the FIRST time that element changes — a header unmounting on a layout switch, the reader chrome taking over, any other bar swapped in — it switches to blurring the page content into the strip and never recovers for the life of the document. Shrinking the same header to 12px kept the strip clean; replacing it with any other bar (fixed or sticky, 12–56px, scrolling or not) latched it. This is why sidebar navigation (header persists) was clean while About → admin and the reader (header swapped) faded, why #1022's backstop could not help (it only became the sampled element after the header had gone, itself a change), and why head-tag work (#1014, #1016) was beside the point. - Root layout: `#top-edge`, the first child of <body>: sticky, z-9999, 12px (WebKit ignores bars ≤ 10px), negative margin so it costs no layout, in the page colour (`--top-edge-color`, default background). It is always what iOS samples: present from first paint, above every header and overlay. Replaces the fixed backstop. - The reader marks its root `data-surface="reader"`; globals.css turns the bar black there (same element, colour change only — verified clean on-device). - Verified on the iPad in one document: header hidden with a fixed 56px bar inserted, bar colour → black → back, header hidden with a sticky 20px bar, three route changes through a headerless page, scrolling — all clean. Browser check: #top-edge is the sampled element at rest, scrolled, with headers hidden, during the colour change and under a dialog overlay. - /pwa-lab: variant Q, a parameterised experiment console (position, height, colour, z-index, header kept/hidden, scroll lock, duration) plus a colour-change trigger; the sticky-vs-fixed ladder on P; the logger shared between them. manifest.ts: dev-only PWA_LAB_START_URL so a LAN dev server's installed app opens on a lab page instead of the API-backed home. Delete the lab once confirmed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Measured on iPadOS 27.0.1 with the /pwa-lab probe, each run from a
fresh document (Reload):
strip stays clean;
life of the document (a reload clears it; the iPhone recovers on its
own, the iPad does not).
So the rule is: the first time iOS samples the top edge and finds no
fixed/sticky bar, it switches the status-bar strip from the bar's colour
to a blur of the page content and never switches back. The real app has
such moments on every route change — the [locale] loading skeleton
(
bg-background grid min-h-screen) has no header, which the devicelogs caught right after each navigation — which is why every in-app
navigation flipped it while the standalone test apps (never navigating)
never did, and why #1014/#1016 (head-tag changes) could not help.
Fix: a 12px fixed, full-width, app-background bar as the first child of
in the root layout. It is under every real header (z-0 vs their z-20/z-30) so it is invisible in normal use, and it is what the sample point hits whenever a header is absent. Verified locally: headerless page → backstop; page with sticky header, at rest and scrolled → header; header hidden → backstop. WebKit ignores edge bars ≤ 10px, hence 12.Probe: two new triggers hide the header with a 12px / 32px fixed bar
behind it, to confirm on-device that 12px is enough.