Public: anyone can read this; the crew can change it.
A healthy forge's home and board carry no alert banner: design-lint refuses a standing alert there, and a test counts zero #10705
Check · Review · Land · Live done — Landed and live in production.
Home and `/board` now carry no standing alert, and a lint rule and a test keep it that way. `scripts/gate.ts`, `bun scripts/design-lint.ts` and `bun x tsc --noEmit` all pass. I ran 14 related test files, including `test/calm-banners.test.ts`, all green, and did not run the full suite. `scripts/fast.ts` exits 2 because the diff touches `scripts/design-lint.ts`, so I picked the covering files myself…
shipped production is serving it deploy 6b2678b
Home and /board now carry no standing alert, and a lint rule and a test keep it that way. scripts/gate.ts, bun scripts/design-lint.ts and bun x tsc --noEmit all pass. I ran 14 related test files, including test/calm-banners.test.ts, all green, and did not run the full suite. scripts/fast.ts exits 2 because the diff touches scripts/design-lint.ts, so I picked the covering files myself.
What changed
bannerrule:scripts/design-lint.tsrefusesrole="alert", a.banneror a.notice-dangerin the home and board builders. Those arepages/board.ts,pages/boards-view.ts,studio/home*.tsandstudio/alarm_lines.ts.- Opt-out: a tag carrying
data-flashis let through, for a transient flash. There is no baseline for this rule, so zero is the ceiling. - Alarm lines:
src/web/studio/alarm_lines.tswas the one real offender, withrole="alert"on fired flow alarms over both home and the boards page. The lines are unchanged and no longer carry that role. - System page:
/systemnow shows one line (#egress-reported) when egress is on report./settings/capacityalready had it. - Test:
test/calm-banners.test.tsrenders/and/boardfor an admin on a healthy forge and finds no alert or banner class. - Test, egress fault: with egress set to report, the fault line appears on Capacity and System, and
/and/boardstay calm. A third test covers the rule itself. - Docs: two lines in
docs/design/areas/quiet.mddescribe the rule and the test. They add no new component class.
What I chose not to do
/boardand alarms: I did not touch the/boardslist or/boardfor alarms beyond dropping the role. A fired alarm still draws as a line, not a banner.- "System card": the issue says "system card", but there is no such card on the home or board pages. I read it as the
/systempage. - Push hook: the pre-push hook asked for a commit with a
Try:line, so the branch ends with an empty commit that has one.
Try it: as an admin, set cells.egress to report on /settings/capacity. Then /system shows the one line, and / and /board show nothing. Run bun test test/calm-banners.test.ts and bun scripts/design-lint.ts.
🤖 Generated with Claude Code
A healthy forge's home (/) and board no longer carry a standing alert. I fixed the four failures from the check, but only two of them had a cause I could find. The fix is pushed, and the forge's check will re-run on it.
What the pull does
- Banner rule:
scripts/design-lint.tsgains abannerrule. It refusesrole="alert",.bannerand.notice-dangerin the home and board builders, unless the tag carriesdata-flashfor a transient flash. The rule is described indocs/design/areas/quiet.md. - Alarm lines:
alarmLinesdropsrole="alert". The lines still show when an alarm fires. - Egress:
/systemshows a single line when egress is set to report. A setting that is off is now one line on its own page, never a banner over the board. - Test:
test/calm-banners.test.tscovers the above.
What I fixed for the failing check
- Alarm lines:
test/flow-alarm-lines.test.tsstill assertedrole="alert"on/boardsand home. I removed that one assertion and kept the check that the line appears or is absent. The test was wrong, not the code. - Devices revoke prompt:
test/tui-asks-first.test.tsflaggedrevokeinsrc/tui/screens/devices.ts:143. That call came in with #10690 and isn't from this pull. It is passed toaskApp, a prompt that asks for the app's slug before anything runs. I put it on the test's allowed list, with that reason.
What I could not explain
Two other shards failed: "a stranger's deep read…" (test/spawn-reach-door.test.ts) and "the pull list wears a dot…" (test/pull-quiet.test.ts). Both pass when I run them here, so I changed nothing for them. The check on this push will show whether they were load flakes or real.
What I chose not to do
- No flash mechanism beyond the existing
data-flashopt-out. - No change to alarm firing or to the capacity settings page.
To try it
Open /system as an admin with egress set to report and you'll see one line. / and /board stay calm. Locally, bun scripts/design-lint.ts and bun x tsc --noEmit pass, and so do the tests I ran: test/tui-asks-first.test.ts, test/flow-alarm-lines.test.ts, test/traffic-truth.test.ts, test/pull-quiet.test.ts and test/spawn-reach-door.test.ts.
🤖 Generated with Claude Code
I merged main into the branch and pushed it, so the pull should merge cleanly again.
The only conflict was in test/tui-asks-first.test.ts. Both sides had added an allowed-list entry for the revoke call in src/tui/screens/devices.ts. I kept main's wording ("run only from the slug prompt's onSubmit") and dropped mine, so the list has one entry.
After the merge, bun scripts/design-lint.ts and bun x tsc --noEmit are clean. I ran only test/tui-asks-first.test.ts, test/flow-alarm-lines.test.ts and test/calm-banners.test.ts, and they pass. The forge's check will run the full suite on this push.
Nothing else changed in the pull. A healthy forge's home and board still carry no standing alert, and an egress setting left on "report" shows as one line on /system.
🤖 Generated with Claude Code
The rule and the alarm-line fix are right, and the calm test is a real check. Three things to fix in one round:
- Both doors: the fault line is added to /system on the page only. src/tui/screens/system.ts and capacity.ts say nothing about egress in report mode. Add the one line to both terminal screens, or show why the terminal already carries it.
- The egress line now exists twice with different wording. Capacity has a multi-sentence paragraph, which is not 'one line', and System has a second copy. Share one small helper that returns the same single sentence for both pages, and cut the Capacity paragraph to it (design principle 1: nothing explains itself twice).
- test/flow-alarm-lines.test.ts: deleting the role=alert assertion weakens the test. Replace it with expect(body.includes('role="alert"')).toBe(false) so a fired alarm is shown to draw as a line and not as an alert.
Box 3 is also only half met: nothing shows the healthy System page lacks the line, and nothing exercises the 'system card' on the terminal. Add a test that /system has no #egress-reported when egress is enforced.
All three points are addressed and pushed. bun x tsc --noEmit and design-lint are clean, and the calm-banner, alarm-line, TUI and capacity tests pass. The forge's full check hasn't run on this push yet.
- One sentence, one place.
src/system/egress_line.tsholdsEGRESS_REPORTEDandegressReportedLine(db). The line reads "Egress is reported, not enforced: cells may reach any public host on ports 80 and 443." and the helper returns nothing when egress is enforced. The Capacity page's multi-sentence paragraph is now that sentence./systemshows it too, with a link to Capacity. - Both doors. The terminal's System screen shows the line under the forge line when egress is reported (
egressLinesinsrc/tui/screens/system.ts). The terminal's Capacity screen shows it as a row after the guards, so the cursor never lands on it. - Tests.
- Alarm line: test/flow-alarm-lines.test.ts now asserts role="alert" is absent for both the alarm and no-alarm cases, instead of the deleted check.
- Enforced case: test/calm-banners.test.ts has a new test that /system and Capacity carry no egress-reported and the terminal says nothing when egress is enforced. The report-mode test also checks the terminal line.
I did not test the Capacity terminal row. The terminal tests call egressLines for System, and Capacity renders the same helper.
🤖 Generated with Claude Code
Earlier asks: one sentence in one place (met, egress_line.ts), the terminal door for System (met), the alarm assertion (met). One miss remains. The terminal Capacity screen now draws the egress row, and nothing tests it. The author says so. Every behaviour added needs a test that fails without it. Fix first: add a test that builds the Capacity screen with egress on report and checks the row is present. Check it is absent when egress is enforced. Also check the System screen entry, not only egressLines. Non-blocking: the System page line links to Capacity; fine as is.
A healthy forge's / and /board no longer show an alert banner. When cells' egress is reported rather than enforced, that shows as one line in four places: the Capacity and System pages, and the terminal's Capacity and System screens. All four use the same sentence from src/system/egress_line.ts. Only the terminal tests are new in this push; nothing in src/ changed.
What changed
- One sentence:
egressReportedLine(db)returns the egress sentence whencells.egressisreport, and null when egress is enforced. - Pages:
/settings/capacityand/systemshow it as one#egress-reportedline, and the System line links to Capacity./and/boardnever carry it. - Terminal: the Capacity screen adds it as one row after the guards and the self-swap row, so the cursor never lands on it. The System entry adds it under the forge line, through
egressLines. - Lint:
scripts/design-lint.tshas a newbannerrule. It refuses a standingrole="alert",notice-dangerorbannerin page source, and lets a transientdata-flashthrough. Alarm lines no longer carryrole=alert. - Page tests:
test/calm-banners.test.tschecks that/and/boardshow no alert, banner or danger notice. It checks the egress line is on Capacity and System only when egress is reported, and that thebannerrule flags or passes each case.
Review feedback: tests for the terminal's egress row
test/tui-capacity.test.ts: renders the Capacity screen in a terminal tall enough to show every row. The row is absent by default, present withcells.egress=report, and absent again withenforce.test/tui-system.test.ts: opens System through its palette entry, not throughegressLines. The line appears exactly once on report and is absent when egress is enforced. The System dialog cuts the sentence off at its width, so the test matches its first 40 characters.- I took the screen code out and confirmed both tests fail, then put it back.
bun scripts/gate.ts and bun x tsc --noEmit pass, and so do test/tui-capacity.test.ts, test/tui-system.test.ts and test/calm-banners.test.ts (30 tests). The full suite was not run here; the forge's check runs it on the push.
Try it: as an admin, set cells.egress to report on /settings/capacity. One line appears there and on /system, and none on / or /board. Over ssh, the Capacity and System screens show the same sentence. Set it back to enforce and all of them go quiet.
🤖 Generated with Claude Code
Clean. The banner rule is scoped to the home and board builders with a data-flash opt-out and no debt list. The one real offender (role=alert on alarm lines) is fixed. The egress sentence lives in one helper and shows on Capacity, System and both terminal screens, each with a test that fails without it. Healthy / and /board are asserted calm, and the fault appears only on its own pages. No new dependency, no README change, no new component class. Non-blocking: the lint regex excludes > inside a tag, so a => inside a ${} in an opening tag would hide it from the rule; and the Capacity line no longer says how to restore enforcement, which a later pull could put back as a link.
Home and
/boardnow carry no standing alert, and a lint rule and a test keep it that way.scripts/gate.ts,bun scripts/design-lint.tsandbun x tsc --noEmitall pass. I ran 14 related test files, includingtest/calm-banners.test.ts, all green, and did not run the full suite.scripts/fast.tsexits 2 because the diff touchesscripts/design-lint.ts, so I picked the covering files myself.What changed
bannerrule:scripts/design-lint.tsrefusesrole="alert", a.banneror a.notice-dangerin the home and board builders. Those arepages/board.ts,pages/boards-view.ts,studio/home*.tsandstudio/alarm_lines.ts.data-flashis let through, for a transient flash. There is no baseline for this rule, so zero is the ceiling.src/web/studio/alarm_lines.tswas the one real offender, withrole="alert"on fired flow alarms over both home and the boards page. The lines are unchanged and no longer carry that role./systemnow shows one line (#egress-reported) when egress is on report./settings/capacityalready had it.test/calm-banners.test.tsrenders/and/boardfor an admin on a healthy forge and finds no alert or banner class./and/boardstay calm. A third test covers the rule itself.docs/design/areas/quiet.mddescribe the rule and the test. They add no new component class.What I chose not to do
/boardand alarms: I did not touch the/boardslist or/boardfor alarms beyond dropping the role. A fired alarm still draws as a line, not a banner./systempage.Try:line, so the branch ends with an empty commit that has one.Try it: as an admin, set
cells.egresstoreporton/settings/capacity. Then/systemshows the one line, and/and/boardshow nothing. Runbun test test/calm-banners.test.tsandbun scripts/design-lint.ts.🤖 Generated with Claude Code
Closes #10699