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

/status shows the last 30 days for each component as one cell per day, from the forge's own samples #15629

Merged opened this

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

Merged

Each of the three rows on /status (pages and sign-in, building, billing records) now ends with its last 30 UTC days, one cell per day. A cell is ok, degraded, down or no data. Each cell's title gives its day and how many minutes were slow or down.

Notes

shipped production is serving it deploy 3fede26

opened this

Each of the three rows on /status (pages and sign-in, building, billing records) now ends with its last 30 UTC days, one cell per day. A cell is ok, degraded, down or no data. Each cell's title gives its day and how many minutes were slow or down. A screen reader hears one sentence per row instead of 30 cells. If the 30 days start before the first sample, the page says history starts <date>.

Where the days come from. Nothing kept per-day status before this. A new migration adds a status_day table: one row per UTC day and status row, counting minutes seen ok, slow or down. src/core/status_days.ts writes it, and its only writer is the existing two-minute asks tick in src/main.ts. Nothing new polls. The tick runs on the serving thread because that thread holds the health the words are read from. The table keeps only each row's state, never a cause, host or message, and holds 31 days.

Roll-up. A day with no samples is "no data", drawn as a hollow outlined box, never green. Any minute down makes the day down; otherwise any minute slow makes it degraded.

Page and terminal. The page is still server-rendered, with no script and cache-control: public, max-age=10 as before. It reads at most 93 rows by primary key, and only when the cached markup is rebuilt. Locally, with 30 days of samples and caching off as under test, the render timing was 0.6–0.9 ms warm. The terminal Status screen shows the same days as # ok, ~ degraded, ! down, . no data.

Test changed. In test/status-page.test.ts the page-size limit goes from 6 KB to 10 KB. The page is now about 8.7 KB, and the 90 titled day cells are most of that. The test was right as a size budget; the feature makes the page bigger.

Left out. The JSON answer has no days, since its body is held under 512 bytes. There are no /status before/after pictures because /status is not among the pages forge.json captures. Per-day history does not reach back before this deploys: it starts from the first tick.

Checks run. bun scripts/gate.ts, bun scripts/design-lint.ts and bun x tsc --noEmit pass. I ran 23 test files and all pass: the status, migration, door, design, guide and hot-reads suites. scripts/fast.ts said the change was too broad to pick tests from (it touches main.ts), so I picked them myself.

Look at: src/core/status_days.ts, daysStrip in src/web/pages/status.ts, the tick hook in src/main.ts, and test/status-history.test.ts. That test builds 30 days of samples with one empty day, and also checks the empty case and the 31-day cleanup.

Try it: open /status on the preview and hover a cell. In the terminal: ssh in, ctrl+k, Status. On a fresh preview most cells read "no data" and the hint says history starts <today>.

[
  {"go": "/status", "look": "each of the three rows", "expect": "a strip of 30 small cells at the row's end; days with no samples are hollow outlined boxes, not green"},
  {"go": "/status", "look": "hover the rightmost cell of a row", "expect": "a title like `2026-11-22: ok` or `2026-11-22: degraded, 4 minutes slow or down`"},
  {"go": "/status", "look": "the hint under the rows", "expect": "`Each row's last 30 days, oldest first: ok, degraded, down or no data; history starts <date>`"},
  {"go": "/status", "look": "the page at a phone width", "expect": "the strip sits under the row's state, at most 240px wide, nothing shifts or overflows", "ask": "Do the hollow no-data boxes read clearly as missing rather than as fine?"}
]

🤖 Generated with Claude Code

Closes #15621

3 earlier comments · 2 events
commented

Each of the three rows on /status (pages and sign-in, building, billing records) now ends with its last 30 UTC days, one cell per day. A cell is ok, degraded, down or no data. Each cell's title gives its day and how many minutes were slow or down. A screen reader hears one sentence per row instead of 30 cells. If the 30 days start before the first sample, the page says history starts <date>.

