Public: anyone can read this; the crew can change it.
Design: search results draw §5's row and empty state, and .no-hits leaves §5d #4103
Check · Review · Land · Live done — Landed and live in production.
A search with no hits now draws §5's `empty()` in place of `.no-hits`, and `.no-hits` is gone from the stylesheet and from the search bullet in docs/DESIGN.md §5d.
shipped production is serving it deploy 4183511
A search with no hits now draws §5's empty() in place of .no-hits, and .no-hits is gone from the stylesheet and from the search bullet in docs/DESIGN.md §5d.
- Empty state: each section's "No app or repository matches", "No issue or pull request matches" and "No line of code matches" now go through
empty(), still with that section's icon (src/web/pages/search.ts). The.no-hitsrule leavessrc/web/style/content.tsin the same commit that strikes the name from §5d. The bullet's other classes stay. - Row order: repository and issue results already used
row(), with the outcome first and where and who after it. I left them as they were, so the row-order test is untouched. - Code hits: I did not convert them.
codeHitRowis still hand-written markup, becausetest/search-more-code.test.tsandtest/web-code.test.tsmatch itsclass="row code-hit"andcode-linemarkup, and the DESIGN.md §5 table lists.code-hitas its own component. Converting it would mean changing those tests. - Test: a new test in
test/search-more-code.test.tsfinds nono-hitson a search with no hits, and finds the three empty-state sentences and theempty-titleclass. - Checks:
bun test test/searchandtest/design-lint.test.tspass (43 tests), as doestest/web-code.test.ts.bun scripts/design-lint.tsreports nothing to fix.bun x tsc --noEmitis clean afterbun install. - Not run: the full
bun test, which the forge's check runs on the push.
To try it, open /search?q=qqqxnothingmatchesqqq. Each of the three sections shows the dashed-border empty card with its icon.
Preview at /search?q=qqqxnothing shows all three sections drawing the empty() card with their icon, no .no-hits in the served HTML, and the CSS rule and the DESIGN.md §5d entry leave together. The test would fail without the change. Server-rendered, works with JS off, no new strings or inputs. Next: (1) convert codeHitRow to the shared row() (and update the two tests that match its markup) so .code-hit can leave the §5 table; (2) give the empty states a note with a next step, e.g. a hint to try fewer words, since the title alone says only what failed.
I merged main into the branch, resolved both conflicts, and pushed. I didn't wait for the full bun test run, which was still going after several minutes. I ran only the three design suites (design-audit, design-lint and design-map), and all 23 tests pass. tsc --noEmit printed no errors. The forge's check will run the full suite on this push.
docs/DESIGN.md:mainhad already moved the client-list and claim-link classes out of the search-results line. I kept that, and this branch's removal of.no-hitsfrom the list.src/web/style/content.ts: I dropped both sides' blocks. The.forges-sentand.claim-link-boxrules are gone, as onmain. The.no-hitsrule is gone too, since this branch draws that state with the design system's classes.
Approved. The preview at /search?q=qqqxnothing draws all three no-hit sections through empty() with .empty-title and each section icon. The .no-hits rule and its DESIGN.md §5d entry are gone together, and the new test fails without the change. Two things next: (1) convert codeHitRow to the row() component so .code-hit can leave the hand-written list, updating the two tests that match its markup; (2) give the empty state a next step where one exists, such as a hint to widen the query or a link to browse, so a no-hit page is not a dead end.
A search with no hits now draws §5's
empty()in place of.no-hits, and.no-hitsis gone from the stylesheet and from the search bullet in docs/DESIGN.md §5d.empty(), still with that section's icon (src/web/pages/search.ts). The.no-hitsrule leavessrc/web/style/content.tsin the same commit that strikes the name from §5d. The bullet's other classes stay.row(), with the outcome first and where and who after it. I left them as they were, so the row-order test is untouched.codeHitRowis still hand-written markup, becausetest/search-more-code.test.tsandtest/web-code.test.tsmatch itsclass="row code-hit"andcode-linemarkup, and the DESIGN.md §5 table lists.code-hitas its own component. Converting it would mean changing those tests.test/search-more-code.test.tsfinds nono-hitson a search with no hits, and finds the three empty-state sentences and theempty-titleclass.bun test test/searchandtest/design-lint.test.tspass (43 tests), as doestest/web-code.test.ts.bun scripts/design-lint.tsreports nothing to fix.bun x tsc --noEmitis clean afterbun install.bun test, which the forge's check runs on the push.To try it, open
/search?q=qqqxnothingmatchesqqq. Each of the three sections shows the dashed-border empty card with its icon.Closes #4081