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 084a6fd
7 earlier comments · 2 events
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