Repository navigation
feat(web): /pwa-test/{1,2,3} — which head tags give an opaque status bar - #1009
Merged
Merged
Conversation
apple.com added to the iPad Home Screen shows an opaque status bar in its page colour with no fade, even with its sticky nav. Its head has only `viewport=…, viewport-fit=cover`: no theme-color, no apple-mobile- web-app-* tags, no manifest. Folio declares all of them. Three variants isolate which tag matters, each added to the Home Screen as its own web app from Safari (iPadOS snapshots head tags at install): 1 viewport-fit=cover only, black page (apple.com setup) 2 1 + theme-color #000 3 Folio's current set: capable + status-bar-style black + theme-color Every variant has a sticky dark-grey header over a black page, so the strip's colour shows whether it follows the page background or the sticky header. A diagnostics card reports standalone detection, viewport vs screen, the top inset and which fullscreen APIs exist (the reader's fullscreen button doesn't appear in the installed app), with a "Try fullscreen" button. A route handler rather than files in public/: it returns raw HTML (no root layout, so no manifest or apple-* tags leak in), and it stamps the per-request CSP nonce onto its script, which `'strict-dynamic'` would otherwise block. Unlinked, noindex; delete once the result is in.
This was referenced Oct 4, 2026
Merged
mbryantms
added a commit
that referenced
this pull request
Oct 4, 2026
…e trigger (#1011) Round 1 (#1009) on the iPad: Tests 1–3 were all clean (opaque strip in the sticky header's colour, no fade while scrolling), including Test 3 with Folio's exact apple-mobile-web-app-* + theme-color tags. So those tags aren't the cause. The difference left is that Folio links a web app manifest with `display: standalone`: the test pages reported `display-mode: standalone` false, Folio's lab pages true. Each new variant is Test 3 plus one change: 4 + manifest, display: standalone (Folio's; expected to fade) 5 + <meta name="color-scheme" content="dark"> (the other difference) 6 + manifest, display: minimal-ui 7 + manifest, display: fullscreen (does iPadOS hide the status bar?) Manifests come from /pwa-test/manifest/{4,6,7}, each with its own id, start_url and scope so every test installs as a separate Home Screen app that opens on its own page. Round 1 also showed no fullscreen API (standard or webkit-prefixed) in an installed iPad web app, so the reader can't hide the status bar via the Fullscreen API.
mbryantms
added a commit
that referenced
this pull request
Oct 4, 2026
… navigation (#1014) The installed iPadOS app latches the first runtime change to the theme-color / color-scheme metas: the status-bar strip switches from the top bar's solid colour to a blur of the scrolled page content and stays that way on every route until the app is force-quit. Folio hit this on iPadOS 26.1 and fixed it for the explicit dark theme only (reader viewport byte-identical to the root); light, amber and system themes kept a reader-specific black viewport. With theme = system and the OS in light mode on iPadOS 27.0.1, every visit to the reader flipped the strip, which also explains why the lab pages (#1004, #1008, #1013) faded inside Folio while the standalone test apps (#1009, #1011) never did. The reader route now has no generateViewport at all and inherits the root's. On iPadOS the strip takes its colour from the sticky header / reader chrome, not theme-color (verified: a #000 theme-color test page still showed the header colour), so nothing is lost there; on Android a light-theme reader shows the theme's status-bar colour instead of black. Follow-up, not in this change: standalone web apps freeze prefers-color-scheme at launch, so with theme = system the app can stay dark after the OS switches to light until a page re-resolves it.
mbryantms
added a commit
that referenced
this pull request
Oct 4, 2026
…gation never rewrites them (#1016) Observed with a MutationObserver on <head>: on EVERY client-side navigation Next re-renders its metadata tree, removing and re-inserting theme-color, color-scheme, apple-mobile-web-app-capable, -title and -status-bar-style (plus viewport/description/robots), even when nothing changed. An installed iPadOS app latches such a runtime change into a permanently blurred status-bar strip (force-quit resets it). #1014 only stopped the reader's own value change, so it could not help: the root tags still churned on each route change. The standalone test apps (#1009, #1011) never navigate, which is why they were always clean. - The apple-mobile-web-app-* / mobile-web-app-capable / color-scheme / theme-color tags are now static <head> children of RootLayout, which persists across navigations. Verified locally: across two in-app navigations they are the same DOM nodes with zero mutations; only Next's own viewport/description/robots tags still churn (no API to stop that), with identical values. - `generateViewport` becomes the static `baseViewport`; `themeHeadMeta` (lib/viewport.ts) replaces themedViewport/readerViewport. - tests/pwa/viewport.test.ts pins: tags present in the root layout, no route declaring them via the metadata/viewport API. - /pwa-lab variant P, a latch probe: sticky grey header (strip state at a glance), a document-wide logger that survives in-app navigation (every <meta> change in <head> with old/new values, every change of the element iOS samples at the top edge, per route), one button per candidate trigger — including "churn: remove + re-add all app metas", i.e. exactly the old Next behaviour — a real Reload, and clean/faded note buttons. Delete with the rest of the lab. iOS snapshots the apple-* tags at Add-to-Home-Screen time; the values are unchanged, so no reinstall is needed.
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.
apple.com added to the iPad Home Screen shows an opaque status bar in
its page colour with no fade, even with its sticky nav. Its head has
only
viewport=…, viewport-fit=cover: no theme-color, no apple-mobile-web-app-* tags, no manifest. Folio declares all of them. Three variants
isolate which tag matters, each added to the Home Screen as its own web
app from Safari (iPadOS snapshots head tags at install):
1 viewport-fit=cover only, black page (apple.com setup)
2 1 + theme-color #000
3 Folio's current set: capable + status-bar-style black + theme-color
Every variant has a sticky dark-grey header over a black page, so the
strip's colour shows whether it follows the page background or the
sticky header. A diagnostics card reports standalone detection,
viewport vs screen, the top inset and which fullscreen APIs exist (the
reader's fullscreen button doesn't appear in the installed app), with a
"Try fullscreen" button.
A route handler rather than files in public/: it returns raw HTML (no
root layout, so no manifest or apple-* tags leak in), and it stamps the
per-request CSP nonce onto its script, which
'strict-dynamic'wouldotherwise block. Unlinked, noindex; delete once the result is in.