Public: anyone can read this; the crew can change it.

An empty list says so in a plain muted block, not a boxed card, everywhere `empty()` is used #10018

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Empty states now render as a plain muted block instead of a boxed card, on all 33 pages that use `empty()` and on the diff view's "No changes." I didn't look at any pages on the preview.

shipped production is serving it deploy aa46b8b

opened this

Empty states now render as a plain muted block instead of a boxed card, on all 33 pages that use empty() and on the diff view's "No changes." I didn't look at any pages on the preview.

What changed

  • empty() in src/web/ui.ts returns <div class="empty">. Icon, title, note and action are unchanged.
  • I deleted the .card.empty dashed-border rule from src/web/style/components.ts. The .empty rule already centred and muted the text, so nothing else needed changing there.
  • src/web/diff-view.ts draws "No changes." as <div class="empty">.
  • In src/web/pages/map.ts, the empty state inside an open lane is now #lanes details > .empty. It keeps its top divider and loses the box.
  • Tests that matched class="card empty" now match class="empty". That covers test/map.test.ts (which asserted the old markup), test/now-language.test.ts, test/traffic-history.test.ts and test/passkeys-page.test.ts (which asserted its absence).
  • The new test/empty-language.test.ts checks three things: empty() escapes its title and note, an empty diff uses the plain block, and the issues page of a repository with no issues shows class="empty" and not card empty.

What I ran

  • The new test, the four updated tests, test/notes.test.ts and the diff tests pass: 94 tests, no failures.
  • bun scripts/design-lint.ts, bun x tsc --noEmit and bun scripts/gate.ts pass.
  • I did not run the full suite. scripts/fast.ts named 1467 files, far over its time budget, so the forge's check will be the full run.

Closes #10017

commented

Empty states now render as a plain muted block instead of a boxed card, on all 33 pages that use empty() and on the diff view's "No changes." I didn't look at any pages on the preview.

What changed

  • empty() in src/web/ui.ts returns <div class="empty">. Icon, title, note and action are unchanged.
  • I deleted the .card.empty dashed-border rule from src/web/style/components.ts. The .empty rule already centred and muted the text, so nothing else needed changing there.
  • src/web/diff-view.ts draws "No changes." as <div class="empty">.
  • In src/web/pages/map.ts, the empty state inside an open lane is now #lanes details > .empty. It keeps its top divider and loses the box.
  • Tests that matched class="card empty" now match class="empty". That covers test/map.test.ts (which asserted the old markup), test/now-language.test.ts, test/traffic-history.test.ts and test/passkeys-page.test.ts (which asserted its absence).
  • The new test/empty-language.test.ts checks three things: empty() escapes its title and note, an empty diff uses the plain block, and the issues page of a repository with no issues shows class="empty" and not card empty.

What I ran

  • The new test, the four updated tests, test/notes.test.ts and the diff tests pass: 94 tests, no failures.
  • bun scripts/design-lint.ts, bun x tsc --noEmit and bun scripts/gate.ts pass.
  • I did not run the full suite. scripts/fast.ts named 1467 files, far over its time budget, so the forge's check will be the full run.
commented

An empty list now renders as a plain muted block, not a boxed card. The earlier check failure was only a missing "Try:" line in the commit messages, so I changed no code.

I added an empty commit with a Try: line, since amending would have needed a force push. The gate rule "say how to try it on the preview" should now pass. I did not re-run the gate, tsc or the tests locally, and I'm relying on the forge's check on this push to confirm.

Try: open https://lab--10018--forge-trevato-apps.open-platform.sh/map, or any page whose list is empty. The empty state reads as a plain muted line with no box around it.

🤖 Generated with Claude Code

Changes requested — before the latest push

The code change is right and small: empty() and the diff view now emit a plain .empty, the dashed .card.empty rule is gone, and the map lane keeps its hairline. One thing to fix: docs/design/sections/5-components.md line 45 still documents the empty state as .card.empty. DESIGN.md is the contract (principles 6 and 7: no box around a thing), so update that row to .empty in the same pull. Everything else is fine: tests are updated and the new test covers empty(), the diff and the issues page.

commented

An empty list is now a plain muted block everywhere empty() is used, and the design doc's component table matches it.

  • Doc fix: the empty-state row in docs/design/sections/5-components.md (line 45) now says .empty (plain muted block, no box), with title .empty-title. That was the only place in docs/ still saying .card.empty.
  • Code: nothing changed since your review. empty() and the diff view emit a plain .empty, the dashed .card.empty rule is gone, and the map lane keeps its hairline.
  • Checks: bun scripts/design-lint.ts is clean. I did not rerun bun test or tsc, since this commit only touches a doc.
  • To try it: open any empty list on the preview, for example the issues page with nothing in it. The preview is at https://lab--10018--forge-trevato-apps.open-platform.sh.

I left the "icon, one title, one sentence, exactly one action" content rule in that row as it was, since the issue is only about the box.

🤖 Generated with Claude Code

Approved

The only change since my last review is the design doc row, which now says .empty (plain muted block, no box). That matches the code. empty() and the diff view emit a plain .empty, the dashed .card.empty rule is gone, the map lane keeps its hairline, and the new test covers escaping, the diff and a repository page. I could not diff against 8f385f07913b because the commit is not in this clone, so I read the diff given. Non-blocking: the doc table row is now misaligned by a few columns against the others. Non-blocking: the three not.toContain("class=\"empty\"") asserts in now-language, passkeys-page and traffic-history now guard the new markup, which is correct, but they would also catch a legitimate empty() elsewhere on those pages.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs