Public: anyone can read this; the crew can change it.
/explore filters by kind (apps, forges, people) with a ?kind= parameter and chips, and the MCP explore tool takes the same `kind` #15673
Check · Review · Land · Live done — Landed and live in production.
/explore?kind= already worked when I started. The one thing missing was the 400, and that is what this pull adds. A bad kind on the page used to redirect (303) with a note; it now answers 400 with kind is not a kind — use app, person, forge, and the unfiltered list is shown under that message.
shipped production is serving it deploy 3fede26
5 earlier comments · 1 event
/explore?kind= already worked when I started. The one thing missing was the 400, and that is what this pull adds. A bad kind on the page used to redirect (303) with a note; it now answers 400 with kind is not a kind — use app, person, forge, and the unfiltered list is shown under that message.
I ran bun x tsc --noEmit, bun scripts/gate.ts --fix, bun scripts/design-lint.ts and test/explore-kind.test.ts, test/explore-url.test.ts, test/mcp-size.test.ts. All passed. I also ran test/explore-url-filters.test.ts, test/explore-unknown-params.test.ts and test/explore-unknown-words.test.ts, which passed before the final test-file edits; I did not re-run those three afterwards, so the forge's check will be their first run on the pushed state. The change is in src/web/studio/explore.ts.
- Filtering:
kind=app|person|forge(andall) already narrowed the list. Forge rows are visible to site admins only, as before. - Chips: the "Kind" tabs (All, Apps, People, plus Forges for admins) are plain links, with the current one marked
aria-current. - MCP: the existing
exploretool already takeskind, as an argument or typed askind:inq. A bad value is anunknown_filtererror with the same words. No new tool, and I did not touch the size ceilings. - Tests: the new
test/explore-kind.test.tscovers the filter, the 400, the chips and the tool. I changed three older tests that expected a 303 or 200 for?kind=bogus:explore-url.test.ts,explore-url-filters.test.tsandexplore-unknown-params.test.ts. They tested the old behaviour, not a bug.
What I left out: a bad kind: typed inside q on the page still gets the 303 with a note, because the issue only asks for the parameter. Other bad parameters (sort, updated, since) are unchanged.
To try it, open /explore?kind=bogus for the 400, then use the Apps and People tabs on /explore.
The pre-push hook refused the push until a commit message carried a Try: line, so the commit has one.
<!-- look-pages 60d9d224350b --> Look pages for 60d9d22, from the gate:
look pages (inferred): this pull changes src/web/studio/explore.ts; the forge pictures /explore (src/web/studio/explore.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The look-pages comment asked for no code change, so I made none. I pushed an empty commit with a Looks: /explore line to confirm the page the forge inferred. I didn't re-run the tests or the type check for it.
/explore is the right page to picture. It now filters by ?kind= and shows the chips, and src/web/studio/explore.ts is the only page code this pull touches.
The MCP explore tool takes the same kind. A bad ?kind= still gets a 400 that names the valid kinds. Both are covered by tests.
[
{"go": "/explore", "look": "chips for all, apps, forges and people", "expect": "all is selected and the list is unfiltered"},
{"go": "/explore?kind=apps", "look": "the list and the chips", "expect": "only apps are listed and the apps chip is selected"},
{"go": "/explore?kind=nope", "look": "the response", "expect": "a 400 that names the valid kinds"}
]
🤖 Generated with Claude Code
Works in the preview: /explore?kind=bogus answers 400 with 'kind is not a kind — use app, person, forge' over the unfiltered list; the kind tabs are plain links; the MCP tool takes kind. One thing to fix: docs/features/explore.md now says the opposite of the code. Line 68 says a bad kind parameter on the page answers 303 and line 74 lists 'kind' among the 303-dropped words. Change both to say a bad kind is a 400 on the page with the sentence over the unfiltered list (still 422 from the API), and that a bad kind: typed in q still takes the 303. Also add a test for kind=forge (admin sees forge rows, guest does not), since the 400 message names it. Note that the chip, filter and MCP tests pass without this change because those parts already existed; only the 400 is new and it is tested.
I fixed both doc lines and added the kind=forge test, then pushed. The new test and the other four in test/explore-kind.test.ts pass, and tsc is clean. I did not run the rest of the suite; the forge runs the full check on push.
bun scripts/gate.ts --fix printed three "one implementation?" notices for the small helpers in test/explore-kind.test.ts (get, call, seen). I read them as advisory and did not act on them, so I pushed anyway; say if you want them pulled into a shared helper.
- Docs:
docs/features/explore.mdnow says a badkindparameter on the page is a 400 withkind is not a kind — use app, person, forgeover the unfiltered list, with no redirect. The API still answers 422. A badkind:typed inqstill takes the 303. I also changed "unknown sort, kind" to "kind inq" in the sentence listing what is dropped with a 303. - Test:
kind=forgeshows a seeded forge row to the admin, and neither a signed-in non-admin nor a guest sees it.
[
{"go": "/explore?kind=forge", "look": "signed in as admin, then as a non-admin", "expect": "the admin sees forge rows; the non-admin sees none"},
{"go": "/explore?kind=bogus", "look": "status and message", "expect": "400, and the message says kind is not a kind — use app, person, forge"}
]
🤖 Generated with Claude Code
This feedback is the gate's note that it will picture /explore because a commit names it. It asks for no change, so I made none and pushed nothing.
The page change is the same as before: ?kind= filters and shows the chips on /explore. A bad kind is a 400 that names the valid kinds. The docs and the kind=forge test were updated in the last push.
[
{"go": "/explore?kind=app", "look": "the chips and the list", "expect": "only apps are listed and the apps chip is marked current"},
{"go": "/explore?kind=bogus", "look": "status and message", "expect": "400 with the sentence naming app, person and forge over the unfiltered list"}
]
🤖 Generated with Claude Code
Works in the preview: /explore?kind=bogus answers 400 with "kind is not a kind — use app, person, forge" over the unfiltered list, and /explore?kind=app marks the Apps chip aria-current. Chips are plain links, the docs are corrected, and the kind=forge test now covers admin vs guest. Small, single-purpose, and it keeps the page working with JavaScript off. Next two things I would do: (1) Non-blocking: make a bad kind: typed in q answer 400 too, so the two doors agree; (2) Non-blocking: fold the get/call helpers in test/explore-kind.test.ts into a shared helper.
/explore?kind=already worked when I started. The one thing missing was the 400, and that is what this pull adds. A badkindon the page used to redirect (303) with a note; it now answers 400 withkind is not a kind — use app, person, forge, and the unfiltered list is shown under that message.I ran
bun x tsc --noEmit,bun scripts/gate.ts --fix,bun scripts/design-lint.tsandtest/explore-kind.test.ts,test/explore-url.test.ts,test/mcp-size.test.ts. All passed. I also rantest/explore-url-filters.test.ts,test/explore-unknown-params.test.tsandtest/explore-unknown-words.test.ts, which passed before the final test-file edits; I did not re-run those three afterwards, so the forge's check will be their first run on the pushed state. The change is insrc/web/studio/explore.ts.kind=app|person|forge(andall) already narrowed the list. Forge rows are visible to site admins only, as before.aria-current.exploretool already takeskind, as an argument or typed askind:inq. A bad value is anunknown_filtererror with the same words. No new tool, and I did not touch the size ceilings.test/explore-kind.test.tscovers the filter, the 400, the chips and the tool. I changed three older tests that expected a 303 or 200 for?kind=bogus:explore-url.test.ts,explore-url-filters.test.tsandexplore-unknown-params.test.ts. They tested the old behaviour, not a bug.What I left out: a bad
kind:typed insideqon the page still gets the 303 with a note, because the issue only asks for the parameter. Other bad parameters (sort,updated,since) are unchanged.To try it, open
/explore?kind=bogusfor the 400, then use the Apps and People tabs on/explore.The pre-push hook refused the push until a commit message carried a
Try:line, so the commit has one.Closes #15653