You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e35ac96
Browse filesBrowse the repository at this point in the historyBrowse files
frames: C5 follow-up — inline styles hold on the assets tier too
The ruling "inline styles are not reveal-gating" predated the tier. With
the tier absent, a segment whose assets record carried inline styles
revealed at once and its <style> landed one chunk load later, at the
install's flush — a bounded unstyled window, which is exactly the FOUC
the reveal-readiness term exists to prevent.
The term in #segmentReady now reads
(assets.styles || assets.inlineStyles) &&
!tierReady("assets")?.gate(assets.styles || [], this)
so while the tier is absent such a segment holds like a stylesheet-gated
one (the server's fallback stays; the install's flush lands the style in
the assets walk, then reveals the segment); once the tier is resident
inline styles still never gate — they apply at the record's arrival,
ahead of the segments in the same flush, as before. The assets walk
stays a separate pass before the segments.
Measured first on the edited dist copy through scripts/size's bundler:
+22 min / +14 br on frames eager (the explicit two-branch form was +50;
widening the tier's `gate` to accept undefined was +18 but changed its
signature — not taken). The real build matched to the byte: frames
eager 41,077 / 13,346 (cap 13.35 KB, within; recorded minified left at
41,055), page base 120,124 / 37,969 (+22 / −1), page live 131,995 /
41,650 (+22 / −1), every non-SC scenario 0 / 0. No cap raised.
Pins — test/consistency/tier-assets-ready.spec.tsx (7 → 9): tier
absent, an inline-only segment holds (loader called once, fallback on
screen, no <p>, no <style>) and the install lands the style before the
content (one MutationObserver over head and boundary records the
order); tier resident, the segment's three records in one frame.apply
reveal synchronously with the style, style first; the mixed-stream pin
now holds the inline-only segment beside the style-gated one. A mutant
with the previous term fails 2 of 9.
Co-authored-by: Claude via Cursor <[email protected]>
Copy file name to clipboardExpand all lines: .changeset/frames-assets-tier.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
"@solidjs/web": patch
3
3
---
4
4
5
-
frames: the assets tier (frames savings pass C5) — the head mirror a segment's `assets` record drives (the stylesheet gate, module and typed preloads, inline styles) leaves the eager frames client for the lazy chunk `@solidjs/web/frames/assets`, loaded through the tier mechanism. A style-gated segment is not ready while the tier is not resident: the server's fallback stays on screen and the reveal happens at max(tier load, stylesheet load) — no segment reveals unstyled. A segment without stylesheets never waits on the tier; inline styles, modules and preloads apply when it is resident (at the record's arrival, or at the install). New export path `@solidjs/web/frames/assets` (`@experimental`); `InstallOptions.tiers` loaders resolve `TierModule` (a module with or without `install()`).
5
+
frames: the assets tier (frames savings pass C5) — the head mirror a segment's `assets` record drives (the stylesheet gate, module and typed preloads, inline styles) leaves the eager frames client for the lazy chunk `@solidjs/web/frames/assets`, loaded through the tier mechanism. A segment whose assets record carries stylesheets or inline styles is not ready while the tier is not resident: the server's fallback stays on screen and the reveal happens at max(tier load, stylesheet load) — no segment reveals unstyled. Once the tier is resident only stylesheets gate; inline styles, modules and preloads apply at the record's arrival, and a segment with none of these never waits on the tier. New export path `@solidjs/web/frames/assets` (`@experimental`); `InstallOptions.tiers` loaders resolve `TierModule` (a module with or without `install()`).
test("a segment without stylesheets reveals at once with the tier absent; one with inline styles alone reveals too, its style landing at the install",async()=>{
357
+
test("a segment without stylesheets or inline styles reveals at once with the tier absent; styled and inline-only ones hold, revealing at the install (inline) and the sheet's load (styled)",async()=>{
237
358
constgate=gatedAssets();
238
359
constWIRE="tier-assets/unstyled";
239
360
const{ host }=makeHost();
@@ -283,20 +404,26 @@ describe("what never waits on the tier", () => {
0 commit comments