Where the days come from. Nothing kept per-day status before this. A new migration adds a status_day table: one row per UTC day and status row, counting minutes seen ok, slow or down. src/core/status_days.ts writes it, and its only writer is the existing two-minute asks tick in src/main.ts. Nothing new polls. The tick runs on the serving thread because that thread holds the health the words are read from. The table keeps only each row's state, never a cause, host or message, and holds 31 days.

Roll-up. A day with no samples is "no data", drawn as a hollow outlined box, never green. Any minute down makes the day down; otherwise any minute slow makes it degraded.

Page and terminal. The page is still server-rendered, with no script and cache-control: public, max-age=10 as before. It reads at most 93 rows by primary key, and only when the cached markup is rebuilt. Locally, with 30 days of samples and caching off as under test, the render timing was 0.6–0.9 ms warm. The terminal Status screen shows the same days as # ok, ~ degraded, ! down, . no data.

Test changed. In test/status-page.test.ts the page-size limit goes from 6 KB to 10 KB. The page is now about 8.7 KB, and the 90 titled day cells are most of that. The test was right as a size budget; the feature makes the page bigger.

Left out. The JSON answer has no days, since its body is held under 512 bytes. There are no /status before/after pictures because /status is not among the pages forge.json captures. Per-day history does not reach back before this deploys: it starts from the first tick.

Checks run. bun scripts/gate.ts, bun scripts/design-lint.ts and bun x tsc --noEmit pass. I ran 23 test files and all pass: the status, migration, door, design, guide and hot-reads suites. scripts/fast.ts said the change was too broad to pick tests from (it touches main.ts), so I picked them myself.

Look at: src/core/status_days.ts, daysStrip in src/web/pages/status.ts, the tick hook in src/main.ts, and test/status-history.test.ts. That test builds 30 days of samples with one empty day, and also checks the empty case and the 31-day cleanup.

Try it: open /status on the preview and hover a cell. In the terminal: ssh in, ctrl+k, Status. On a fresh preview most cells read "no data" and the hint says history starts <today>.

[
  {"go": "/status", "look": "each of the three rows", "expect": "a strip of 30 small cells at the row's end; days with no samples are hollow outlined boxes, not green"},
  {"go": "/status", "look": "hover the rightmost cell of a row", "expect": "a title like `2026-11-22: ok` or `2026-11-22: degraded, 4 minutes slow or down`"},
  {"go": "/status", "look": "the hint under the rows", "expect": "`Each row's last 30 days, oldest first: ok, degraded, down or no data; history starts <date>`"},
  {"go": "/status", "look": "the page at a phone width", "expect": "the strip sits under the row's state, at most 240px wide, nothing shifts or overflows", "ask": "Do the hollow no-data boxes read clearly as missing rather than as fine?"}
]

🤖 Generated with Claude Code

Changes requested — before the latest push

Works in the preview (200, public max-age=10, render 2.6 ms, no script, cells hollow when no data). Changes needed, first one first:

  1. components.ts removes list-style: none from four unrelated rules (summary.row, .menu > summary, .bd-boards, .chain-col) and leaves an empty .menu > summary { }. This brings back disclosure markers and bullets across the app. Revert every hunk except the .status-days block.
  2. The terminal change has no test. Add one on statusLines asserting the glyph strip, the legend and history starts. Nothing tests the tick hook in main.ts either; extract the call or test that a tick writes a row.
  3. The explanatory hint under the rows repeats what the cells and the sr-only sentence already say (principle 1: nothing explains itself twice). Keep only history starts <date> when it applies, and drop the legend.
  4. The page budget goes from 6 KB to 10 KB, against a page meant to be small and quick. Shorten the markup (for example one title per cell without the repeated day text for no-data cells, or a shared class) rather than raising the cap this far.
  5. noteStatusDay credits a fixed 2 minutes per tick whatever the real tick interval or a late tick. Pass the measured elapsed minutes since the last sample (capped) so the minutes slow or down title is true. Also note: the direction says pipeline first and this is a feature; it was filed as #15621, so I am not blocking on that.
commented

