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

An empty /explore now says why it is empty. A filtered miss gets a clear link inside its own block, and each empty sits in a block that holds at least one row of height. Most of this was already on main.

Notes

shipped production is serving it deploy 4adf612

opened this

An empty /explore now says why it is empty. A filtered miss gets a clear link inside its own block, and each empty sits in a block that holds at least one row of height.

Most of this was already on main. The "Nothing matches …" title with the filters named, "0 results", and the "Nothing public yet" empty all existed. I added three things:

  • Clear link in the block: a filtered miss now carries its own "Clear filters" link (data-empty-clear) in the empty block. The old note pointed at a link elsewhere on the page. The count line's data-clear-filters link is unchanged.
  • Layout: both empties are wrapped in .explore-empty with a 72px minimum height, so the content below does not jump. The 72px is my guess at one row's height; I did not measure a real row. The class is declared in docs/design/areas/explore.md, and design-lint is clean.
  • Test: test/explore-zero.test.ts renders both empties. The miss shows "Nothing matches" and the clear link and not "Nothing public yet". The unfiltered view shows "Nothing public yet" exactly once and no clear link.

The edits are in src/web/studio/explore.ts and src/web/style/content.ts.

bun x tsc --noEmit is clean, and explore-zero, explore and explore-why-surfaces pass. mcp-size passes. I did not run scripts/gate.ts successfully: it printed no output, and I did not check its exit status.

I left out the MCP and API. Both already report "0 results" in exploreCount's words, and nothing there is a user action to add. There are no new dependencies and no script.

To try it, open /explore?q=zzzzqqq, then /explore on an empty forge.

Closes #14159

6 earlier comments · 2 events
commented

An empty /explore now says why it is empty. A filtered miss gets a clear link inside its own block, and each empty sits in a block that holds at least one row of height.

Most of this was already on main. The "Nothing matches …" title with the filters named, "0 results", and the "Nothing public yet" empty all existed. I added three things:

  • Clear link in the block: a filtered miss now carries its own "Clear filters" link (data-empty-clear) in the empty block. The old note pointed at a link elsewhere on the page. The count line's data-clear-filters link is unchanged.
  • Layout: both empties are wrapped in .explore-empty with a 72px minimum height, so the content below does not jump. The 72px is my guess at one row's height; I did not measure a real row. The class is declared in docs/design/areas/explore.md, and design-lint is clean.
  • Test: test/explore-zero.test.ts renders both empties. The miss shows "Nothing matches" and the clear link and not "Nothing public yet". The unfiltered view shows "Nothing public yet" exactly once and no clear link.

The edits are in src/web/studio/explore.ts and src/web/style/content.ts.

bun x tsc --noEmit is clean, and explore-zero, explore and explore-why-surfaces pass. mcp-size passes. I did not run scripts/gate.ts successfully: it printed no output, and I did not check its exit status.

I left out the MCP and API. Both already report "0 results" in exploreCount's words, and nothing there is a user action to add. There are no new dependencies and no script.

To try it, open /explore?q=zzzzqqq, then /explore on an empty forge.

commented

<!-- look-pages 1521cc4008ec --> Look pages for 1521cc4, from the gate:

  • look pages (inferred): this pull changes src/web/studio/explore.ts, src/web/style/content.ts; the forge pictures / (src/web/style/content.ts), /docs (src/web/style/content.ts), /explore (src/web/studio/explore.ts) and 24 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

I found one real flake behind the red check and fixed it, but I did not touch the other three failures. The new commit is pushed. The forge's check hasn't answered yet, so the pull may still be red.

  • GET /api/v1/forges test in test/client-list.test.ts: this one was flaky and failed locally about two runs in three. The API call and the MCP call each order tied rows by a last-activity time that is the current clock, so the order can differ between the two calls. The test now compares the rows as sorted sets. Its other assertions are unchanged, and it passed four times in a row afterwards.
  • Scaffolded-app suite: it passed locally, and the check log shows a 4.1 s run against a 3 s budget, which points to load on the check machine. I changed nothing.
  • "A writer queues a check" and "a fast-forward applies the previewed id": I didn't run or change either. They don't touch the explore page, which is all my pull changes, but I haven't confirmed they are flakes.

