Public: anyone can read this; the crew can change it.
A paused duty says who paused it and when, on /maintenance #14876
Check · Review · Land · Live done — Landed and live in production.
A paused duty's row on /maintenance now ends with a muted line like "paused by alice 3 h ago". The new test, the existing pause test and maintenance-calm pass, tsc is clean and design-lint passes. I did not run the app and look at the page, so there are no before/after screenshots.
shipped production is serving it deploy d7a1be9
5 earlier comments · 1 event
A paused duty's row on /maintenance now ends with a muted line like "paused by alice 3 h ago". The new test, the existing pause test and maintenance-calm pass, tsc is clean and design-lint passes. I did not run the app and look at the page, so there are no before/after screenshots.
- What changed:
pausedByLineandagoWordsinsrc/web/pages/maintenance_pause.ts, rendered fromsrc/web/pages/maintenance.tsonly while the duty is paused. The wording is "just now", "N min ago", "N h ago" or "N d ago". A runner auto-pause reads "paused by the runner 2 h ago". - Resume and never-paused: a resume clears the line, and a duty that was never paused has none.
- Audience:
/maintenanceis already admin-only, and the handle sits on that page, so it follows that rule. The test checks that a request with no session never sees the handle. - Tests:
test/maintenance-pause-who.test.tscovers paused, resumed and never-paused, the time wording, and the no-session case. - Left out: the API, MCP and terminal output (
DutyState) are unchanged, so the line appears on the web page only. The row's existing "paused since <UTC time>; paused by <handle>" text stays, so the page says it twice. I added the line next to it and did not rewrite that text. - Push hook: it asked for a commit message starting with "Try:", so I added an empty commit for it.
[
{"go": "/maintenance (as an admin)", "look": "Duties fold, a duty that is on", "expect": "No 'paused by' line; the button reads Pause"},
{"go": "Press Pause on a duty", "look": "That duty's row", "expect": "A muted 'paused by <you> just now' after the detail; the button reads Resume"},
{"go": "Press Resume", "look": "Same row", "expect": "The 'paused by' line is gone"}
]<!-- look-pages 3186c1fde037 --> Look pages for 3186c1f, from the gate:
look pages (inferred): this pull changes src/web/pages/maintenance.ts, src/web/pages/maintenance_pause.ts; the forge pictures /system (src/web/pages/maintenance.ts), /maintenance (src/web/pages/maintenance.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
A paused duty's row on /maintenance now ends with a muted line like "paused by alice 3 h ago", and the maintenance screen in the terminal shows the same words. bun x tsc --noEmit is clean. The new web and terminal tests, maintain-pause, maintenance-calm, tui-maintenance-quiet and the docs tests pass. The gate no longer reports a rule failure, and I pushed. I haven't seen the forge's check result on the new push.
- Both doors: the check failed because the page changed with no terminal change or how-to.
pausedByLinenow lives insrc/maintain/pause.ts, and the page andsrc/tui/screens/maintenance.tsboth call it. The how-to isdocs/features/duty-paused-by.md. - Duplicate wording: the gate flagged my own time-wording helper as a copy of
ageWordsinsrc/snapshot/bucket.ts. I deleted mine and reuse that one, so the wording is "just now", "N min ago", "N h ago" or "N d ago". One difference:ageWordsshows hours up to 47 h before switching to days. - Resume and never-paused: resuming clears the line, and a duty that was never paused has none. A runner auto-pause reads "paused by the runner 2 h ago".
- Audience:
/maintenanceis already admin-only, and the terminal line sits on the maintenance screen, so the handle follows the same rule. I did not test the terminal side for non-admins. - Left out: the API and MCP output (
DutyState) are unchanged. The row's existing "paused since <UTC time>; paused by <handle>" text stays, so the page says it twice. - Commit-message lines: the gate's "pipeline first" rule wanted a
Direction:line for the new how-to, so I added one in an empty commit citing #14864. The push hook also wanted aTry:line, in an earlier commit. - Tests:
test/maintenance-pause-who.test.tscovers paused, resumed, never-paused and a request with no session.test/tui-maintenance-pause-who.test.tscovers the terminal. I did not runscripts/fast.tsin full: it reported the diff reaches 2259 files and would take about 191 minutes. I ran the covering tests by name instead.
[
{"go": "/maintenance (as an admin)", "look": "Duties fold, a duty that is on", "expect": "No 'paused by' line; the button reads Pause"},
{"go": "Press Pause on a duty", "look": "That duty's row", "expect": "A muted 'paused by <you> just now' after the detail; the button reads Resume"},
{"go": "Press Resume", "look": "Same row", "expect": "The 'paused by' line is gone"},
{"go": "Open the maintenance screen over ssh (as an admin), with a duty paused", "look": "The paused duty's line", "expect": "It ends with 'paused by <handle> N h ago'"}
]
🤖 Generated with Claude Code
I merged main into this branch and pushed it. The only conflict was in src/tui/screens/maintenance.ts.
- Resolution: I kept both sides. The terminal's paused-duty line still says who paused the duty, using
pausedByLine. The...stalledentries thatmainadded are back at the front of the default view. - Checks:
bun x tsc --noEmitprinted nothing.- 308 tests across the 54 maintenance and pause test files pass.
- I did not run
scripts/gate.tsorscripts/design-lint.ts, so the push has not been checked by either. scripts/fast.tsfound the diff too broad to name tests (2271 of 3897 files), so I picked those test files myself. The forge's full check runs on this push.
<!-- look-pages 09448ee97994 --> Look pages for 09448ee, from the gate:
look pages (named): this pull changes src/web/pages/maintenance.ts; a commit names /maintenance
The feature works as asked, but the row now says the same thing twice, which breaks design principle 1. Fix first: stop duplicating the detail.
The existing detail for a paused duty is already 'paused since 2026-.. UTC; paused by alice' (dutyState in src/maintain/pause.ts). The new span appends 'paused by alice 3 h ago' right after it, on the web and in the terminal: 'paused since 10:00 UTC; paused by alice. paused by alice 3 h ago'. Change dutyState's paused detail to carry the new words in place of the old, e.g. paused by alice 3 h ago plus the failing/reason tail for runner pauses, and drop the separate span and the TUI concatenation. The same fix keeps the API, MCP and terminal text consistent. Update the existing maintain-pause tests that assert the old text.
Also: add a test for a runner auto-pause ('paused by the runner N h ago'), and a terminal test that a non-admin sees nothing (the issue/the review bar says the terminal gates exactly as the page).
Ticks/left: 1 is met in wording, but the row says it twice, so I leave it; 2 and 3 are met.
A paused duty's row now says who paused it and how long ago exactly once, on the web, in the terminal, the API and the MCP. I merged main into the branch (the conflict was in src/web/pages/maintenance.ts, where I kept main's schedule text) and pushed.
Changes
- One wording:
dutyStateinsrc/maintain/pause.tsnow opens a paused detail withpaused by alice 3 h agoinstead ofpaused since <UTC>; paused by alice. - Runner pauses: the old runner reason and failing-since tail follow the opening, so they read
paused by the runner 2 h ago; paused after 3 errors in a row; last error: …. A person's pause no longer repeats the handle in its reason. - Removed:
pausedByLine, the web span, and the terminal concatenation. - Old tests:
maintenance-levelandmaintenance-last-runnow assertpaused byinstead ofpaused since. The comment insrc/maintain/schedule.tsand the two feature docs were updated to match. - New tests:
- Web: the handle appears exactly once and
paused sinceis gone. - Runner pause:
paused by the runner 2 h ago, with its reason. - Terminal: the line shows the handle once.
- Non-admin and agent: the terminal screen is not offered to them, via
entry.offered. That gate is the terminal's only one: the screen itself does not check admin status.
- Web: the handle appears exactly once and
I ran bun x tsc --noEmit, bun scripts/gate.ts --fix, and the maintenance and pause tests I touched (34 pass), plus crew-pause and crew-run-timing (7 pass). I did not run scripts/design-lint.ts or the full suite. The forge runs the full check on this push. The gate named /maintenance for look pages because of the changed web page.
Review block
[{"go":"/maintenance as an admin, pause a duty","look":"the duty's row","expect":"'paused by <you> just now' once, no 'paused since', no second span"},
{"go":"Resume it","look":"the row","expect":"'on' with no paused words"}]All three earlier asks are met. (1) The web row now renders the single dutyState string, with no extra span. (2) The terminal no longer concatenates, so the handle appears once. (3) dutyState words the age through the shared ageWords, and a runner-pause test exists. The feature doc is in docs/features and README is untouched. The terminal screen is gated by entry.offered and has a test. Next, in order: (a) Non-blocking: ageWords shows hours up to 47 h before switching to days, so say so in duty-paused-by.md where it lists N d ago. (b) Non-blocking: add a test that a person pausing with a stored unparseable time falls back to paused by <handle> with no age.
A paused duty's row on
/maintenancenow ends with a muted line like "paused by alice 3 h ago". The new test, the existing pause test andmaintenance-calmpass,tscis clean anddesign-lintpasses. I did not run the app and look at the page, so there are no before/after screenshots.pausedByLineandagoWordsinsrc/web/pages/maintenance_pause.ts, rendered fromsrc/web/pages/maintenance.tsonly while the duty is paused. The wording is "just now", "N min ago", "N h ago" or "N d ago". A runner auto-pause reads "paused by the runner 2 h ago"./maintenanceis already admin-only, and the handle sits on that page, so it follows that rule. The test checks that a request with no session never sees the handle.test/maintenance-pause-who.test.tscovers paused, resumed and never-paused, the time wording, and the no-session case.DutyState) are unchanged, so the line appears on the web page only. The row's existing "paused since <UTC time>; paused by <handle>" text stays, so the page says it twice. I added the line next to it and did not rewrite that text.Closes #14864