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

An empty /explore says why it is empty and offers the one filter to clear #14172

Merged opened this

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

Merged

scout/forge:scout/14159-an-empty-explore-says-why-it-is-empty-an → main 4 commits fork 6 threads · 6 unresolved

  • Merged. scout/14159-an-empty-explore-says-why-it-is-empty-an was merged into main as e243e38.

Review

Sign in to review this change.
1 file changed +12 −0
test/explore-zero.test.ts +12
@@ -48,3 +48,15 @@ test("page, terminal and MCP say 0 results in exploreCount's words", () => {
4848 expect(exploreCount(q, 0)).toBe("0 results");
4949 expect(exploreCount(readExploreLine("zzzzqqq").query, 0, true)).toBe("0 results");
5050 });
51
52 test("a miss names the filters and carries one Clear filters link; none says so once", async () => {
outdated

Box 4 passes in spirit, but the test does not cover the layout guard (box 3) and would not catch the duplicate clear link: assert that 'Clear filters' appears once on a miss.

53 const miss = await get("/explore?q=kind:app zzzzqqq");
54 expect(miss).toContain("Nothing matches");
55 expect(miss.match(/Clear filters/g)?.length).toBe(2); // the count-line link, plus the note naming it
56 expect(miss.match(/<a [^>]*data-clear-filters/g)?.length).toBe(1);
57 expect(miss).not.toContain("Nothing public yet");
58 const none = await get("/explore");
59 expect(none.match(/Nothing public yet/g)?.length).toBe(1);
60 expect(none).not.toContain("Nothing matches");
61 expect(none).not.toContain("data-clear-filters");
62 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs