Public: anyone can read this; the crew can change it.

Each home figure tile opens the board that draws it, at the tile's range, and shows its change against the previous period #17017

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Each home figure tile now opens a board page that draws its figure, at the tile's own window, and most tiles show their change against the prior window. The before/after looks at 375 px and desktop, light and dark, are not done, and I did not click the tiles on a running preview.

Notes

opened this

Each home figure tile now opens a board page that draws its figure, at the tile's own window, and most tiles show their change against the prior window. The before/after looks at 375 px and desktop, light and dark, are not done, and I did not click the tiles on a running preview. The tile markup and links are covered by tests only.

What changed

  • Links. Changes merged, Crew spend and Check time open /boards/delivery?range=14d. Visitors and Page speed open /boards/reach?range=7d. Open bugs opens Delivery at 14d. A test fails if a tile points at /boards, /board or /settings/*, or has no range.
  • A new range. 14d is now a board range, because 14 days was not one of the existing ranges. The terminal's v key cycles through it too, so I changed test/boards-view-bar.test.ts to expect 14d as the next step after 7d.
  • A new starting board, Delivery. It draws changes merged per day, crew spend per day (from run.cost_usd, the tile's own figure), average check minutes per day, and Open bugs. Two new board sources back it: checks (check durations) and bugs (open issues labelled bug).
  • Existing forges. Starting boards are offered once, so an existing forge gets Delivery on its next boot, not before.
  • Change line. The new src/flow/figure_change.ts writes +12 vs prior 14 days, −3 vs prior 7 days or No change vs prior 14 days. All three are in the same muted colour, because whether more is better depends on the figure. There is no line when there is no prior data, and its space is kept so nothing shifts. Tests cover up, down, flat and no-prior.
  • Reads. The figures reader makes one pass per source over twice the window. The visitors change reads the 30-day series already in memory. Page speed reads 14 days of page vitals in the one query it already made. Nothing new polls and the tiles stay server-rendered.

What I left out

  • Open bugs has no change line, because the open count a week ago cannot be reconstructed from the data.
  • Check time shows the 24-hour median, but its change compares the 14-day median with the 14 days before. I reworded its note to say so.
  • Off-box backup and Maintenance keep their links. The issue lists neither.
  • The terminal has no figure tiles, so the commit says "No door", and the boards are reachable from its boards screen.
  • Verification. The gate's 32 rules and tsc are clean, and the boards and home tests I ran pass. The whole suite is left to the forge's check.

Review

[
{"go":"/ (signed in as admin), open Figures","look":"Changes merged, Visitors, Crew spend, Check time, Page speed, Open bugs tiles","expect":"each shows a muted change line like '+12 vs prior 14 days' (none for Open bugs, or where nothing earlier exists)"},
{"go":"click Changes merged","look":"URL and board","expect":"/boards/delivery?range=14d, 'Changes merged per day' panel over the last 14 days"},
{"go":"back, click Crew spend","look":"URL and board","expect":"/boards/delivery?range=14d, 'Crew spend per day (USD)'"},
{"go":"back, click Check time","look":"URL and board","expect":"/boards/delivery?range=14d, 'Check time per day'"},
{"go":"back, click Open bugs","look":"URL and board","expect":"/boards/delivery?range=14d, 'Open bugs' number"},
{"go":"back, click Visitors, then Page speed","look":"URL and board","expect":"/boards/reach?range=7d, 'Visitors per day' / 'Page load per day', range bar on 7d"}
]

Closes #16937

3 earlier comments · 1 event
commented

Each home figure tile now opens a board page that draws its figure, at the tile's own window, and most tiles show their change against the prior window. The before/after looks at 375 px and desktop, light and dark, are not done, and I did not click the tiles on a running preview. The tile markup and links are covered by tests only.

What changed

  • Links. Changes merged, Crew spend and Check time open /boards/delivery?range=14d. Visitors and Page speed open /boards/reach?range=7d. Open bugs opens Delivery at 14d. A test fails if a tile points at /boards, /board or /settings/*, or has no range.
  • A new range. 14d is now a board range, because 14 days was not one of the existing ranges. The terminal's v key cycles through it too, so I changed test/boards-view-bar.test.ts to expect 14d as the next step after 7d.
  • A new starting board, Delivery. It draws changes merged per day, crew spend per day (from run.cost_usd, the tile's own figure), average check minutes per day, and Open bugs. Two new board sources back it: checks (check durations) and bugs (open issues labelled bug).
  • Existing forges. Starting boards are offered once, so an existing forge gets Delivery on its next boot, not before.
  • Change line. The new src/flow/figure_change.ts writes +12 vs prior 14 days, −3 vs prior 7 days or No change vs prior 14 days. All three are in the same muted colour, because whether more is better depends on the figure. There is no line when there is no prior data, and its space is kept so nothing shifts. Tests cover up, down, flat and no-prior.
  • Reads. The figures reader makes one pass per source over twice the window. The visitors change reads the 30-day series already in memory. Page speed reads 14 days of page vitals in the one query it already made. Nothing new polls and the tiles stay server-rendered.

What I left out

  • Open bugs has no change line, because the open count a week ago cannot be reconstructed from the data.
  • Check time shows the 24-hour median, but its change compares the 14-day median with the 14 days before. I reworded its note to say so.
  • Off-box backup and Maintenance keep their links. The issue lists neither.
  • The terminal has no figure tiles, so the commit says "No door", and the boards are reachable from its boards screen.
  • Verification. The gate's 32 rules and tsc are clean, and the boards and home tests I ran pass. The whole suite is left to the forge's check.

Review

[
{"go":"/ (signed in as admin), open Figures","look":"Changes merged, Visitors, Crew spend, Check time, Page speed, Open bugs tiles","expect":"each shows a muted change line like '+12 vs prior 14 days' (none for Open bugs, or where nothing earlier exists)"},
{"go":"click Changes merged","look":"URL and board","expect":"/boards/delivery?range=14d, 'Changes merged per day' panel over the last 14 days"},
{"go":"back, click Crew spend","look":"URL and board","expect":"/boards/delivery?range=14d, 'Crew spend per day (USD)'"},
{"go":"back, click Check time","look":"URL and board","expect":"/boards/delivery?range=14d, 'Check time per day'"},
{"go":"back, click Open bugs","look":"URL and board","expect":"/boards/delivery?range=14d, 'Open bugs' number"},
{"go":"back, click Visitors, then Page speed","look":"URL and board","expect":"/boards/reach?range=7d, 'Visitors per day' / 'Page load per day', range bar on 7d"}
]
the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Each home figure tile now opens the board that draws it, at its window, and states its change against the prior window. This push fixes the one failure that came from this pull. The other two failures from the check are timing flakes that don't come from it.

  • The real failure: readReach now returns loadP75Prior, but NO_REACH didn't carry it. The "nothing seeded" test in test/home-kpi-row.test.ts compares the two, so it failed. I added loadP75Prior: null to NO_REACH in src/flow/reach.ts, and that test passes again.
  • "cold home answers from the picture" (test/observability-budget.test.ts): this is a timing budget, and it failed in my sandbox with my change stashed too. The forge's check had already found the file flaky on main.
  • "repeat on the same two heads" (test/upstream-counts.test.ts): it passes when run alone, so I read it as load-related.
  • Not re-run: the full suite. I only re-ran the three affected files, and tsc --noEmit came back clean. The forge's check will run the whole suite on this push.

What I chose not to do: I didn't loosen either timing budget.

To try it: open / on the preview, click a figure tile, and check that it lands on the board at that tile's window.

[{"go":"/","look":"click any figure tile","expect":"opens the board that draws it, at the tile's window, with the change against the prior window shown"}]
commented

Items 1 and 3 are fixed and pushed. Item 2, the before and after looks of the home at 375 px and desktop, light and dark, is not done. I can't sign in as admin on a preview or take screenshots from this sandbox. I also haven't clicked the tiles on the live preview.

Dead tile links. The Delivery board exists only once boot has offered it, so /boards/delivery?range=14d returned 404 until then. GET /boards/:slug now treats a missing board that is a starting board as a request to offer the starting boards (src/web/pages/boards-view.ts). It reads the board again after writing, so the tile's first click lands on 200 on any forge. A board that was offered and then deleted is recorded in .offered, so it stays 404. A slug that is not a starting board also stays 404. test/home-tile-board-offered.test.ts covers both, starting from a forge where Delivery was never offered.

Change line.

  • Class: it has its own class, .fg-change, muted at 16px, documented in docs/design/areas/home-flow.md. .fg-axis is back to the chart's axis only.
  • Empty state: a card with no prior window renders an empty aria-hidden block that holds the height, so no empty paragraph is announced.
  • No-shift test: the budget in test/home-no-shift.test.ts now counts the extra line and the fifth gap.

Checks run. tsc and design-lint are clean, and gate --fix rewrapped two files, which I committed. I ran these tests:

  • home figures and tiles
  • boards page and starting boards
  • home-kpi-row
  • the no-shift test
  • the new test
  • the unused-exports test
  • the kernel-boundary, dup-imports and spawn-sites tests

All pass. scripts/fast.ts found 3,846 files for 18 changed (over its time budget), so I picked the tests by hand instead. I did not run the full suite or the other tests the check named, such as the timed-jobs and screen tests. The forge's check runs them on this push.

Still flaky. The cold-home budget test in test/observability-budget.test.ts is timing-dependent. It failed in my sandbox with and without these changes, and the check has already found it flaky on main.

To try it. On the preview, sign in as admin, open /, and click each tile. Each should land on its board at the tile's window.

[{"go":"/ signed in as admin, then click each of the six figure tiles","look":"every tile opens a board (Delivery or Reach) at its window, none 404s, including the first click on a forge that never offered Delivery","expect":"a 200 board with the range pre-selected; the change line under each figure is muted, and a card with no prior window keeps its height with no empty paragraph announced"},{"go":"/ at 375 px and desktop, light and dark","look":"card heights across a row","expect":"equal heights, nothing shifts when the figures arrive"}]
commented

Left #16937 open: 1 unticked item remain (Before and after looks of the home at 375 px and desktop, light and dark, plus a review block that clicks each tile and expects its board at the same range.).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs