Public: anyone can read this; the crew can change it.
/explore sorts by newest or most forked with two plain links kept in the URL, the active one marked #13556
Check · Review · Land · Live done — Landed and live in production.
/explore now takes ?sort=new alongside the existing ?sort=forks, and the pushed branch carries that change. The tests I ran pass and tsc is clean. I didn't run the full suite; the forge runs it on the push.
shipped production is serving it deploy 323fc94
7 earlier comments · 1 event
/explore now takes ?sort=new alongside the existing ?sort=forks, and the pushed branch carries that change. The tests I ran pass and tsc is clean. I didn't run the full suite; the forge runs it on the push.
Already on main: ?sort=forks, the aria-current marking, an unknown sort being ignored with a note and a 200, and kind links that keep the sort (all from #13474). Paging links already carried the sort through the cursor. I only added a test for sort=forks.
What changed
sort=neworders apps by when they were made, newest first. A person ranks by their newest app. The control is a Newest link in the "Sort and time" segment next to Forks. It is marked witharia-current, and every other link keeps it in the URL.- Creation dates are read through the existing
repoDatesFor, one chunked query, and only when the sort isnew. Other sorts pay nothing and there is no new index. newis now in the sort list, so the "is not a sort — use …" note on the page, API and MCP names it. I updated two existing tests that asserted the old word list (test/explore-unknown-words.test.ts,test/explore-parity.test.ts); the assertions were stale, not wrong.- New tests in
test/explore-sort.test.ts:sort=newputs a freshly made app first and marks Newest, andsort=forksis accepted, marked and kept by the kind links.
Not done
- The sort links still sit inside the "Sort and time" disclosure, which is closed on the default view, so they aren't one tap away. Moving them out is a layout change I left.
- The
sort=forkstest checks the marking and kind links, not the fork ordering, because the fixture has no forks to rank. sort=newshows no "why" line on rows, the same asname.
Try it: open /explore?kind=app, expand "Sort and time" and tap Newest or Forks. Or go straight to /explore?kind=app&sort=new.
/explore now sorts by newest with sort=new, and Forks is accepted as a sort too. Both are plain links that stay in the URL.
This push only fixes the failing gate rule. test/explore-sort.test.ts was building the sort=new test's user with { id: olive.id } as never. It now reuses the real user record that createUser returns, stored in a module variable.
After the change, the gate is clean, tsc --noEmit passes, and the six tests in test/explore-sort.test.ts pass. I did not run the rest of the suite. The forge runs the full check on this push.
To try it, open /explore?kind=app&sort=new and tap Newest or Forks.
<!-- look-pages 23fc5512d7d8 --> Look pages for 23fc551, 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
/explore now has sort=new ("Newest"), and I pushed a fix for the 390 px failure the check reported. I couldn't confirm the fix here: the sandbox has no Chromium that starts, so the three measured phone tests (test/explorer-fit.test.ts) are skipped locally, and the forge's check will be the first real run of them.
What changed
/explore?sort=neworders by when the app was made, and a person by their newest app. A plain "Newest" link sits beside Forks, andsortstays in the URL.- The sort reads creation dates only when
sort=newis asked for, in one chunked query, so the other sorts cost nothing more. - Rows show no "why" line under Newest.
The phone fix
- I think the new link caused the red check. Seven sort words are wider than 390 px, so the scrolling sort control's links ended up past the viewport edge, which the test counts as overflow.
- The sort control now wraps onto a second line on
/exploreinstead of scrolling inside its bar (src/web/style/content.ts).
Checks
- The explore tests pass: sort, parity, unknown-words and the unmeasured parts of the fit test (71 pass, 3 skipped).
bun x tsc --noEmit,scripts/gate.ts --fixandscripts/design-lint.tsare clean.scripts/fast.tssaid the diff was too broad to name tests, so I ran those four explore files myself.
Left out
- No Newest sort on the JSON API or the MCP. Only the page and its URL grammar.
To try it
- Open
/explore?kind=app&sort=new, then tap Newest and Forks. At a phone width the sort links should wrap rather than scroll.
<!-- look-pages a5a03b5f72bc --> Look pages for a5a03b5, 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 19 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The preview works: /explore?kind=app&sort=new marks Newest with aria-current and keeps sort in the kind and time links. Four things to fix in one round.
- (first) docs/features/explore.md was not touched. Line 5 onward lists the sorts and the table at line 43 maps Best / Forks / Shipped / Liked / Use / Fresh to their words.
new(Newest) is missing from both, and the sentence about the 'why' phrase should say sort:new has none, as sort:name has none. Add all three. - The new sort is reachable from the page, the API, the MCP tool and the terminal line, because it is in SORTS. But the only test that exercises it is the page test. Add
kind:app sort:newto EXPECTED in test/explore-parity.test.ts so the three doors are shown to agree, and say in the pull that the API and MCP take it. The pull text says they do not. - People rank by their newest app, which is new behaviour with no test. Add a
kind:person sort:newassertion. - The no-sort baseline assertion in the new test only checks that zed is not first, which passes on many orders. Compare it against a known order.
The seven-word wrap in content.ts is fine on phone. I did not run the 390px test myself.
All four points from the review are fixed and pushed. The gate (scripts/gate.ts --fix), tsc --noEmit and explore-parity and explore-sort (52 tests) pass. The gate rewrapped comments in one file. That rewrap is already in the pushed commit, so there was nothing left to commit.
What changed
- Docs:
docs/features/explore.mdnow listsnewin the sorts table and Newest among the page tabs. The parameter table maps Newest tosort=new, and the "why" sentence sayssort:newhas no phrase, assort:namehas none.whyOfalready returns nothing fornew, so the docs match the code. - API and MCP:
sort:newis inSORTS, so the page,GET /api/v1/explore, the MCPexploretool and the terminal line all take it. The earlier pull text that said otherwise was wrong.test/explore-parity.test.tsnow haskind:app sort:new, which checks that all three doors return the same order. To pin that order, the parity seed gives the repos fixed creation times. - People:
kind:person sort:newis in the parity test.test/explore-sort.test.tshas a second test where one person has an old app and a brand-new one, and ranks first because of the new one. I checked that both person tests fail if the newest-app rule atexplore.ts:737takes only the current row, so they would catch its removal. - Baseline: the no-sort assertion in the
sort=newtest now compares against the exact default order (loom, garden, kiln, zed), not just "zed is not first".
Left alone
- I did not touch the seven-word wrap in
content.ts. - I did not run the 390px test.
To try it: open /explore?kind=app&sort=new and /explore?kind=person&sort=new.
The hold on trevato/forge about production rolling did not touch this change.
🤖 Generated with Claude Code
<!-- look-pages 31dfe637a497 --> Look pages for 31dfe63, from the gate:
look pages (named): this pull changes src/web/studio/explore.ts, src/web/style/content.ts; a commit names /explore
No code changed this turn, so I pushed nothing. The feedback from the gate was only a look-pages notice: the pull touches src/web/studio/explore.ts and src/web/style/content.ts, and a commit names /explore. It didn't report a failing check, so I only re-ran the checks that cover those pages.
- Design lint:
bun scripts/design-lint.tsis clean. It reports no colour, size or component added outside the system. - Type check:
bun x tsc --noEmitshows no errors. - Tests: the four explore and browse test files pass, 48 tests in all (
explore-rank,explore-numbers,explore-api-paging,web-browse).bun scripts/fast.tsfound the diff too broad to name tests (2,264 of 3,437 files), so I picked these four myself. I didn't run the full suite, which the forge's check does on push.
The pull as pushed adds sort=new and sort=forks to /explore. They are plain links kept in the URL, with the active one marked. sort:new is documented, and sort:new is tested on all three doors. I didn't try the pages on the preview.
To look at it: https://lab--13556--forge-trevato-apps.open-platform.sh/explore?kind=app&sort=new, then tap Newest or Forks.
Earlier asks are met: docs/features/explore.md lists new and Newest, sort:new is in SORTS so the page, API, MCP and terminal all take it, the person rule and the exact baseline order are tested, and the parity test covers app and person on all three doors. The preview marks Newest with aria-current and keeps sort=new in the kind and time links. Seven sorts wrap on a phone instead of scrolling. Next, non-blocking: (1) move the sort links out of the closed Sort and time disclosure so they are one tap away; (2) add a test on the sort=forks ordering with forked fixtures. I did not run the 390px test.
/explorenow takes?sort=newalongside the existing?sort=forks, and the pushed branch carries that change. The tests I ran pass andtscis clean. I didn't run the full suite; the forge runs it on the push.Already on main:
?sort=forks, thearia-currentmarking, an unknown sort being ignored with a note and a 200, and kind links that keep the sort (all from #13474). Paging links already carried the sort through the cursor. I only added a test forsort=forks.What changed
sort=neworders apps by when they were made, newest first. A person ranks by their newest app. The control is a Newest link in the "Sort and time" segment next to Forks. It is marked witharia-current, and every other link keeps it in the URL.repoDatesFor, one chunked query, and only when the sort isnew. Other sorts pay nothing and there is no new index.newis now in the sort list, so the "is not a sort — use …" note on the page, API and MCP names it. I updated two existing tests that asserted the old word list (test/explore-unknown-words.test.ts,test/explore-parity.test.ts); the assertions were stale, not wrong.test/explore-sort.test.ts:sort=newputs a freshly made app first and marks Newest, andsort=forksis accepted, marked and kept by the kind links.Not done
sort=forkstest checks the marking and kind links, not the fork ordering, because the fixture has no forks to rank.sort=newshows no "why" line on rows, the same asname.Try it: open
/explore?kind=app, expand "Sort and time" and tap Newest or Forks. Or go straight to/explore?kind=app&sort=new.Closes #13523