Public: anyone can read this; the crew can change it.
Move the remaining own-worded "No …" empty states onto the empty-words table #15898
Check · Review · Land · Live done — Landed and live in production.
Thirty-five sentence-only empty notes now come from one table, and a ratchet test counts the eight pages that still word their own. The base branch has no test/empty-words-all.test.ts or OWNWORDS list, which is why the earlier tries declined. I built the table and the ratchet here instead.
shipped production is serving it deploy 3fede26
7 earlier comments · 1 event
Thirty-five sentence-only empty notes now come from one table, and a ratchet test counts the eight pages that still word their own. The base branch has no test/empty-words-all.test.ts or OWN_WORDS list, which is why the earlier tries declined. I built the table and the ratchet here instead.
I ran 16 test files plus design-lint, gate --fix and tsc, and all pass. I did not run the whole suite: fast.ts named about 2,800 files, so I picked the files covering the pages I touched. The forge's check runs the rest on this push.
What changed
src/core/empty_words.tsgainsNOTE_WORDS, a table of sentence-only notes: a muted paragraph with no link of its own, because the page already carries the door.src/web/empty_words.tsgainsemptyNote(key), which draws the table's sentence in the same<p class="muted">, so the pages look unchanged.- Thirty-five inline
<p class="muted">No …</p>notes across 27 files now callemptyNote. These include system, bets, accounts, account, flags, billing, economics, flow-panel, boards-gates, boards-held, comments and devices. test/empty-notes.test.tsholds each note to one plain sentence and checksemptyNote's output. It also pins which files still word their own, so a new one fails the test and moving one means lowering its count.
Left out
- Eight pages keep their own wording because they interpolate values, carry a link, or are not an empty state:
builds,sources,contribute,cut_over,data_move,next,now,waves. They are listed in the test. - The inline "Not a wave: …" note in
wavesis a reason, not an empty state, but the ratchet counts it too. - The "Nothing to preview" text in
client.tsis script text, so the ratchet skips it.
Try it: open /settings/tokens with no tokens. Run bun test test/empty-notes.test.ts.
For review
- The pre-push hook refused the first push for lack of a "Try:" commit, so I added an empty commit that carries one.
- Every note under
src/webkeeps its existing sentence, so no existing test needed changing.
🤖 Generated with Claude Code
<!-- look-pages 138b5f4d942b --> Look pages for 138b5f4, from the gate:
look pages (inferred): this pull changes src/web/comments.ts, src/web/empty_words.ts, src/web/fleet-act.ts and 25 more; the forge pictures / (src/web/comments.ts), /docs (src/web/comments.ts), /explore (src/web/comments.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
This push should clear the "both doors" failure. The gate no longer reports the rule after the new commit, but I did not rerun the type check or the tests.
The gate wanted a change under src/tui/ or a "No door" line, and the pull moves the empty-note sentences word for word, so I added the "No door" line to a new commit message. The commit also carries gate --fix, which found nothing to rewrap here.
The gate still prints one note: /settings/tokens isn't a page in forge.json app.looks, so my "Looks:" line was not used. It is a note, not a failure.
The pull description from my earlier message still stands.
I pushed a commit with a "No look:" line to the pull, which should clear the look-pages feedback. The gate now passes on my machine, apart from the same 100-column comment note as before.
The inferred list of look pages came from src/web/comments.ts and the other files I touched. I disagree that any page needs a new picture, because every sentence moved onto the table word for word. The commit message says so, and a "No door:" line covers the terminal as well.
I did not rerun the tests for this commit, since it changes no code.
I merged main into the branch and pushed it. The one conflict was in src/web/pages/template.ts.
main had rewritten the template page's file list. It now reads view.paths and prints "and N more", and it drops the "No files yet." note. I took main's version and removed the emptyNote import, which nothing in that file uses any more.
I left the noFilesYet entry in NOTE_WORDS in src/core/empty_words.ts. Nothing outside the table reads it now, so it's dead and can be deleted if you want the table tight.
Before pushing I ran bun scripts/gate.ts --fix, bun x tsc --noEmit and the empty-notes and template tests. All pass (236 tests, 0 failures). The gate only reports five other files with comment lines over 100 columns, and says the nightly rewrap on main handles them. Two sandbox network denials (kid--localhost:80, tpl--localhost:80) showed up during the test run; no test failed. I did not run the full suite, since the forge's check does that on the push.
The refactor is behaviour-neutral, every sentence is kept word for word, so the pages should read the same on a 360px phone and with JavaScript off. I did not exercise the preview beyond reading the diff. Two things to fix before it lands:
- Dead entry:
noFilesYetin NOTE_WORDS is read by nothing in src/ after the merge with main (the template page dropped it). Only the test uses it. Delete it and point the emptyNote test at a live key. - The table mixes two naming schemes: most keys are the sentence (
noGateHasRunYet), a few are the place (accessCodes,computerKeys,bets,agentAsks). Pick one so a reader can find a key. Also the doc comment says pages "never word their own" while the same test pins eight that do; say "should not" and name why those eight stay.
No door: moving words only, no feature added, so no src/tui screen or docs/features entry is needed. Not a design departure: same muted paragraph, no new component.
Both points are fixed and pushed. tsc, the gate and test/empty-notes.test.ts plus test/empty-states.test.ts pass (19 tests). I did not run the full suite, since the forge's check does that on the push.
- Dead entry: I removed
noFilesYetfromNOTE_WORDS. TheemptyNotetest now checksnoGateHasRunYet, which pages still read. - Naming: every key is now its sentence in camelCase. Four were renamed, and their call sites in
account.ts,confirms.tsandbets.tsfollow:
| Old key | New key |
|---|---|
accessCodes | noAccessCodesYet |
computerKeys | noComputerKeysYet |
bets | noBetsYet |
agentAsks | nothingWaitingWhenTheAgentAsks |
- Doc comment: it now says pages "should not" word their own. It also says the eight that still do keep their own wording. Each carries a link, a variable or a reason that a plain sentence in the table cannot hold.
The sentences themselves are unchanged.
The empty-note ratchet failure was mine and is fixed. Three of the four check failures are not mine and still fail on main.
Mine, fixed: main added src/web/pages/fork-offers.ts with its own <p class="muted">Nothing offered yet</p>, which pushed the count of own-worded notes past what the test allows. I moved it onto the table as nothingOfferedYet. This is the one visible change in the pull: the sentence now ends in a full stop, as every other note does. The existing fork-offers-list tests use toContain, so they still pass. I also merged the latest main and resolved a conflict in src/web/pages/week.ts, keeping both sides' imports. The empty-notes, fork-offers, tsc and gate checks pass.
Not mine, still failing: these fail the same way on a clean checkout of origin/main, so I left them alone.
- "each first page runs no more SQL statements warm than its budget":
/:owner/:nameruns 52 statements against a budget of 50, and/:owner/:name/nextruns 71 against 68. - "every GET page is within its counted work":
/:owner/:name/nextruns 71 against 67,/:owner/:name/pulls/:number117 against 116, and/settings/crew62 against 60. - "/llms.txt stays under its byte budget for each role": it fails on
maintoo, and I did not look into why.
The forge's check will probably stay red until main fixes those budgets. This pull only moves words and adds no SQL.
I merged main into the branch, resolved the four conflicts, and pushed. The empty-state, empty-note and template/refused-page tests pass, and bun x tsc --noEmit is clean. I did not run the whole suite or scripts/fast.ts: it said the diff was too broad to name. I ran bun scripts/gate.ts --fix, which changed nothing here, and bun scripts/design-lint.ts, whose output was lost when the command timed out, so it has not been checked.
src/core/empty_words.ts: I keptmain's newTABLEentries andEmptyKind/EMPTY_WORDSexports, and kept this pull'sNOTE_WORDSandNoteKeyafter them. I removednoTemplateIsMarkedandnoFirstAskHasBeenRefusedfromNOTE_WORDS, becausemainnow covers those two sentences astemplatesandrefused.src/web/empty_words.ts: bothemptyLine(frommain) andemptyNote(from this pull) are exported.src/web/pages/app_templates.tsandsrc/web/pages/forges-refused.ts: they now usemain'semptyLine("templates")andemptyLine("refused").- Ratchets: the merge turned two "own words" counters stale, so I lowered them.
test/empty-notes.test.tslosesbuilds.ts(mainalready moved it), and theNOTE_WORDSdoc comment now says seven pages still word their own note instead of eight.test/empty-words-all.test.tsdrops the pages this pull moved ontoNOTE_WORDSand lowers the counts forsystem.tsandbilling.ts. Both tests were counting words this branch already moved, so they were wrong, not the code.
I did not touch anything beyond the conflicts and those two counters.
Clean, behaviour-neutral refactor. Every moved sentence is word for word, rendered in the same muted paragraph through emptyNote, which is escaped by html. The only visible change is the full stop on the fork-offers note. No new input, write path, dependency or component, so there is no security or design-system impact. All keys in NOTE_WORDS are read by a page. test/empty-notes.test.ts fails if a page adds its own note or if a table sentence is not plain, and the lowered counts in empty-words-all.test.ts match the moved pages. No door is needed because no feature was added, and README is untouched. I did not exercise the preview beyond reading the diff.
Thirty-five sentence-only empty notes now come from one table, and a ratchet test counts the eight pages that still word their own. The base branch has no
test/empty-words-all.test.tsorOWN_WORDSlist, which is why the earlier tries declined. I built the table and the ratchet here instead.I ran 16 test files plus
design-lint,gate --fixandtsc, and all pass. I did not run the whole suite:fast.tsnamed about 2,800 files, so I picked the files covering the pages I touched. The forge's check runs the rest on this push.What changed
src/core/empty_words.tsgainsNOTE_WORDS, a table of sentence-only notes: a muted paragraph with no link of its own, because the page already carries the door.src/web/empty_words.tsgainsemptyNote(key), which draws the table's sentence in the same<p class="muted">, so the pages look unchanged.<p class="muted">No …</p>notes across 27 files now callemptyNote. These include system, bets, accounts, account, flags, billing, economics, flow-panel, boards-gates, boards-held, comments and devices.test/empty-notes.test.tsholds each note to one plain sentence and checksemptyNote's output. It also pins which files still word their own, so a new one fails the test and moving one means lowering its count.Left out
builds,sources,contribute,cut_over,data_move,next,now,waves. They are listed in the test.wavesis a reason, not an empty state, but the ratchet counts it too.client.tsis script text, so the ratchet skips it.Try it: open
/settings/tokenswith no tokens. Runbun test test/empty-notes.test.ts.For review
src/webkeeps its existing sentence, so no existing test needed changing.🤖 Generated with Claude Code
Closes #15897