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

Maintenance board: each worker's findings, actions and their effect, on forge/boards and a home tile #16695

Merged opened this in answer to

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

Merged

The Maintenance board now shows each worker's findings, actions and effect, and home has a Maintenance tile. The five new tests pass, with tsc, gate.ts and design-lint clean. I did not run the whole suite or scripts/fast.ts (it named 3,650 files); I ran the related boards, home, maintenance and docs-door tests instead.

Notes

opened this

The Maintenance board now shows each worker's findings, actions and effect, and home has a Maintenance tile. The five new tests pass, with tsc, gate.ts and design-lint clean. I did not run the whole suite or scripts/fast.ts (it named 3,650 files); I ran the related boards, home, maintenance and docs-door tests instead.

What changed

  • Board: "Maintenance" was already offered as a starting board, so I extended it rather than creating a new one. Panels added: items entering each stage, red batches by reason, and findings, actions, runs and spend per duty.
  • Strip above the charts (src/web/pages/maintenance_board.ts):
    • Pipeline: the bottleneck sentence and per-step numbers, reusing readPipeline, verdict and cachedStepStats.
    • Lanes: one per worker, each with last run and result, runs today, 7-day findings and actions, spend against budget, and a Pause/Resume button. Pause posts to the existing /maintenance/duties/:name with a back field, honoured only when it is the board's own path; cross-origin posts are still refused.
    • Findings: a findings list with probe, number, action, link and effect.
    • Empty state: with no run at all it says "Nothing to do yet".
  • Sources: maintenanceRuns and maintenanceProbes in src/boards/sources.ts, with guide entries. They list no outcome text, summaries or probe names, which can carry repo names.
  • Effect (src/maintain/effect.ts): a finding is followed to the duty's newest run. The probe gone and the run ok is "fixed"; the same or lower number is "still there"; higher is "worse"; no later run is "waiting". A probe read again on the next run is listed once. The terminal Maintenance screen shows the same effects.
  • Tile: a home card with the findings still open and those fixed this week, linking to the board. docs/features/maintenance-board.md describes it.
  • Existing test changed: test/home-figures.test.ts now expects 8 cards instead of 7, because the new card is one more. The test was out of date, not the code wrong.

Left out

  • Doctor findings: batch-doctor rows keep their probe as a string, not a number, so they appear in the lane but not in the findings list or the effect.
  • No switch for three lanes: batch-doctor, release-keeper and performance-watcher are not in the duty roster, so their lanes say "runs with the pipeline" and have no pause button.
  • Link column: it only fills for rows that carry an issue_id; no roster duty sets one yet.
  • Existing forges: a forge that has already been offered "maintenance" keeps its old board file and does not get the new panels; the strip above the charts shows regardless.
  • Looks: I said "No look" in the commit, since no look page covers this board.
  • New read: readRuns takes the newest 400 maintenance_run rows, which the primary key serves, so I wrote no query-plan test for it.

Try it: as an admin open /boards/maintenance. Click Pause on a lane, and the board returns showing it paused. Home shows the Maintenance card.

🤖 Generated with Claude Code

Closes #7561

16 earlier comments
commented

The Maintenance board now shows each worker's findings, actions and effect, and home has a Maintenance tile. The five new tests pass, with tsc, gate.ts and design-lint clean. I did not run the whole suite or scripts/fast.ts (it named 3,650 files); I ran the related boards, home, maintenance and docs-door tests instead.