/status now shows each row's last 30 UTC days, one cell a day. The days come from the two-minute asks tick the forge already runs: each tick adds its reading to a small status_day table, which keeps 31 days. This push makes all five changes from review.

  1. Stylesheet: the four unrelated list-style: none removals in src/web/style/components.ts (summary.row, .menu > summary, .bd-boards, .chain-col) are reverted. The .status-days block is the only change left in that file; the cells are now <i>.
  2. Measured minutes: each sample now records the minutes since the previous sample, rounded, at least 1 and at most 10. The first sample after a start has nothing to measure from, so it records the 2-minute interval. The new statusSampler in src/core/status_days.ts does this, and main.ts calls it from the tick. Titles now say min instead of minutes.
  3. No second explanation: the hint under the rows is gone. The page prints only <p class="hint">history starts <date></p>, and only before the first sample. The terminal keeps its glyph legend, because glyphs have no titles to explain them.
  4. Page size: the ordinary page is back under the original 6 KB cap; the 10 KB change to test/status-page.test.ts is reverted. Cells with no data are a bare <i class="sd-none"></i> with no title. The screen-reader sentence now lists the bad days by date only, for example 1 degraded (2026-11-21), instead of repeating every title.
  5. Tests: new tests in test/status-history.test.ts cover:
    • statusLines (the glyph strip, the legend and history starts);
    • sampleMinutes (normal, late, too early and backwards clocks);
    • a sampler call writing the row with the minutes it measured;
    • the trimmed markup.

The worst case, every day measured and most of them degraded or down, is about 10.4 KB: 90 titled cells. It has its own test with an 11 KB limit; the 6 KB cap still holds for the ordinary page. I chose that over dropping the per-day titles, which are the only way to read a day's minutes on the page.

Checks run here: bun scripts/gate.ts --fix (clean), bun x tsc --noEmit (clean), bun scripts/design-lint.ts (clean), and bun test test/status-history.test.ts test/status-page.test.ts (27 pass).

[{"go":"/status","look":"the three rows and their day strips","expect":"30 cells per row; days with no data are hollow boxes without a tooltip; no legend line under the rows, only 'history starts <date>' while the record is younger than 30 days"},
 {"go":"/status","look":"hover a filled cell","expect":"a tooltip like '2026-11-22: ok' or '2026-11-22: degraded, 4 min slow or down'"},
 {"go":"/","look":"any folding row, menu or dependency chain","expect":"no disclosure triangles or list bullets have come back"}]

🤖 Generated with Claude Code

Changes requested — before the latest push

Works in the preview: 200, public max-age=10, render 3.3 ms, no script, no-data cells hollow, 'history starts 2026-11-22'. Changes needed, first one first:

  1. The minutes are unreachable on a phone and with a keyboard. They live only in title on aria-hidden <i> cells: touch has no hover, keyboard cannot focus them, and the screen-reader sentence gives dates but never minutes. Fix: put the minutes into the sr-only sentence (e.g. 2026-11-20 14 min) and make them visible without hover, e.g. a <details> or a short visible line per row naming the worst day.
  2. Issue box 1 asks each cell to carry a title. No-data cells have none, so a mouse user hovering a gap gets nothing. Give them title="<day>: no data" or drop the claim from the issue; at 6 KB budget say which in the pull.
  3. DAY_WORD in status.ts duplicates WORDS in status_days.ts. Export one and use it.
  4. The tick hook in main.ts (sampleStatus inside tickAsks) is untested; only statusSampler is. Extract the call or test that a tick writes a row. Direction note: this is feature work ahead of the pipeline list; not blocking on it.
commented

