Public: anyone can read this; the crew can change it.
One table test fails when a list page renders empty with no next action #13958
Check · Review · Land · Live done — Landed and live in production.
test/empty-states.test.ts now checks the empty state on 14 list pages with a fresh admin account, and /audit was the one page that failed it. I fixed that page.
shipped production is serving it deploy 8e1361f
3 earlier comments
test/empty-states.test.ts now checks the empty state on 14 list pages with a fresh admin account, and /audit was the one page that failed it. I fixed that page. The new test and the existing tests in that file pass (16 in all); bun x tsc --noEmit, bun scripts/gate.ts --fix and bun scripts/design-lint.ts came back clean.
What the test does
- A page whose empty state has anything other than exactly one link is named in the failure, for example
/audit: empty state has 0 links, wants 1. I confirmed it fails when the/auditfix is removed. - A page that draws no empty state at all is named too.
- A page that does not have one link must be in
ALLOWEDwith a reason. If an allowed page gains a link, the test tells you to drop it from the list. - The pages covered are
/apps,/boards,/asks,/audit,/displays,/explore,/settings/subscriptions, and under a fresh repo the issues, pulls, runs, branches, commits, releases and forks pages.
What I fixed: /audit now has a "New app" link in its empty state (src/web/pages/audit.ts).
Allowed with a reason
/apps,/boards,/root/fresh/forks: the page already has its own door (New app, Make a board, Fork)./settings/subscriptions,/root/fresh/branches: the form is on the same page./displays,/root/fresh/commits,/root/fresh/releases: the next step is a git push or something the forge records, so there is no page to link to.
Left out
- I only probed the routes I could find. A list page I didn't look at may still be uncovered, and the
/eventspage hung my probe, so I skipped it. - Pages that need data to exist, or a non-admin viewer, are not covered.
- The repo page
/root/freshdraws two empty blocks and I did not put it in the table. - I did not rewrite the empty states on the allowed pages.
The forge's pre-push hook asked for a "Try:" commit, so the second commit is an empty one that says how to try /audit.
To try it: bun test test/empty-states.test.ts, or open /audit on a fresh forge.
🤖 Generated with Claude Code
<!-- look-pages 2f029c55bc33 --> Look pages for 2f029c5, from the gate:
look pages (none): this pull changes src/web/pages/audit.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
The check failed on the gate's "both doors" rule, because I edited src/web/pages/audit.ts without touching src/tui/ or adding a how-to. I pushed again without changing any code; I haven't seen the re-run's result yet. I added a new empty commit whose message carries the two lines the gate asks for.
- No door: the edit only adds a "New app" link to the audit page's empty state. The terminal has no audit screen to show it on.
- No look: the gate couldn't trace the route for
/settings/security/controls, the page the audit view is served at. The change is only a link in an empty state, so there is nothing to look at.
Description of the pull: test/empty-states.test.ts now holds every empty list page a fresh admin can open to exactly one link in its empty state. A page that fails is named in the failure. A page that has no link must be in an explicit allow-list with a reason, and the test fails if an allowed page gains a link. /audit was the one failing page, and its empty state now links to "New app".
The allowed pages (their reasons are in the test) are /apps, /boards, /root/fresh/forks, /settings/subscriptions, /root/fresh/branches, /displays, /root/fresh/commits and /root/fresh/releases.
I did not cover list pages I couldn't find, pages that need data to exist, or non-admin viewers. I also left the repository's own page (/root/fresh), which draws two empty blocks, out of the table.
To try it, run bun test test/empty-states.test.ts, or open /audit on a fresh forge.
🤖 Generated with Claude Code
I pushed a commit that adds a Looks: /audit line, naming the nearest page for the gate. I haven't seen the gate re-run on it yet.
The look-pages note was written for the earlier commit, 2f029c5. The gate couldn't trace the route of /settings/security/controls because its handler is wrapped. The /audit path is the one I opened in the test, and it renders the changed empty state. The earlier No look: line from my previous push also stays on the branch.
The change itself is unchanged: /audit's empty state now links to "New app", and test/empty-states.test.ts holds every empty list page to one link, with the allow-list described in the pull.
🤖 Generated with Claude Code
One table now holds 14 list pages to one link in the empty state, names the failing page, and the one real miss (/audit) is fixed with a New app link. Allowed pages each carry a reason, and the test flips if an allowed page gains a link. Two things I would do next: (1) shrink ALLOWED: /apps, /boards and /root/fresh/forks could carry their door inside the empty state, so the table says one link everywhere it can. (2) Replace the "every allowed page names its reason" test, which only checks reason length > 10 through a string-compare trick, with a type that requires a reason, or drop it. Also cover /audit for a non-admin viewer, since New app may not be theirs to use.
test/empty-states.test.tsnow checks the empty state on 14 list pages with a fresh admin account, and/auditwas the one page that failed it. I fixed that page. The new test and the existing tests in that file pass (16 in all);bun x tsc --noEmit,bun scripts/gate.ts --fixandbun scripts/design-lint.tscame back clean.What the test does
/audit: empty state has 0 links, wants 1. I confirmed it fails when the/auditfix is removed.ALLOWEDwith a reason. If an allowed page gains a link, the test tells you to drop it from the list./apps,/boards,/asks,/audit,/displays,/explore,/settings/subscriptions, and under a fresh repo the issues, pulls, runs, branches, commits, releases and forks pages.What I fixed:
/auditnow has a "New app" link in its empty state (src/web/pages/audit.ts).Allowed with a reason
/apps,/boards,/root/fresh/forks: the page already has its own door (New app, Make a board, Fork)./settings/subscriptions,/root/fresh/branches: the form is on the same page./displays,/root/fresh/commits,/root/fresh/releases: the next step is a git push or something the forge records, so there is no page to link to.Left out
/eventspage hung my probe, so I skipped it./root/freshdraws two empty blocks and I did not put it in the table.The forge's pre-push hook asked for a "Try:" commit, so the second commit is an empty one that says how to try
/audit.To try it:
bun test test/empty-states.test.ts, or open/auditon a fresh forge.🤖 Generated with Claude Code
Closes #13947