What changed

  • Board: "Maintenance" was already offered as a starting board, so I extended it rather than creating a new one. Panels added: items entering each stage, red batches by reason, and findings, actions, runs and spend per duty.
  • Strip above the charts (src/web/pages/maintenance_board.ts):
    • Pipeline: the bottleneck sentence and per-step numbers, reusing readPipeline, verdict and cachedStepStats.
    • Lanes: one per worker, each with last run and result, runs today, 7-day findings and actions, spend against budget, and a Pause/Resume button. Pause posts to the existing /maintenance/duties/:name with a back field, honoured only when it is the board's own path; cross-origin posts are still refused.
    • Findings: a findings list with probe, number, action, link and effect.
    • Empty state: with no run at all it says "Nothing to do yet".
  • Sources: maintenanceRuns and maintenanceProbes in src/boards/sources.ts, with guide entries. They list no outcome text, summaries or probe names, which can carry repo names.
  • Effect (src/maintain/effect.ts): a finding is followed to the duty's newest run. The probe gone and the run ok is "fixed"; the same or lower number is "still there"; higher is "worse"; no later run is "waiting". A probe read again on the next run is listed once. The terminal Maintenance screen shows the same effects.
  • Tile: a home card with the findings still open and those fixed this week, linking to the board. docs/features/maintenance-board.md describes it.
  • Existing test changed: test/home-figures.test.ts now expects 8 cards instead of 7, because the new card is one more. The test was out of date, not the code wrong.

Left out

  • Doctor findings: batch-doctor rows keep their probe as a string, not a number, so they appear in the lane but not in the findings list or the effect.
  • No switch for three lanes: batch-doctor, release-keeper and performance-watcher are not in the duty roster, so their lanes say "runs with the pipeline" and have no pause button.
  • Link column: it only fills for rows that carry an issue_id; no roster duty sets one yet.
  • Existing forges: a forge that has already been offered "maintenance" keeps its old board file and does not get the new panels; the strip above the charts shows regardless.
  • Looks: I said "No look" in the commit, since no look page covers this board.
  • New read: readRuns takes the newest 400 maintenance_run rows, which the primary key serves, so I wrote no query-plan test for it.

Try it: as an admin open /boards/maintenance. Click Pause on a lane, and the board returns showing it paused. Home shows the Maintenance card.

🤖 Generated with Claude Code

commented

<!-- look-pages cc8ecdb46d6d --> Look pages for cc8ecdb, from the gate:

  • look pages (inferred): this pull changes src/web/pages/boards-view.ts, src/web/pages/home_figures.ts, src/web/pages/maintenance.ts and 1 more; the forge pictures / (src/web/pages/boards-view.ts), /docs (src/web/pages/boards-view.ts), /explore (src/web/pages/boards-view.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The check failed because test/maintain-home-tile.test.ts used as never casts. I replaced them with a typed Figures record and a typed Kpis record (using NO_REACH). The three tests in that file pass and tsc --noEmit is clean. After the fix, bun scripts/gate.ts prints no rule or failure lines.

I committed the fix and pushed it. I ran only that one test file, not the pull's other tests, and left the full suite to the forge's check.

  • Replaces line: the commit message now has Replaces: nothing, the maintenance board page is new and takes the place of no page. That should satisfy the "say what it replaces" rule for src/web/pages/maintenance_board.ts.
  • Gate notes left alone: I made no changes for the gate's notes about similar-looking functions, effect.ts#list, boardForge and login. They are advisories, not failures.
  • Long comments: the over-100-column comment note was also left. The gate says the nightly rewrap handles it on main.
commented

<!-- look-pages 61831598885c --> Look pages for 6183159, from the gate:

  • look pages (inferred): this pull changes src/web/pages/boards-view.ts, src/web/pages/home_figures.ts, src/web/pages/maintenance.ts and 1 more; the forge pictures / (src/web/pages/boards-view.ts), /docs (src/web/pages/boards-view.ts), /explore (src/web/pages/boards-view.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The home's Maintenance card now appears only when the board has something to report, which clears the first-view budget failures. I pushed the fix.

  • Cause: the card was always on the home page, so with nothing found it took the first view to 55 blocks against a budget of 54. That failed each page stays inside its first-view budget (test/attention.test.ts) and its stamped-release twin, test/attention-stamped.test.ts.
  • Change: src/web/pages/home_figures.ts omits the card when both open and fixed are 0. It still shows, and links to /boards/maintenance, as soon as either is non-zero. A clean forge's home gives no link to the board, so it is reached through /boards.
  • Test: a new case in test/maintain-home-tile.test.ts covers the empty-board case.
  • Local runs: the two attention suites, test/json-big-page.test.ts and the tile test all pass, tsc --noEmit is clean, and the gate and design-lint report nothing.
  • The JSON-file test: a long member scrolls inside a focusable region (in test/json-big-page.test.ts) passes here and I made no change for it. I couldn't tell whether it failed in the check because of this pull or by chance. If it fails again, the next log should show which.
commented

<!-- look-pages 6d5db9b39426 --> Look pages for 6d5db9b, from the gate:

  • look pages (inferred): this pull changes src/web/pages/boards-view.ts, src/web/pages/home_figures.ts, src/web/pages/maintenance.ts and 1 more; the forge pictures / (src/web/pages/boards-view.ts), /docs (src/web/pages/boards-view.ts), /explore (src/web/pages/boards-view.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

I changed no code for this feedback. It is the gate's automated list of pages to picture, and it asked for nothing in particular.

The gate inferred 31 pages, because many routes import src/web/pages/boards-view.ts. This pull only changes the maintenance board and the home card. I pushed an empty commit with Looks: lines, as the note allows, to narrow the list.

  • Pages to look at: /boards/maintenance and /. The gate now reports "look pages (named)" and shows only /.
  • /boards/maintenance may be missing: the gate's output lists / but not /boards/maintenance. I didn't check whether it dropped that line, or whether the board is an owner-only page that it can't picture. If the board isn't pictured, that is the thing to check.
  • Home card: it shows only once there is a finding open or fixed. A clean forge's home has no card, so / pictured on an empty forge will look unchanged.
commented

The failing check came from one stale assertion, and I've fixed it and pushed. The Maintenance card now shows only once the workers have a finding to report, so the seeded home draws seven cards. The test in test/home-figures.test.ts still expected eight, and it was the test that was wrong, not the code. I set it back to seven in both places: the home page and /live/figures.

test/maintain-home-tile.test.ts still covers the card showing when there are findings.

I ran bun x tsc --noEmit and the six test files for this change: the home figures test plus the five maintenance board tests. All 21 tests pass and the type check is clean. bun scripts/gate.ts --fix changed nothing. It still lists some similar-looking functions and a few comment lines over 100 columns; I left those alone. I did not run the full suite, since the forge runs it on the push.

The board, its pause switch, the effect column and the home tile are unchanged from the earlier commits on this branch.

Try it: open /boards/maintenance as an admin, pause a duty from its lane, and check that the Maintenance card appears on home only once there are findings.

commented

<!-- look-pages 8b367d518e8a --> Look pages for 8b367d5, from the gate:

  • look pages (named): this pull changes src/web/pages/boards-view.ts, src/web/pages/home_figures.ts, src/web/pages/maintenance.ts; a commit names /
commented

I changed no code for this note. It is the gate's list of look pages for 8b367d5, and it names only /.

I think the gate read only the first Looks: line in my earlier commit, which named both / and /boards/maintenance. I pushed another empty commit that names /boards/maintenance alone. The gate still prints a commit names / and doesn't list the board, even with that commit in place.

A person should check whether the board gets pictured. If it doesn't, the gate may be skipping that route, perhaps because it is owner-only. In that case the board needs a look by hand, as an admin, at /boards/maintenance.

commented

<!-- look-pages b90c0c5fc534 --> Look pages for b90c0c5, from the gate:

  • look pages (named): this pull changes src/web/pages/boards-view.ts, src/web/pages/home_figures.ts, src/web/pages/maintenance.ts; a commit names /
commented

The gate's look-pages comment is a note, not a failure, so I changed nothing and pushed nothing.

The gate reports "look pages (named)". That means it found the pages this pull changes and found that a commit names /. Two commits carry Looks: lines, /boards/maintenance and /. I re-ran bun scripts/gate.ts on this branch and it printed the same line with no refusal and no new work tree changes.

The gate also printed some near-duplicate-function and long-comment notes. They are advisory, and I left them alone.

What changed: the Maintenance board at /boards/maintenance and the Maintenance card on the home page.

What I didn't do: I added no new look commits, because the two existing ones already name both pages.

How to try it: open / and /boards/maintenance on the preview.

[
  {"go": "/", "look": "the Maintenance card appears only once the workers have something to report", "expect": "seven cards while they have nothing, eight when they do"},
  {"go": "/boards/maintenance", "look": "each worker's findings, the actions taken and their effect", "expect": "one section per worker, with findings, actions and effect"}
]
commented

I made the three changes, plus the single runs read. I did not add a separate cache for the home figures. The gate, tsc and design-lint are clean, and the six maintenance test files pass (40 tests). I ran those files, not the whole suite.

  • Phone: the lanes table and the findings table are each wrapped in .table-scroll (role="region", tabindex="0", an aria-label), so the Pause button stays reachable at 360px. I did not check it at 360px in a browser.
  • Accessible names: each switch now reads "Pause Flow keeper" or "Resume Flow keeper" through btn's label, and both tables have an aria-label.
  • Design: the Link column, the links() lookup and the maintenance-tile line are gone from maintenance_board.ts. The home card still shows the tile figures.
  • Runs read once: tally now takes the runs, and readEffects is gone. The board, the terminal screen and readFigures each call readRuns once and pass the result in.
  • Home cache: I did not add a cache in readFigures. readFigures is called from lanes_read.ts, and its header says a home request "reads memory and draws". I did not trace that path to confirm the figures are cached. Say so if you want a cache added in readFigures.
  • Tests: I added one test in test/maintain-board-pause.test.ts for the named switches, the scroll region, the named tables, and the missing Link column and tile line. I also updated the other tests to the new tally(runs, now) signature.

Try it: open /boards/maintenance at phone width.

[
  {"go": "/boards/maintenance", "look": "lanes and findings tables at 360px", "expect": "each scrolls sideways inside its own region; the page itself does not; the Pause button is reachable by scrolling the lanes table"},
  {"go": "/boards/maintenance", "look": "tab to a Pause button with a screen reader", "expect": "it reads 'Pause <duty title>'; no Link column; no tile sentence under the pipeline"}
]
commented

<!-- look-pages b7a7558e97df --> Look pages for b7a7558, from the gate:

  • look pages (named): this pull changes src/web/pages/boards-view.ts, src/web/pages/home_figures.ts, src/web/pages/maintenance.ts; a commit names /
commented

The three failing tests are fixed and pushed. The tests that cover the change pass locally, and tsc is clean. I didn't run the full check here.

  • Dead-code test: tileWords in src/maintain/effect.ts had lost its only caller when the last commit removed the tile line, so the check flagged it. I deleted it and the assertions that used it in test/maintain-home-tile.test.ts and test/maintain-board-empty.test.ts. I also removed the import in the empty-board test that was left unused.
  • Findings-list test: test/maintain-board-shape.test.ts still expected the "maintenance: 6 findings open…" line, which the board no longer shows. I removed that expectation. The test was out of date, not the code.
  • Crawlers screen test: "the screen shows the share, the budgets that refused and the agent refused" passes when run alone, here and in its file. I made no change for it. It is probably timing-sensitive under the full sharded load. If it fails again on this push, I'll look at it properly.

bun scripts/gate.ts --fix only reported advisory notes (long comments in files I didn't touch, similar-function hints), so there was nothing to commit from it.

commented

<!-- look-pages e5be68d8dd69 --> Look pages for e5be68d, from the gate:

  • look pages (named): this pull changes src/web/pages/boards-view.ts, src/web/pages/home_figures.ts, src/web/pages/maintenance.ts; a commit names /
commented

The gate's note is informational, not a failure. It lists the pages it will look at, and / is there because commit ad71f9edc names / and /boards/maintenance under Looks:. Both are the pages this pull changes, the board and the home card.

I made no change and pushed nothing. The branch is unchanged since e5be68d8d.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs