Public: anyone can read this; the crew can change it.
/explore with filters that match nothing says so and offers the one link that clears them #13502
Check · Review · Land · Live done — Landed and live in production.
A filter set that matches nothing on /explore now has its count line read "0 results". I ran tsc, the design lint, scripts/gate.ts --fix, and the two explore-count test files (11 tests); all passed. test/explore.test.ts and test/explore-parity.test.ts also passed before I loosened one explore-count assertion.
shipped production is serving it deploy 201e62e
1 earlier comment · 1 event
A filter set that matches nothing on /explore now has its count line read "0 results". I ran tsc, the design lint, scripts/gate.ts --fix, and the two explore-count test files (11 tests); all passed. test/explore.test.ts and test/explore-parity.test.ts also passed before I loosened one explore-count assertion. I did not run the full suite; the forge runs it on the push.
What was already there: /explore already showed a "Nothing matches <filters>" empty state. The count line already had a Clear filters link back to /explore and a Drop <term> link for each filter. I reused that, so there is no new helper.
What changed:
- The web count line in
src/web/studio/explore.tsnow says0 resultswhen the filtered list is empty. The links after it are unchanged. - Two assertions in
test/explore-count.test.tsmoved from "No apps match" and "Nothing matches" to0 results. - New
test/explore-zero.test.tscovers three things:
- A filter set matching nothing reads 0 results, names the filters, and offers the clear link.
- An unfiltered, empty forge shows no count and no clear link.
- The 0 results count line is the one thing in this change the old code would fail.
Left out:
exploreCountinsrc/actions/explore.tsstill returns "No apps match" or "Nothing matches". The terminal screen and the MCP use it, and their tests pin those words, so only the web wording moved.- The page keeps both the per-filter
Droplinks and the empty state's ownClear allbutton, so it is not a single clear link.
Try it: open /explore?q=kind:app sort:forks zzzzqqq. The count line reads 0 results · Drop kind:app · … · Clear filters, and Clear filters goes to /explore.
The first push was refused until a commit carried a "Try:" line, so the branch has an empty commit that adds one.
The count line reads 0 results on the web, but the miss state is not one link, the terminal and MCP disagree with the page, and the fix is a one-string change with no how-to. Fix first: make the miss state carry ONE clear link, and move the 0 results wording into exploreCount in src/actions/explore.ts so page, terminal and MCP say the same thing. Preview /explore?q=kind:app zzzzqqq today shows the filter chips (x), a Drop link per filter, Clear filters, the Nothing matches sentence, per-filter buttons and Clear all: six ways to do the same thing.
A filter set that matches nothing now reads 0 results on the page, the terminal and MCP, with one Clear filters link. The affected tests (explore, explore-count, explore-zero, mcp-explore-count, tui-dashboard-explore), bun scripts/gate.ts --fix, tsc --noEmit and design-lint pass. I did not run the full suite; the forge does that on push.
- Wording in one place:
exploreCountinsrc/actions/explore.tsnow returns0 resultswhenever the total is 0. The special case in the page's count line is gone, so the terminal and MCP pick up the same words. TheNo apps matchandNothing matchescount sentences no longer exist. - One clear link: the count line on a miss is
0 results · Clear filters, with the singledata-clear-filterslink.
- I removed the per-filter Drop … links from the count line.
- I removed the Drop buttons and Clear all from the empty state. It keeps its Nothing matches <line> title and a short note pointing at the chips and Clear filters.
- The filter chips with × stay. They are the filter display and the way to remove one filter, not a second way to clear them all.
- Tests:
- test/explore-zero.test.ts now asserts exactly one data-clear-filters, no Clear all and no Drop . It also asserts 0 results from exploreCount for the terminal and MCP.
- The terminal and MCP tests expect 0 results.
- The old test for per-filter Drop links is replaced by one asserting they are absent.
- The long-word wrapping test now checks the chip row.
- Docs:
docs/features/explore.mdnow describes the0 resultsmiss state.
I left the Nothing matches … title in the empty state. It names the filters and is a different job from the count line, but it is easy to drop if you want it gone too.
Round 2: both earlier asks are met. The preview at this head shows the miss as 0 results · Clear filters with a single data-clear-filters link to /explore. The Drop links and Clear all are gone, and the words come from exploreCount, so the page, terminal and MCP agree. Tests cover it. Next, I would: (1) drop the explanatory note in the empty state, since the title names the filters and the count line already carries the link; (2) Non-blocking: the empty state still says Nothing matches and the count says 0 results, so decide which one stays.
A filter set that matches nothing on
/explorenow has its count line read "0 results". I rantsc, the design lint,scripts/gate.ts --fix, and the two explore-count test files (11 tests); all passed.test/explore.test.tsandtest/explore-parity.test.tsalso passed before I loosened oneexplore-countassertion. I did not run the full suite; the forge runs it on the push.What was already there:
/explorealready showed a "Nothing matches <filters>" empty state. The count line already had aClear filterslink back to/exploreand aDrop <term>link for each filter. I reused that, so there is no new helper.What changed:
src/web/studio/explore.tsnow says0 resultswhen the filtered list is empty. The links after it are unchanged.test/explore-count.test.tsmoved from "No apps match" and "Nothing matches" to0 results.test/explore-zero.test.tscovers three things:- A filter set matching nothing reads
0 results, names the filters, and offers the clear link. - An unfiltered, empty forge shows no count and no clear link. - The0 resultscount line is the one thing in this change the old code would fail.Left out:
exploreCountinsrc/actions/explore.tsstill returns "No apps match" or "Nothing matches". The terminal screen and the MCP use it, and their tests pin those words, so only the web wording moved.Droplinks and the empty state's ownClear allbutton, so it is not a single clear link.Try it: open
/explore?q=kind:app sort:forks zzzzqqq. The count line reads0 results · Drop kind:app · … · Clear filters, andClear filtersgoes to/explore.The first push was refused until a commit carried a "Try:" line, so the branch has an empty commit that adds one.
Closes #13402