/status now shows each row's last 30 UTC days as one cell a day (ok, degraded, down, or a hollow "no data" box that is never green), built from the forge's own two-minute tick (status_day table, 31 days kept). The terminal's Status screen prints the same days as glyphs. This push answers the review on #15629:

  1. Minutes without hover. Each row's screen-reader sentence now gives every off day with its minutes (2 degraded (2026-11-19 3 min, 2026-11-20 14 min)). A row that had an off day also shows one visible line under its cells, worst 2026-11-20: down, 14 min slow or down, so the minutes can be read on a phone or with a keyboard. The cells are still aria-hidden. The worst-day line is hidden from screen readers too, because the sentence already says the same thing.
  2. Hovering a no-data cell. I kept the 6 KB cap and did not title each no-data cell. Hovering a gap shows the strip's own title, "hollow: no data", but not the gap's date. Titling all 90 gaps took the empty page from under 6 KB to 8.4 KB. So the issue's "each cell carries a title" holds only for measured cells and should be reworded to match.
  3. One word table. DAY_WORD is gone; status.ts uses the exported DAY_WORDS from core/status_days.ts.
  4. Tick hook tested. The sampling and its try/catch in main.ts moved into statusTick(app), which main.ts calls in tickAsks. A new test runs it against a real app, checks it writes today's row for all three rows, and checks it does not throw on a closed database.

The ordinary page's 6 KB cap is unchanged. The separate worst-case test (every day measured, most off) now allows 12 KB instead of 11 KB, because its sentence carries 60 days of minutes. That test's limit was wrong for the new behaviour; the code is right.

scripts/fast.ts could not name a short test list for this change (it named 3,393 files), so I ran the ones that cover it: status-history, status-page, the page-budget, docs-link and repo-wide-rule tests and the other status tests (158 pass). The gate, tsc --noEmit and design-lint are clean.

[
  {"go": "/status", "look": "a row with an off day", "expect": "a line under the 30 cells reads 'worst <day>: degraded|down, N min slow or down'"},
  {"go": "/status", "look": "hover a hollow cell", "expect": "the tooltip reads 'hollow: no data'; a filled cell's tooltip names its day and minutes"},
  {"go": "/status", "look": "the page with a screen reader", "expect": "each row reads one sentence naming its off days with minutes, e.g. '1 degraded (2026-11-21 2 min)'", "ask": "Is the worst-day line enough for touch, or should every off day be listed?"}
]

🤖 Generated with Claude Code

commented

Every row on /status now shows its last 30 days, one cell a day, on the page and in the terminal. Each day comes from the forge's own regular status check. This push brings in the latest main, which adds a "daily proof" row (#15625), and keeps the day strips and that row together.

  • Page (src/web/pages/status.ts): each of the three rows still ends with its 30-day strip, and the daily proof row follows them once it has run. The "history starts" hint stays under the rows. The saved copy of the page is rebuilt when the proof's words change, which is what main added, and the 30-day history is still only read on a rebuild.
  • Terminal (src/tui/screens/status.ts): each row ends with its strip of one character per day, then the daily proof row, then the line explaining the characters.
  • One test changed, not the code: test/daily-proof.test.ts assumed the daily proof was the terminal's last line. The explanation line now comes after it, so the test looks for the line starting with "daily proof" instead.

bun scripts/gate.ts --fix, bun x tsc --noEmit, bun scripts/design-lint.ts, and the daily-proof, status-history, status-page and status-badge tests pass (44 tests). The status-history tests log a warning about a closed database but still pass.

How to try it: open https://lab--15629--forge-trevato-apps.open-platform.sh/status and check that each row ends in 30 cells and the daily proof row appears below them once it has run. In the terminal, /status shows the same.

[{"go":"/status","look":"the rows list","expect":"each of the three rows ends in a 30-cell day strip; a daily proof row follows them once the proof has run, without a strip"}]

🤖 Generated with Claude Code

Approved

My earlier asks are met: minutes are readable without hover (the worst-day line and the screen-reader sentence), the word table is single (DAY_WORDS), and the tick hook has a test (statusTick). The merge with main keeps the daily proof row and the day strips together. daily-proof.test.ts was changed because the legend line now follows the proof row, which is right. The preview answers 200 with 6.4 KB, no script, and the line history starts 2026-11-22. Next, in order: (1) Non-blocking: hovering a no-data cell shows the strip title instead of its date, so reword box 1 of the issue to say only measured cells carry a day title. (2) Non-blocking: add a short keyboard-reachable way to list every off day, since the page names only the worst day on screen.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs