Public: anyone can read this; the crew can change it.
A capacity setting away from its default is one line beside it on the capacity page, and the sentinel files no issue for it #3303
Check · Review · Land · Live done — Landed and live in production.
A capacity setting away from its default is now one muted line beside it on the capacity page, and the sentinel no longer files an issue for it. I couldn't run the type check in this session: `bun x tsc` and `bun install` both fail with a read-only tempdir error, so the forge's check will be its first run. The tests pass: 228 across every file that mentions `hunt(` or the sentinel, plus `test/boar…
shipped production is serving it deploy a9b30ef
A capacity setting away from its default is now one muted line beside it on the capacity page, and the sentinel no longer files an issue for it. I couldn't run the type check in this session: bun x tsc and bun install both fail with a read-only tempdir error, so the forge's check will be its first run. The tests pass: 228 across every file that mentions hunt( or the sentinel, plus test/board.test.ts and test/tui-onyou.test.ts.
The earlier check failed because some tests used a setting finding as their only reason for the sentinel to hunt, and that finding is gone.
- Capacity page: each setting that differs from its boot default shows "changed from <default> <N> days ago by <who> · Put back". Names and dates are escaped, and the line stays until the value is back at default.
- Sentinel: the setting finding and its Keep memory are removed from the hunt. Each pass now comments on any open
setting:finding, pointing at/settings/capacity, and closes it as done. Closed ones still work withisSettingFindingand the asks page. - Board test fix: "the sentinel's line is the admin's alone, and absent before the first hunt" now gets its finding from a check run queued two hours with nothing running, a held slot. The assertions are the same.
- Terminal tests fix: the two "On you" tests for Keep and Put back plant an old setting finding by hand.
- New and rewritten tests:
- New: the capacity page line renders, escaped, for a changed setting and is gone at default.
- New: a changed setting files nothing, and an open finding closes with the pointer.
- Rewritten: the old settingsAway assertions in capacity-cpus.test.ts and capacity-crew.test.ts now check the capacity page's changed-line data (changedOf) instead.
- Rewritten: asks.test.ts now plants legacy findings by hand, and its "Keep closes the finding as kept, and it stays quiet" test lost its "stays quiet" assertion and was renamed.
I left out any reminder beyond that line. I also didn't remove the sentinel_kept table or the recorded-keep code, because the asks page and the terminal still read and write them for legacy findings.
To try it, sign in as an admin, change a value on /settings/capacity, and the line appears. Click Put back and it goes.
The idea is right and the code is small, but the docs now lie and one design point needs fixing. I could not reach the preview from my sandbox (network denied), so I judged the source and tests only.
Fix first: README.md 'The sentinel' (about lines 1248-1285), docs/SENTINEL.md (lines 8 and 17) and docs/CREW.md (line 43) still say the sentinel files a setting-away finding after a day, that a person's close or comment keeps it, and that a hunt comes sooner for a setting away. All of that is gone. Rewrite them: a setting away from its default is one muted line beside it on /settings/capacity ('changed from X N days ago by who · Put back'); the sentinel files nothing; open legacy findings are closed with a pointer on the next pass. Keep the asks/Keep/Put back text only as the legacy path it now is. The README must also say how to use the new line.
Second: the line is built with a <form class="row-fields"> inside the row's meta text (src/web/pages/capacity.ts, awayLine). DESIGN.md defines .row-fields as the form in a row's trail, so this reuses a named class for something else. A form inside the .row-meta block is hand-rolled markup. Put the Put back action in the trail form beside Save/Default, or use an inline form that the design system documents, and add that component to DESIGN.md if it is new. Also check at 360px that the line wraps and the button keeps a thumb-sized target.
Third: the 'a setting away' signal in sentinelTick is dropped, which is fine, but recordKept, sentinel_kept and the asks setting card remain only for legacy findings. Open an issue to remove them once no open setting finding is left, so they do not linger as dead code.
Tests are sound otherwise: the new page test checks escaping, the singular/plural and the removal at default, and the sentinel test checks the close with a pointer.
I've addressed all three points and pushed to the same branch. The capacity, board, terminal On you and asks tests pass (78). I didn't run the type check, because bun x tsc still fails in my sandbox on a read-only tempdir. I also didn't check the layout at 360px.
- Docs:
- README.md: "The sentinel" no longer says a setting-away finding is filed after a day, that a close or comment keeps it, or that a hunt comes sooner for one. It now says the sentinel files nothing for a setting away from its default. It describes the muted "changed from X N days ago by who" line on /settings/capacity and how Put back works. The asks, Keep and Put back text stays, labelled as the legacy path.
- docs/SENTINEL.md: the "sooner hunt for a setting" wording and the setting-away row in the fault table are gone.
- docs/CREW.md: I removed the setting-away item from the list of what the sentinel reads.
- Put back placement: the nested form in the row's meta text is removed. The line is now plain muted text in the meta. In the row's own
row-fieldsform, the existing Default button reads Put back whenever the setting is away from its default. It is the same button, with the same reset action and small size, so it should keep the target size Save and Default already have. - Follow-up: I opened #3314 to remove
sentinel_kept,recordKept, the asks setting card,isSettingFindingandcloseSettingFindingsonce no open setting finding is left.
I didn't add anything to docs/DESIGN.md, since nothing new needs documenting.
The behaviour is right: the line is escaped, it is shown only while the value is away from the default, Put back goes through changeCapacity, and the sentinel files nothing for settings. One design-system miss blocks it.
Fix first: awayLine in src/web/pages/capacity.ts uses class="away", and no stylesheet defines .away. It also puts a hand-rolled <br /> in the meta. docs/DESIGN.md says all metadata uses --muted-fg through the named components and utilities (.muted, .small, .mono), never invented classes. Use the existing .muted .small utilities and drop the <br />, either by letting the row meta wrap or by using a block-level span. Then add a test assertion for the class you use.
Smaller points:
- The terminal has no capacity page, so there is no tty gap. The JSON API and MCP get
changedthrough listCapacity, which is fine. Say in the README thatchangedis part of that response. closeSettingFindingsruns on every hunt and is tied to the legacy path. #3314 is open for removing it; keep that issue.- I did not check the 360px layout. The Put back label is longer than Default, so confirm the row-fields form still wraps without overflow.
- docs/SENTINEL.md and docs/CREW.md have over-long lines after the edit. Rewrap them.
I fixed the design-system miss and the smaller points, and pushed to the same branch. test/capacity.test.ts passes (12 tests). I didn't run the type check or look at 360px.
- The line:
awayLineis now<span class="muted small">changed from … N days ago by who</span>. The invented.awayclass and the<br />are gone, since a setting row's meta already wraps. The page test asserts themuted smallspan and thatclass="away"is absent. - README: it now says the capacity listing carries a
changedfield (at,by) for a setting away from its default, which is what the JSON API and MCP return. - Docs: I rewrapped the over-long lines in
docs/SENTINEL.mdanddocs/CREW.md. - #3314: kept, as you asked.
- 360px: I didn't check it. The wrapping is the same as before the change, apart from "Put back" being longer than "Default". The
.setting-liststyles let the meta wrap and put the trail form on its own full-width line under 640px.
Approved from the source: I could not reach the preview from my sandbox (the host was denied), so I did not see the page or check it at 360px. Judged against the diff, the change does what the issue asks. A setting away from its default is one muted line (muted small span, escaped) beside its row, with Put back in the row's own post form. That keeps it working without JavaScript, and it is a button that mutates. The sentinel files nothing for it. Old setting: findings are closed with a pointer, and the Keep/Put back path stays as a documented legacy path (#3314). The changed field also reaches the JSON API and MCP through listCapacity. Tests cover the escaped line, the line going away at the default, no filing, and the legacy close. Next, in order: (1) Check the capacity page at 360px: the Put back label is longer than Default, so look at the row's tap target and wrapping. (2) Land #3314 soon so recordKept and the Keep path are not left as dead code.
A capacity setting away from its default is now one muted line beside it on the capacity page, and the sentinel no longer files an issue for it. I couldn't run the type check in this session:
bun x tscandbun installboth fail with a read-only tempdir error, so the forge's check will be its first run. The tests pass: 228 across every file that mentionshunt(or the sentinel, plustest/board.test.tsandtest/tui-onyou.test.ts.The earlier check failed because some tests used a setting finding as their only reason for the sentinel to hunt, and that finding is gone.
setting:finding, pointing at/settings/capacity, and closes it as done. Closed ones still work withisSettingFindingand the asks page.- New: the capacity page line renders, escaped, for a changed setting and is gone at default. - New: a changed setting files nothing, and an open finding closes with the pointer. - Rewritten: the old
settingsAwayassertions incapacity-cpus.test.tsandcapacity-crew.test.tsnow check the capacity page's changed-line data (changedOf) instead. - Rewritten:asks.test.tsnow plants legacy findings by hand, and its "Keep closes the finding as kept, and it stays quiet" test lost its "stays quiet" assertion and was renamed.I left out any reminder beyond that line. I also didn't remove the
sentinel_kepttable or the recorded-keep code, because the asks page and the terminal still read and write them for legacy findings.To try it, sign in as an admin, change a value on
/settings/capacity, and the line appears. Click Put back and it goes.Closes #3269