Skip to content

fix(pwa): keep a WebKit-visible black bar above the reader in the installed app - #995

Merged
mbryantms merged 1 commit into
mainfrom
fix/reader-ios26-top-edge
Oct 4, 2026
Merged

mbryantms merged 1 commit into
mainfrom
fix/reader-ios26-top-edge

Conversation

@mbryantms

Copy link
Copy Markdown
Owner

With the reader chrome hidden on iPadOS 26.1+, the system scroll-edge
blur still ran the artwork up into the status bar. #994 made the
status-bar backing solid, but its height is --safe-top, which
SafeAreaProbe pins to 0 on those versions. WebKit only treats a fixed
edge bar as a solid colour to extend when it is more than 10px tall
(LocalFrameView::fixedContainerEdges, thinBorderWidth), and nothing
else at the top edge qualifies (the tap overlay is transparent), so it
blurred instead.

  • New --reader-top token: --safe-top in a browser tab,
    max(--safe-top, 12px) under display-mode: standalone.
  • The reader's status-bar backing and the fitted/double/webtoon page
    padding + fit calcs use it, so the bar never covers fitted art.
  • edge-effect test guards the 12px floor and the padding switch.

…talled app

With the reader chrome hidden on iPadOS 26.1+, the system scroll-edge
blur still ran the artwork up into the status bar. #994 made the
status-bar backing solid, but its height is `--safe-top`, which
SafeAreaProbe pins to 0 on those versions. WebKit only treats a fixed
edge bar as a solid colour to extend when it is more than 10px tall
(LocalFrameView::fixedContainerEdges, thinBorderWidth), and nothing
else at the top edge qualifies (the tap overlay is transparent), so it
blurred instead.

- New `--reader-top` token: `--safe-top` in a browser tab,
  `max(--safe-top, 12px)` under `display-mode: standalone`.
- The reader's status-bar backing and the fitted/double/webtoon page
  padding + fit calcs use it, so the bar never covers fitted art.
- edge-effect test guards the 12px floor and the padding switch.
@mbryantms
mbryantms merged commit 0c66d8d into main Oct 4, 2026
15 checks passed
@mbryantms
mbryantms deleted the fix/reader-ios26-top-edge branch October 4, 2026 15:26
mbryantms added a commit that referenced this pull request Oct 4, 2026
…the installed app (#999)

After #994 and #995 the installed app on iPadOS still showed a fade over
the top ~40pt of the web view: the library header icons and the reader
chrome (back arrow, page counter) rendered dimmed. That fade is the
system's Liquid Glass scroll-edge ramp, drawn ABOVE the web view below
the status bar. Opaque edge bars and the opaque `black` status-bar style
don't remove it (both already in place); no CSS or meta tag turns it
off. Projects that verified on devices (e.g. mval23/remy#12 on iPad,
xdoubleu/tools.xdoubleu.com#1987) found one fix: keep content out of it.

- globals.css: `--edge-ramp` (2rem in the installed iOS/iPadOS app via
  `@supports (-webkit-touch-callout: none)` + `display-mode: standalone`
  or `[data-standalone]`; 0 on landscape phones and everywhere else) and
  `--top-inset = --safe-top + --edge-ramp`. `--topbar-h` and the
  reader's `--reader-top` include it.
- Top bars and top-anchored surfaces pad by `--top-inset`: library and
  admin headers + nav sheets, reader chrome + loading skeleton, peek
  banner, skip links, pull-to-refresh, StatusScreen, cover viewer,
  filter sheet and the sheet close button. The added band is painted in
  each bar's own solid colour, so the ramp over it is invisible and the
  controls sit below it. Reader pages start below the black status-bar
  backing, which now spans the ramp too.
- SafeAreaProbe marks `<html data-standalone>` from navigator.standalone
  as a fallback for launches where the display-mode query doesn't match.
- edge-effect test pins the clearance and that edge bars never pad by
  the raw `--safe-top`.

Browser tabs, desktop and Android are unchanged (`--edge-ramp` is 0).
mbryantms added a commit that referenced this pull request Oct 4, 2026
…1004)

A throwaway diagnostic surface, unlinked from the app and marked
noindex. Five variants, each isolating one hypothesis about what the
system draws into the installed app's status-bar strip (#994, #995, #999
and its revert #1003 all tried in-page fixes; the fade lives above the
page, showing blurred page content):

A  page scroll, colour to the top (baseline)
B  page scroll + fixed 56px solid-black bar
C  document never scrolls; full-screen inner scroller
D  inner scroller below a static 56px black block
E  page scroll, tall static black block first (at rest vs scrolled)

Each variant pre-scrolls 400px (except E), uses saturated labelled rows
so any blur is obvious, and docks a geometry readout at the BOTTOM
(standalone detection, inner vs screen size, visualViewport,
env(safe-area-inset-top), --safe-top, scrollY) so screenshots carry the
measurements. Inner-scroller variants lock document scroll and restore
it on leave.

Delete `app/[locale]/pwa-lab` + `lib/pwa-lab.ts` once the fade is
understood.
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