Public: anyone can read this; the crew can change it.
Empty words: move the admin and system pages onto the shared table #15909
Check · Review · Land · Live done — Landed and live in production.
The admin, system and account pages now draw their empty states from EMPTYWORDS, but the OWNWORDS ratchet in test/empty-words-all.test.ts isn't in this tree, so the "files leave OWNWORDS" item is not done.
shipped production is serving it deploy acf6716
17 earlier comments · 2 events
The admin, system and account pages now draw their empty states from EMPTY_WORDS, but the OWN_WORDS ratchet in test/empty-words-all.test.ts isn't in this tree, so the "files leave OWN_WORDS" item is not done. That test and the reason field didn't exist on main (2d4dc7d31), so I added reason myself and have no ratchet to confirm the files are clear. It still needs doing once the base work lands.
The checks I ran are clean: tsc, scripts/gate.ts --fix and design-lint, plus 18 test files that mention these empty sentences (160 tests, one failure fixed below). The keys suite skipped its ssh-keygen tests here. I did not run the whole suite; the forge's check does that.
What moved
src/core/empty_words.tsgains 24 kinds:codes,keys,tokens,changes,auditApps,dirs,processes,heap,samples,stalls,minutes,telemetry,disks,egress,runners,billingCodes,sentForges,agents,trusted,linkedVisitors,returnVisitors,teams,teamAgents,loadsanddevices.labelandhrefare now optional on a row. OnlyauditAppskeeps a link ("New app",/apps/new, which exists unscoped); the others draw no link.- A row may carry a
reason, drawn as the note under the sentence. It is set oncodes,keys,auditAppsandlinkedVisitors, where the page didn't already say what the list is. src/web/empty_words.tsdraws the reason and leaves out the link when a row has none.- The sites converted:
account.ts: codes, keys.accounts.ts: tokens.admin-limits.ts,capacity.ts,economics.ts: changes.audit.ts: its ownempty({...})block.system.ts: all seven measurement lists.capacity.ts: egress.runners.ts,billing.ts,grants.ts,trusted.ts,visitors.ts,teams.ts.settings.ts: loads.settings/devices.ts.
- The sentences are the same as before, with a few gaining a full stop. The
/settings/tokensand/settings/keyspages now show a small block with an icon instead of a bare muted line.
Tests
- I changed
test/account-rows.test.ts. It insisted that empty lists are "one muted sentence, not a panel", which is exactly what this issue reverses, so it now expects the shared markup. test/empty-states.test.tsgets one new test: every kind is one sentence, and a link needs both its label and its place.docs/features/empty-words.mdhas a short note on the new kinds.
Left alone
accounts.ts"No active owner" is a heading for a warning, not an empty list.billing.ts"No event yet" is a value in a status row.- The "No such token/key/browser" and "No other browser was signed in" messages are flash messages.
- The "No force-push" line in
settings.tsis a sentence about branch protection.
The push hook asked for a Try: line, so the last commit is empty. To try it, open /settings/tokens on an account with no codes, then /system and /settings/capacity as admin.
[
{"go":"/settings/tokens","look":"the Access codes block with no codes","expect":"a small icon block saying 'No access codes yet.' with the note about scripts and CI, and no link"},
{"go":"/settings/keys","look":"the Computer keys block with no keys","expect":"'No computer keys yet.' with the note about git over SSH"},
{"go":"/audit","look":"the page with no audited apps","expect":"'No apps to audit.' with its note and one 'New app' link"}
]
🤖 Generated with Claude Code
<!-- look-pages c752aec7df3a --> Look pages for c752aec, from the gate:
look pages (inferred): this pull changes src/web/empty_words.ts, src/web/pages/account.ts, src/web/pages/accounts.ts and 14 more; the forge pictures / (src/web/empty_words.ts), /docs (src/web/empty_words.ts), /explore (src/web/empty_words.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
This pull moves the empty-state wording on the admin, system and account pages into one shared table, EMPTY_WORDS. The words each page shows are unchanged.
The check failed on the "both doors" rule: the pull edits pages under src/web/ but nothing under src/tui/. The terminal needs no edit, because the table's shared part lives in src/core/empty_words.ts, which the terminal already shares. I did not edit src/tui/. I added an empty commit with a No door: line saying that, so the rule is satisfied.
I did not re-run the gate, tsc or the tests after the fix, since the new commit changes no files. The forge's check on this push will be the first run of the gate with the No door: line.
To try it, open /settings/tokens with no codes and check that the empty state is the shared one.
[{"go":"/settings/tokens","look":"the empty state with no codes","expect":"the shared empty-state wording from EMPTY_WORDS, as before"}]
🤖 Generated with Claude Code
The gate's comment was its list of 28 inferred look pages, with no change requested. I narrowed the look to /settings/tokens with a Looks: /settings/tokens line in a new commit and pushed it. I did not re-run any checks or tests; the commit changes no files.
I chose that page because it is the one the pull's try-step names. The other inferred pages all render empty states from the same shared table, EMPTY_WORDS, and their wording is unchanged. If you want more of them pictured, name them in a Looks: line.
The earlier "both doors" fix still stands: the No door: commit says the terminal already shares the wording from src/core.
[{"go":"/settings/tokens","look":"the empty state with no codes","expect":"the shared empty-state wording from EMPTY_WORDS, unchanged from before"}]
🤖 Generated with Claude Code
<!-- look-pages 4a95f1d84ad4 --> Look pages for 4a95f1d, from the gate:
look pages (inferred): "Looks: /settings/tokens" is not a page of app.looks in forge.json; this pull changes src/web/empty_words.ts, src/web/pages/account.ts, src/web/pages/accounts.ts and 14 more; the forge pictures / (src/web/empty_words.ts), /docs (src/web/empty_words.ts), /explore (src/web/empty_words.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The only failure this pull caused was test/capacity-first-view.test.ts, and it passes again with this fix. The other red tests were not counted against the pull: pages-budget and page-budget are also red on main, and snapshot-repositories failed only beside other shards. I did not investigate those further.
Cause: the /capacity first view was 25,161 bytes against a 25,000 limit. Drawing its two empty lines ("Egress connections" and "Changes") with emptyList() added an icon block to each, which pushed it over.
Fix: src/web/pages/capacity.ts keeps its original one-line <p class="muted small"> markup and takes the sentences from EMPTY_WORDS.egress and EMPTY_WORDS.changes. The wording still comes from the shared table, and the page is the same size as before the pull.
Checks run: capacity-first-view and empty-states tests pass, tsc --noEmit is clean, and the gate raises no new rule. The gate notes that Looks: /settings/tokens is not a page listed in app.looks in forge.json. It still falls back to its inferred list and the note does not fail the check, so I left it.
I did not run the full suite.
[{"go":"/capacity","look":"the Egress connections block and the Changes block when empty","expect":"the same plain muted one-line sentences as before the pull"}]
🤖 Generated with Claude Code
The gate's note was right: /settings/tokens is not in app.looks in forge.json, so my earlier Looks: line named a page the forge can't picture. I pushed a new commit whose message has Looks: lines for /system, /admin/limits and /settings/grants. All three are in app.looks, and this pull changes the pages behind them. I did not run any tests or checks, because the commit changes no files, and I haven't seen the gate's verdict on it.
I left the inferred list alone for the other changed pages. They render empty states from the same EMPTY_WORDS table with unchanged wording, and most of them (/settings/tokens among them) aren't in the forge's look list anyway.
[{"go":"/system","look":"a section with nothing to list, such as processes, heap, stalls or samples","expect":"the sentence from EMPTY_WORDS, in the same place as before"},{"go":"/admin/limits","look":"the empty state","expect":"the shared empty-state wording, unchanged"},{"go":"/settings/grants","look":"the empty state with no grants","expect":"the shared empty-state wording, unchanged"}]
🤖 Generated with Claude Code
I merged main into the branch, resolved the four conflicts, and pushed. tsc is clean, and the empty-state, ratchet, capacity and account-rows tests pass. I did not run the full suite.
- Table and icons (
src/core/empty_words.ts,src/web/empty_words.ts): the kinds from this pull and frommainare now all in the one table.emptyListismain's version, which adds thetitleandnoteoverrides and thehreffallback. src/web/pages/waves.ts: I tookmain's version.docs/features/empty-words.md: it ismain's text, plus this pull's paragraph on the admin, system and account pages.- Ratchet: the count in
test/empty-words-all.test.tsof pages that word their own "No …" line has dropped to zero for the 15 pages this pull moved onto the table, so I removed their entries. I also removed the#15899mention from the comment above the list. - Test relaxed: my table test in
test/empty-states.test.tsinsisted every label have anhref.main'sbuildskind has a label and nohrefon purpose, since each repository hands in its own, so the test now allows that.
The "both doors" No door: line and the Looks: lines from earlier commits still stand. The forge's check will run on this push.
[{"go":"/system","look":"a section with nothing to list","expect":"the shared sentence, unchanged"},{"go":"/capacity","look":"Egress connections and Changes when empty","expect":"the plain one-line sentences, page under its size budget"},{"go":"/root/fresh/forks","look":"the empty forks list","expect":"main's wording with its reason, still drawn from the same table"}]
🤖 Generated with Claude Code
<!-- look-pages e1c9b131204d --> Look pages for e1c9b13, from the gate:
look pages (named): this pull changes src/web/empty_words.ts, src/web/pages/account.ts, src/web/pages/accounts.ts; a commit names /system
<!-- look-pages 6696b136c475 --> Look pages for 6696b13, from the gate:
look pages (named): this pull changes src/web/empty_words.ts, src/web/pages/account.ts, src/web/pages/accounts.ts; a commit names /system
That gate note is the same automated look-pages message as before. It names the pages this pull changes, and it asks for nothing more from me. The merge is pushed as 6696b136c, and the forge's check is running against it.
To look at them, open these pages on the preview at https://lab--15909--forge-trevato-apps.open-platform.sh:
/system/admin/accountsand the account page, where a list is empty. Each empty list should show one sentence, a reason where the table gives one, and at most one plain link.
[
{"go": "/system", "look": "any empty list, such as stalls or the heap census", "expect": "one plain sentence ending in a full stop, no second accent colour"},
{"go": "/admin/accounts", "look": "an empty list", "expect": "the table's sentence, with a reason or a single link where the table gives one"}
]One thing to fix: /settings/capacity still hand-rolls its two empty states. It reads the sentence from EMPTY_WORDS but draws it as its own <p class="muted small">, so the page does not use emptyList(kind) and does not get the table's markup or any reason the table adds later. Issue box 1 asks that each empty state draw with emptyList(kind). The page went over its 25,000-byte first-view budget when emptyList was used, so the fix is not to hand-roll it. Either add a compact option to emptyList (a one-line variant with no icon) and use it for these two sites and the other small inline lists, or raise the budget in the test with a stated reason. The same small spots should be checked on a 360px phone: teamAgents inside a fieldset, loads inside the visitors block, and the disks <li> on /system each now carry the full icon block. Everything else is fine: the files left OWN_WORDS, the sentences are unchanged, the docs note is in docs/features/empty-words.md and not the README, and the terminal shares src/core. Not run by me: design-lint after the merge.
I merged main again, resolved the conflicts, and fixed the /settings/capacity empty states juniper flagged. Pushed as b139c0dbf. tsc is clean and design-lint passes. 152 tests across 18 files pass; I did not run the whole suite, and I did not check the 360px layout in a browser.
Merge. While this pull waited, main landed #15898, which moves many of the same pages onto a parallel NOTE_WORDS table and an emptyNote helper. At the eight conflicting sites (account, accounts, billing, economics, grants, system and devices pages, plus test/empty-words-all.test.ts) I kept main's emptyNote calls. I deleted the table kinds this pull had added that nothing uses any more: codes, keys, tokens, agents, devices, sentForges, processes, samples, stalls, minutes, telemetry. Their sentences now live only in NOTE_WORDS. The OWN_WORDS list in test/empty-words-all.test.ts is now main's, minus the pages this pull moved onto the table. I updated two assertions in test/account-rows.test.ts, because those two empty states now render as a plain <p class="muted"> instead of the icon block.
Juniper's change request. Capacity's two hand-written paragraphs now go through emptyLine, the compact one-line form in src/web/empty_words.ts. I widened emptyLine to accept any kind and to take an optional id, so #egress-open is kept. I used it instead of a new emptyList option because it was already that variant. I also switched the three spots juniper listed for 360px — teamAgents, loads and the /system disks <li> — from the full icon block to emptyLine. I did not raise the 25,000-byte budget.
To try it: open /settings/capacity, /system, a team page and /settings on the preview with nothing configured. Each empty state should be one muted line, and the egress line keeps the egress-open id.
[
{"go": "/settings/capacity", "look": "Egress connections and Changes with nothing recorded", "expect": "one muted line each, no picture block, page still renders in one screen"},
{"go": "/system", "look": "Disks and network with none read, at 360px", "expect": "a single muted line inside the list item"},
{"go": "/settings/tokens", "look": "Access codes with none minted", "expect": "one muted sentence with its reason, followed by the new-code form"}
]<!-- look-pages b139c0dbfe5e --> Look pages for b139c0d, from the gate:
look pages (named): this pull changes src/web/empty_words.ts, src/web/pages/admin-limits.ts, src/web/pages/audit.ts; a commit names /system
I merged main into the branch and pushed; the merge had one conflict, in test/empty-words-all.test.ts.
What conflicted. The OWN_WORDS list in that test. Both sides had edited it. main still listed admin-limits, audit, billing, system, teams, trusted and visitors as pages with their own empty-state wording. This branch moves those pages onto the shared empty-words table, so I dropped those entries.
Two more entries I dropped. boards-holds.ts and waves.ts also came off the list. Each now has zero own-worded empty states, so keeping them failed the "a page that moved to the table is off the list" check.
Checks.
bun scripts/gate.ts --fixchanged nothing. It noted one comment over 100 columns, invisitors.ts, which the nightly rewrap handles onmain.bun x tsc --noEmitprinted nothing; I didn't confirm its exit code.- The tests I ran all pass (17 tests in 4 files): the
empty-wordstests,admin-words,admin-limits-wordsandadmin-lists-paged. - I did not run the tests
scripts/fast.tsnames. It picked 3,486 of 4,182 files, about 293 minutes, so I ran the ones that cover this change by hand. The forge runs the full check on the push.
How to try it. Open the admin and system pages with nothing in them (/admin/limits, the audit page, billing, teams, visitors, /system). Each should show the shared empty-words sentence, and bun test test/empty-words-all.test.ts should pass.
Earlier asks met: /settings/capacity now draws egress and changes through emptyLine (one muted line, #egress-open kept, under the byte budget), and teamAgents, loads and the /system disks row use the compact line, so nothing costs a picture block at 360px. design-lint is clean; empty-words-all, empty-states and capacity-first-view pass (37 tests); the preview answers 200. Next, two things I would do: (1) Non-blocking: the emptyLine id branch duplicates the paragraph; build the attribute once. (2) Non-blocking: the docs note lists kinds by wording; link the table instead so it does not drift.
<!-- look-pages 486e73d54ab4 --> Look pages for 486e73d, from the gate:
look pages (named): this pull changes src/web/empty_words.ts, src/web/pages/admin-limits.ts, src/web/pages/audit.ts; a commit names /system
That comment is the gate listing which pages it will screenshot for commit 486e73d: /system, plus the pages behind src/web/empty_words.ts, admin-limits.ts and audit.ts. It asks nothing of me, so I'm making no change.
Two things to know:
- That commit is the one with the merge markers. I fixed the markers in
b44225126, so the screenshots for486e73dcame from a build that didn't start. The next gate run should use the fixed head. - I haven't looked at the rendered pages myself. The preview is at https://lab--15909--forge-trevato-apps.open-platform.sh. Check
/system,/admin/limitsand the audit page there once it has redeployed.
<!-- look-pages b44225126939 --> Look pages for b442251, from the gate:
look pages (named): this pull changes src/web/empty_words.ts, src/web/pages/admin-limits.ts, src/web/pages/audit.ts; a commit names /system
I made no change this turn. The comment on b442251 is the gate listing the pages it will screenshot: /system, plus the pages behind src/web/empty_words.ts, admin-limits.ts and audit.ts. It asks for no fix, so there was nothing to address.
b442251 is the commit with the merge-marker fix. The preview at https://lab--15909--forge-trevato-apps.open-platform.sh answers / with 200, so it boots again. I didn't open /system or the other named pages, because they need an admin session. The branch is clean and in sync with origin.
If a reviewer sees something wrong on one of those pages, tell me which and I'll fix it.
Earlier asks are met. /settings/capacity keeps its page under budget and its #egress-open id through emptyLine. The team agents list, the loads line and the /system disks item are now one muted line each, which fits 360px. OWN_WORDS lost the moved files, and the table test holds every kind to one sentence and one link at most.
Non-blocking: (1) emptyLine now carries two near-identical return branches, so build the <p> once and add the id conditionally. (2) The loads line lost its mt spacing, so check the gap under the dl at 360px. Next I would add a test that /settings/capacity still has id=egress-open when empty.
The admin, system and account pages now draw their empty states from
EMPTY_WORDS, but theOWN_WORDSratchet intest/empty-words-all.test.tsisn't in this tree, so the "files leaveOWN_WORDS" item is not done. That test and thereasonfield didn't exist onmain(2d4dc7d31), so I addedreasonmyself and have no ratchet to confirm the files are clear. It still needs doing once the base work lands.The checks I ran are clean:
tsc,scripts/gate.ts --fixanddesign-lint, plus 18 test files that mention these empty sentences (160 tests, one failure fixed below). Thekeyssuite skipped itsssh-keygentests here. I did not run the whole suite; the forge's check does that.What moved
src/core/empty_words.tsgains 24 kinds:codes,keys,tokens,changes,auditApps,dirs,processes,heap,samples,stalls,minutes,telemetry,disks,egress,runners,billingCodes,sentForges,agents,trusted,linkedVisitors,returnVisitors,teams,teamAgents,loadsanddevices.labelandhrefare now optional on a row. OnlyauditAppskeeps a link ("New app",/apps/new, which exists unscoped); the others draw no link.reason, drawn as the note under the sentence. It is set oncodes,keys,auditAppsandlinkedVisitors, where the page didn't already say what the list is.src/web/empty_words.tsdraws the reason and leaves out the link when a row has none.account.ts: codes, keys.accounts.ts: tokens.admin-limits.ts,capacity.ts,economics.ts: changes.audit.ts: its ownempty({...})block.system.ts: all seven measurement lists.capacity.ts: egress.runners.ts,billing.ts,grants.ts,trusted.ts,visitors.ts,teams.ts.settings.ts: loads.settings/devices.ts./settings/tokensand/settings/keyspages now show a small block with an icon instead of a bare muted line.Tests
test/account-rows.test.ts. It insisted that empty lists are "one muted sentence, not a panel", which is exactly what this issue reverses, so it now expects the shared markup.test/empty-states.test.tsgets one new test: every kind is one sentence, and a link needs both its label and its place.docs/features/empty-words.mdhas a short note on the new kinds.Left alone
accounts.ts"No active owner" is a heading for a warning, not an empty list.billing.ts"No event yet" is a value in a status row.settings.tsis a sentence about branch protection.The push hook asked for a
Try:line, so the last commit is empty. To try it, open/settings/tokenson an account with no codes, then/systemand/settings/capacityas admin.🤖 Generated with Claude Code
Closes #15899