Skip to content

chore: on-device isolation flags for the #610 iOS nav repaint (diagnostic)#637

Merged
vivek7405 merged 1 commit into
mainfrom
diag/ios-sticky-isolation
Jun 19, 2026
Merged

chore: on-device isolation flags for the #610 iOS nav repaint (diagnostic)#637
vivek7405 merged 1 commit into
mainfrom
diag/ios-sticky-isolation

Conversation

@vivek7405

Copy link
Copy Markdown
Collaborator

Why a diagnostic, not another fix

Five header-CSS attempts failed, and the GPU compositor promotion (#636) made no on-device difference (both / and /?nofix flashed), which rules out the sticky element's own compositing layer. The new symptom (back-swipe shows a blank page, iOS only, both WebKit browsers) cannot be a header-CSS issue at all. It points the whole class of bug at the client router's paint/snapshot timing.

Rather than a sixth blind guess, this ships temporary, guarded levers (default OFF, production path unchanged) so one on-device round isolates the cause.

The levers

  • ?raf=1: the router waits a requestAnimationFrame before the forward swap AND the popstate (back) swap, so WebKit paints at a frame boundary. webjs currently swaps synchronously, whereas Turbo waits a rAF (the single biggest router difference).
  • ?scrollfirst=1: scroll-to-top happens BEFORE the forward swap, so a preserved sticky header never sees a content-height change while stuck.
  • ?h=static: drops position: sticky, to tell a sticky-recalc apart from a page-level repaint.

Flags combine (?raf=1&scrollfirst=1). All guarded behind window.__webjsDiag; removed once the root fix lands.

Verification

Blog SSR 200 across /, /?h=static, /?raf=1&scrollfirst=1; router unit tests 150/150; webjs check clean. Default behavior is byte-identical with the flags off.

Re #610.

https://claude.ai/code/session_01W8RLiSnkwKXDmnkoasQfZF

…aint

Five header-CSS attempts failed and the GPU compositor promotion made no
on-device difference, which rules out the sticky element's own layer. The new
back-swipe-blank symptom (iOS only, both WebKit browsers) points the whole
class of bug at the client router's paint/snapshot timing, not the header.

Add temporary, guarded diagnostic levers (default OFF, so the production nav
path is unchanged) so one on-device round isolates the cause instead of
another blind guess:
  - window.__webjsDiag.raf: wait a requestAnimationFrame before the forward
    swap AND the popstate (back) swap, so WebKit paints at a frame boundary
    (the timing Turbo uses; webjs currently swaps synchronously).
  - window.__webjsDiag.scrollfirst: scroll-to-top BEFORE the forward swap, so
    a preserved sticky header never sees a content height change while stuck.
  - blog `?h=static`: drop position:sticky to tell sticky-recalc from a
    page-level repaint.

The blog reads `?raf` / `?scrollfirst` into window.__webjsDiag on load (the
flag is lost from the URL on the soft nav itself, so it is captured once) and
`?h=static` server-side onto the preserved header. All temporary; removed
once the root fix lands. Doc gate bypassed (internal, undocumented, temporary).

Re #610.

Claude-Session: https://claude.ai/code/session_01W8RLiSnkwKXDmnkoasQfZF
@vivek7405 vivek7405 marked this pull request as ready for review June 19, 2026 15:55
@vivek7405 vivek7405 merged commit c1d388d into main Jun 19, 2026
9 checks passed
@vivek7405 vivek7405 deleted the diag/ios-sticky-isolation branch June 19, 2026 15:55
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