The explore change is unchanged from before.

commented

<!-- look-pages df728503681d --> Look pages for df72850, from the gate:

  • look pages (inferred): this pull changes src/web/studio/explore.ts, src/web/style/content.ts; the forge pictures / (src/web/style/content.ts), /docs (src/web/style/content.ts), /explore (src/web/studio/explore.ts) and 24 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The look-pages comment asks for no change, so I made none. It is the gate listing the pages it will picture from the files this pull touches (src/web/studio/explore.ts, src/web/style/content.ts). The branch is clean and matches origin, so there was nothing to push.

The inferred list is wider than the change. Only /explore shows the empty state, and the style change in content.ts pulls in / and /docs and 24 other pages. If you want it narrower, a Looks: /explore line in a commit message would override the inference. I did not add one.

What the pull does: an empty /explore now says why it is empty. It shows "Nothing matches" and offers a "Clear filters" link, which sits in its own block. The empty state keeps the height of one row, so the page does not shift.

Left out: I did not add a per-filter clear link for each active filter.

Try it: open /explore?q=zzzzqqq on the preview at https://lab--14172--forge-trevato-apps.open-platform.sh.

🤖 Generated with Claude Code

Changes requested — before the latest push

Works in the preview: /explore?q=zzzzqqq shows 'Nothing matches zzzzqqq' with an in-block Clear filters link. Fix first: the page now carries two 'Clear filters' links for one miss (principle 1), so keep one. Also fix: the 72px height is a guess, not a measured row; the client-list test edit is unrelated to explore and belongs in its own pull; box 3 cannot be ticked until the height is shown to hold a row. The terminal already has its empty state with 'esc clears the line', so no new screen is needed.

commented

I took your fix-first points by removing what you objected to. main already shows the reason ("Nothing matches …") and has the one count-line link, so the pull is now one test, with no change to src/ or the docs. bun test test/explore-zero.test.ts and bun x tsc --noEmit pass. I did not run gate.ts or the design lint, since nothing under src/web/ changed.

  • Duplicate link: I dropped the in-block "Clear filters" link and kept the count-line data-clear-filters link, which is the existing one. The empty note still reads "Clear filters above takes them all."
  • Wrapper and 72px height: I removed the hand-rolled .explore-empty div, the min-height: 72px rule and the line in docs/design/areas/explore.md. I never measured a row, so I'm not claiming the height holds one. With the wrapper gone there is no call-site wrapper left, so I did not add a modifier to empty().
  • Client-list test: I reverted my edit, so the pull no longer touches test/client-list.test.ts. The /api/v1/forges tie-order flake is a separate small pull.
  • New test: test/explore-zero.test.ts now asserts that a miss carries exactly one data-clear-filters link. It also checks that the bare view says "Nothing public yet" once, with no clear link and no "Nothing matches".

I did not add a layout-shift guard. The empty block's own height isn't pinned, so a short empty state can still move the content below it. A height guard needs a real row measurement, so that is a follow-up if you want it. The terminal's empty state ("esc clears the line") is unchanged.

To try it, open /explore?q=zzzzqqq on the preview.

🤖 Generated with Claude Code

Approved

Earlier asks are met: the duplicate link, the guessed 72px wrapper and the unrelated client-list edit are gone, and the pull is now one test. On the preview, a miss names the filters and carries one data-clear-filters link, and the bare view carries none. Non-blocking: nothing pins the empty block height, so the layout-shift box stays open; a follow-up needs a measured row.

commented

Left #14159 open: 1 unticked item remain (no layout shift: the empty block holds the height of one row).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs