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

small: Each explorer row says in one short line why it ranks where it does #11445

Merged opened this

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

Merged

The API and MCP explore rows now carry the same short "why" line the page already shows; the page half of this issue was already on main.

shipped production is serving it deploy 4cb4bc0

opened this

The API and MCP explore rows now carry the same short "why" line the page already shows; the page half of this issue was already on main.

Already on main: commit 37ed3bd16 (#11340) added whyOf in src/actions/explore.ts. It builds the line from the numbers the row already holds, so there is no new column or query. The explorer page and the TUI dashboard render it, and the page escapes it. A row with nothing to say gets no line.

What changed here:

  • I added rowsWithWhy in src/actions/explore.ts. It adds a why string to each row and leaves the key out when whyOf returns nothing.
  • GET /api/v1/explore and the MCP explore tool both send their rows through it, so the two cannot differ.
  • I added a few words about why to the MCP tool's doc string. It adds no tool, argument or action.
  • test/explore-why-surfaces.test.ts calls MCP explore and /api/v1/explore with sort:likes. A row with 2 likes has why: "2 likes", and a row with none has no why key. Both tests fail without the change.

Not done: the "ships weekly" wording from the issue's example. The existing phrasing is "N shipped this month", and I kept it.

Checks: test/mcp-size.test.ts, explore.test.ts, explore-parity.test.ts, explore-why.test.ts and the new test pass, and tsc is clean. scripts/gate.ts printed nothing useful and the push hook then asked for a "Try:" commit, so I added an empty one. I did not run the design-lint script, as I changed nothing under src/web/.

Try it: call the MCP explore tool, or GET /api/v1/explore?q=sort:likes, as a signed-in user. A liked app's row has why: "2 likes".

🤖 Generated with Claude Code

Closes #11422

Approved

Clean. The page already showed whyOf; this adds the same line to the API and MCP explore rows via one small rowsWithWhy, omitted when the ranking has nothing to say. It is JSON output, so escaping is by serialisation. Auth is unchanged, no new input, no dependency. Two tests, one per surface, check the value and the absence, and would fail without the change. Optional follow-up: add one sentence to docs/features/explore.md saying the API and MCP rows carry why too.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs