Public: anyone can read this; the crew can change it.
The signed-out home renders in under 30 ms and under 30 KB of HTML, measured on production #13014
Check · Review · Land · Live done — Landed and live in production.
The signed-out home now has tests for the 30 ms and 30 KB bars, and I cut the HTML and the cold-read cost. I could not reproduce the production numbers (48,497 B, render;dur=66) here, so what I cut is my best reading of where they come from. gate, tsc, design-lint and the home and milestone tests are green locally.
shipped production is serving it deploy 59903fa
5 earlier comments · 2 events
The signed-out home now has tests for the 30 ms and 30 KB bars, and I cut the HTML and the cold-read cost. I could not reproduce the production numbers (48,497 B, render;dur=66) here, so what I cut is my best reading of where they come from. gate, tsc, design-lint and the home and milestone tests are green locally.
What the tests cover (test/perf-home-signed-out.test.ts)
- Seed: a forge with 40 public apps whose plans moved this week, merges spread across 90 days, and one repository with a thousand-issue plan.
- Render bar: the median of 20
renderphases is under 30 ms, with a write landing before each request. Locally it was about 4 ms. - Size bar: the HTML is under 30 KB. Before the cuts my seed produced 33 KB; after them about 21 KB.
- Packs: the door shows 3 of a long catalogue plus a link to the rest.
- Milestone lines: the first paint doesn't wait on a plan read once the lines are a minute old.
What moved out
- Pulse picture: it drew a
<rect>and a<title>for each of 90 days, roughly 17 KB. The quiet days are now one<path>with the same fill, and the active days keep their titled bars. The picture is unchanged, but a quiet day no longer shows its accent colour on hover. - Packs: the door lists 3 ready-made forges and links "All N ready-made forges" to
/packs. They were unbounded before. - Milestone lines: for a stranger they show the last reading until it is 60 seconds old, then are read again after the response. A plan stamp costs tens of ms after any write, which I think is what made production's render slow. Only the first reading, or a change in which apps are public, is read inside a request. The signed-in home, the
/live/milestonesfragment and the edge-cache keys are untouched.
Not done
- Production numbers: I couldn't reach
forge.open-platform.shfrom here, so thecurlsize and Server-Timing after release still have to be posted as the last comment. - Stranger's shelf: the seed apps have no pictures, so the shelf rendered no tiles and the tiles' size is untested. If production is still over 30 KB after release, that is the next place to look.
- Look pictures: I did not run the look pictures at 360 and 1280 px.
Try it: open / signed out on the preview and check that the pulse bars, shelf and milestone lines look as before.
I fixed the two failures this pull caused and pushed. The other five I couldn't reproduce here and left alone.
- Timer test: the background milestone re-read in
src/web/studio/milestone_lines.tsused a baresetTimeout. It now runs insideduring("milestone-lines", …), sotest/timers-named.test.tsandtest/flake.test.tspass again. - Clock bound: I removed the
performance.now()bound fromtest/perf-home-signed-out.test.ts. The repo bans raw wall-clock budgets in tests. The test's other check, that a read inside the minute is served from the cached lines, is unchanged. - Unreproduced failures:
needsYouCardN+1 and the two forks "how far behind" tests pass when I run them alone. They look like load flakes on a busy shard. The "a fresh account's second run waits queued" test timed out at 120 s, and I did not run it.
tsc is clean, and the timer, flake and perf tests pass (48). I did not run scripts/gate.ts this round.
The job-slices failure was mine, and I've fixed it and pushed. The other two fail only on the shard and pass when I run them here.
- Mine: the last push gave the milestone re-read timer a
during("milestone-lines")name.test/job-slices.test.tsrequires every named job to be either timed or listed inUNTIMEDwith a reason, and this one was neither. I added it toUNTIMEDwith its reason, and the test passes again (3 pass). - Not reproduced: I ran the stream-resume test ("a stream that resumes while the engine writes") and the issue-listing test ("an issue listing costs the same for 5 rows as for 50") here, and all 21 pass. They look like load flakes on the busy shard.
I did not run the full suite, tsc or scripts/gate.ts this round; the change only touches a test file.
Preview: / is 16.6 KB, Server-Timing render;dur=5.1, so the two bars hold there. Changes needed in one round:
- The last test (src/test/perf-home-signed-out.test.ts, 'never waits for a plan to be read again') is close to tautological: it never checks that a re-read happens after the response, nor that the lines change once it does, and a revert of the timer would still pass. Make it fail without the change: advance past the minute, let the timer run, then assert a later call returns freshly read lines, and that a request in between returned the old ones.
- Stale lines for a stranger: the milestone lines can show a plan up to 60 s+ old and, if nobody visits, much older, with no word about it. Say in the pull that this is accepted, or have the refresh run on the existing live-milestones push so the first paint is never older than that push.
- The 30 KB bar is only proven on a seed with no shelf pictures, so the tiles are unmeasured; seed a few app pictures so the test covers the shelf too.
- Box 3 (no layout shift, looks at 360/1280 light and dark) was not checked; run the looks and say so in the pull. Box 4 (production curl and Server-Timing) is still to be posted after release.
- Quiet days lose their hover colour; mention it is intended (done in the pull text) and keep .door-pulse-quiet in content.ts matching the new path.
Items 1, 2, 3 and 5 are done and pushed; I couldn't run the looks (item 4), so box 3 stays unchecked. The perf, home, job-slices and timers-named tests, tsc and design-lint pass. I did not re-run scripts/gate.ts after the changes.
What changed
- Re-read test (item 1):
test/perf-home-signed-out.test.tsnow closes the open issues of the first shown line's repo. A visit a minute later gets the old lines (toBe(first)). After the timer runs (a 50 ms wait), a later call returns different lines. Removing the timer fails it. - Shelf pictures (item 3): 12 of the 40 seeded apps now have a production thumb. The test stubs
AppsRuntime.statusthe wayfront-speed.test.tsdoes. It assertsclass="look"is on the page, so the 30 KB bar covers the tiles.
- The bar failed with pictures: the page was 33,017 bytes. I fixed it by writing tile() in src/web/studio/home.ts compactly and dropping its card() wrapper for a plain div. It is now 30,466 bytes against 30,720, so the margin is about 250 bytes.
- Margin and other fixes: the hero's three agent links, about 3 KB, repeat the same encoded prompt. I left them alone. I also tried slimming the shared card() and btn() markup to widen the margin, but that broke three pinned-HTML tests, so I reverted it. Whoever touches the hero next should fix the margin there.
- Staleness (item 2): I accepted it rather than tie the refresh to the live-milestones push, and said so in the
milestonesLaterdoc comment. Lines are at most one visit old and refresh only on a visit. A failed refresh keeps the old lines and retries on the next visit. The plan's own pages are always read fresh. - Quiet days (item 5): they lose their hover colour on purpose, and
.door-pulse-quietincontent.tsalready matches the one-path markup. Quiet days also lose their per-day<title>. The svg'saria-labelstill gives the total and the peak, but a keyboard or screen-reader user cannot read an individual quiet day.
Not done
- Looks (item 4): I did not run the looks at 360 and 1280, light and dark, so box 3 (no layout shift) is unchecked. I can't take looks in this sandbox. The tile change is markup only, and it did not change the
.lookimg's width and height attributes. - Production check: box 4, the production curl and
Server-Timing, is still to be posted after release. The preview gave 16.6 KB andrender;dur=5.1. With pictures seeded, the test measures about 4.9 ms median render and 30.5 KB.
I rewrapped the 104-column comment in src/web/studio/home.ts (the one above the tile return) onto two lines and pushed. bun scripts/gate.ts and bun x tsc --noEmit pass here. I did not rerun the tests, since only a comment changed.
The gate only checks lines the commit adds. It still reported the old line until I committed the fix, so a gate run on an uncommitted change can look red when it isn't.
The rest of the pull is unchanged from the last push: the home measured with shelf pictures, the re-read test that fails without its timer, the compacted tile, and the named staleness.
Earlier asks: the re-read test now fails without its timer (met); shelf pictures are seeded and the 30 KB bar covers the tiles (met); staleness is named in the milestonesLater doc comment (met); quiet-day hover and title loss is stated, and the svg aria-label still carries total and peak (accepted). The preview answers / with 16.6 KB, render;dur=13.4, and the markup is unchanged for a reader with JavaScript off. Next two: (1) post the production curl size and Server-Timing after release and run the looks at 360 and 1280 px, light and dark; (2) the 250-byte margin under 30 KB is thin, so trim the hero agent links, which repeat the same encoded prompt (about 3 KB). Non-blocking: give quiet days a text alternative in the figcaption.
The signed-out home now has tests for the 30 ms and 30 KB bars, and I cut the HTML and the cold-read cost. I could not reproduce the production numbers (48,497 B,
render;dur=66) here, so what I cut is my best reading of where they come from. gate, tsc, design-lint and the home and milestone tests are green locally.What the tests cover (
test/perf-home-signed-out.test.ts)renderphases is under 30 ms, with a write landing before each request. Locally it was about 4 ms.What moved out
<rect>and a<title>for each of 90 days, roughly 17 KB. The quiet days are now one<path>with the same fill, and the active days keep their titled bars. The picture is unchanged, but a quiet day no longer shows its accent colour on hover./packs. They were unbounded before./live/milestonesfragment and the edge-cache keys are untouched.Not done
forge.open-platform.shfrom here, so thecurlsize and Server-Timing after release still have to be posted as the last comment.Try it: open
/signed out on the preview and check that the pulse bars, shelf and milestone lines look as before.Closes #12986