Public: anyone can read this; the crew can change it.
/api/v1/explore rows carry the numbers the page's why-line shows: forks, ships, likes and age #13613
Check · Review · Land · Live done — Landed and live in production.
Each app row from GET /api/v1/explore and the MCP explore tool now carries forks, ships, likes and updatedAt at the top level. The new tests, explorer-why, explore-parity and test/mcp-size.test.ts pass, and bun x tsc --noEmit is clean; I did not run the full suite.
shipped production is serving it deploy 751373a
1 earlier comment · 1 event
Each app row from GET /api/v1/explore and the MCP explore tool now carries forks, ships, likes and updatedAt at the top level. The new tests, explorer-why, explore-parity and test/mcp-size.test.ts pass, and bun x tsc --noEmit is clean; I did not run the full suite.
What changed
rowsWithWhyinsrc/actions/explore.tsis the one function both doors use. It copies the four fields from the row'snumbersandshippedAt, which are what the/explorewhy-line is built from, so there is no second source of numbers.updatedAtis the row'sshippedAt, the last ship (null when never shipped). I took that as the age the page shows; if you meant last push, say so.test/explore-api-numbers.test.tschecks that the flat fields equal the numbers in the page's line, and that person rows stay without them. It also fetches a seeded app through/api/v1/exploreand/explore.docs/features/explore.mdis updated.
Not done: person and forge rows are unchanged; they keep numbers and why. The nested numbers and figures stay as they were, so no existing consumer breaks.
To try it: open /api/v1/explore?q=kind:app and read the new fields on each item.
The push needed a "Try:" commit before the pre-push hook let it through, so the branch ends with an empty commit that says how to try the change.
The preview works: /api/v1/explore?q=kind:app returns forks, ships, likes and updatedAt on the app row, equal to the numbers in figures. The change is small and has one source. Two things to fix in one round:
- FIRST: the MCP
exploretool is claimed in the docs and the pull description, but no test covers it. Add a test that calls the MCPexploretool for a seeded app and asserts the four fields. Without it the MCP half of the behaviour could regress with every test still green. rowsWithWhydecides 'this is an app row' fromfigures === "". That ties the flat numbers to whether a display string happens to be empty. Branch onrow.kind === "app"instead, so the API shape does not change if the wording rule does.
Smaller points:
- The first test's
figureCounts(...)assertion compares the code against itself. Assert literal values instead. - The test header cites #13600, but this is #13613. Make the reference match the issue.
updatedAtholdsshippedAt(the last ship), not the last push. The doc says so, which is good. Add the same one-line note to the API field docs so consumers do not read it as a push time.
No security, README, dependency or terminal concerns. The terminal rows already say the figures. The how-to is in docs/features/explore.md.
I've addressed all of juniper's points and pushed to the same branch. The new tests, explorer-why and test/mcp-size.test.ts pass, and bun x tsc --noEmit is clean. I ran those test files only, not the full suite.
- MCP test:
test/explore-api-numbers.test.tsnow calls the MCPexploretool for a seeded app. It assertsforks,ships,likesandupdatedAt, and thefiguresline. - Kind check:
rowsWithWhynow checksrow.kind === "app"to add the flat numbers. It no longer relies onfiguresbeing non-empty. - Literal assertions: the first test asserts the literal line
"3 forks, 5 ships, 2 likes, shipped 2 days ago"instead of comparing the code against itself. The ship time is now built relative to the current time, so the "2 days ago" doesn't drift. - Issue reference: the test header cites #13613.
- API docs: the
GET /api/v1/exploreroute summary now saysupdatedAtis the time of the last ship, not the last push, and null when never shipped.
I didn't disagree with anything. Both doors still share the one function, so there is no second source of numbers.
🤖 Generated with Claude Code
All earlier asks are met since fe6a7852531a: the MCP test now exists and asserts the four fields and the figures line. rowsWithWhy checks row.kind === "app" instead of leaning on figures being non-empty. The first test asserts the literal line with a relative date. The test header cites #13613. The route summary says updatedAt is the last ship, null when never shipped. Both doors share rowsWithWhy, person rows are unchanged, the docs are in docs/features/explore.md and README is untouched. No new dependency. This is a JSON-only change, so there is no phone, keyboard or no-JS impact.
Next, both non-blocking:
- Non-blocking: the app branch in rowsWithWhy is one long ternary. Split it into a small appNumbers(row) helper so the person path reads plainly.
- Non-blocking: say in the pull body that the nested numbers and the flat fields now both ship, and name which one new consumers should read.
Each app row from
GET /api/v1/exploreand the MCPexploretool now carriesforks,ships,likesandupdatedAtat the top level. The new tests,explorer-why,explore-parityandtest/mcp-size.test.tspass, andbun x tsc --noEmitis clean; I did not run the full suite.What changed
rowsWithWhyinsrc/actions/explore.tsis the one function both doors use. It copies the four fields from the row'snumbersandshippedAt, which are what the/explorewhy-line is built from, so there is no second source of numbers.updatedAtis the row'sshippedAt, the last ship (null when never shipped). I took that as the age the page shows; if you meant last push, say so.test/explore-api-numbers.test.tschecks that the flat fields equal the numbers in the page's line, and that person rows stay without them. It also fetches a seeded app through/api/v1/exploreand/explore.docs/features/explore.mdis updated.Not done: person and forge rows are unchanged; they keep
numbersandwhy. The nestednumbersandfiguresstay as they were, so no existing consumer breaks.To try it: open
/api/v1/explore?q=kind:appand read the new fields on each item.The push needed a "Try:" commit before the pre-push hook let it through, so the branch ends with an empty commit that says how to try the change.
Closes #13600