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

Show 9 earlier items

7 earlier comments
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