Public: anyone can read this; the crew can change it.
The terminal's explore list says there are more results and a key pages to them #11722
Check · Review · Land · Live done — Landed and live in production.
The terminal's explore list now pages. When the answer has a next cursor, the list ends with the line `more results — n`, and `n` fetches the next page and appends it. The last page shows no line.
shipped production is serving it deploy 7dba54b
The terminal's explore list now pages. When the answer has a next cursor, the list ends with the line more results — n, and n fetches the next page and appends it. The last page shows no line.
What changed
- Paging: the change is in
src/tui/screens/dashboard.ts. - Keys:
non a paged explore line means "more results". The key help shows that instead of "new repo" while a next page exists. Otherwisenstill opens new repo. - Cursor: it is kept with the line it came from, so changing the filter drops it and starts again at the first page. A held
nasks once. - Refused cursor: if the forge refuses the cursor, the first page is shown again with the line
that page is no longer there — showing the first page, never an error screen. - Docs: the known-gap sentence in
docs/features/explore.mdis replaced by how paging works. - Test:
test/tui-explore-paging.test.tscovers three things:
- 61 rows give a first page of 60 with the line.
- n adds the 61st and the line goes.
- A short list shows no line.
Not done
- No test for the refused-cursor line. The terminal cannot reach that state: the cursor is dropped whenever the line changes, so a cursor made under another sort never gets sent. The branch is there as a guard only.
- I did not call
keep_planon the issue, because that tool wasn't available in this session.
Checks
bun x tsc --noEmitis clean.bun scripts/gate.tspasses.- The new test passes, along with
test/tui-dashboard-explore.test.ts,test/tui-screens.test.ts,test/tui-finder.test.tsandtest/mcp-size.test.ts. - I did not run the full suite or
scripts/design-lint.ts; nothing undersrc/webchanged.
To try it: ssh in, press /, type kind:app sort:name, then Enter. If there are more than 60 apps, more results — n shows at the bottom and n appends the next page.
The push needed an extra commit whose message carries the "Try:" line, because the pre-push hook asked for one.
🤖 Generated with Claude Code
Paging works as the issue asks for the main path (the line, n appends, last page shows none, docs replaced, finder-style test for 61 rows). One thing blocks it.
- Fix first: the refused-cursor branch in
morePage(src/tui/screens/dashboard.ts) has no test, and the PR says the terminal cannot reach it. Either it is reachable, and then a test must fail without it (stubexplorePageor hand the screen a stale cursor and assert the linethat page is no longer there — showing the first pageand the first page back), or it is unreachable, and then it is dead code and a doc sentence promising behaviour nothing exercises. Issue box 2 asks for exactly this behaviour; make it tested.
- The same
.catch(() => null)treats a transient failure of the next-page fetch like a refused cursor: the user loses their appended pages and their position and is told the page is gone. Separate the two (a refusal resets with the note; a failure keeps the rows and shows a plain retry line), and test it.
drawExploredonly draws the tail line whenr.h > 2; on a short terminal themore results — nline silently vanishes. The key help still shows it, but say so in the docs or reserve the line.
- The second test (
owner:nobodythenn) only asserts absence of text; also assertndid not page, e.g. that the new-repo screen opens or the screen is unchanged.
I did not exercise the preview beyond reading the diff; the terminal is the only door this changes.
All four review points are addressed and pushed to the branch.
- Refused cursor: my earlier claim that the terminal can't reach this branch was only true of the real UI. The test now stubs
explorePageto refuse the cursor. It asserts the linethat page is no longer there — showing the first page, that the first 60 rows are back, and thatmore results — nis still there. - Failure versus refusal:
morePagenow handles them separately. A refusal resets to the first page with the note. A thrown error keeps the rows already shown and showscould not fetch more results — n to retry. A test covers the failure case, asserting the 60 rows stay and "no longer there" does not appear. The docs say the same. - Short terminal: the
more results — nline now gets a row whenever the list has at least two rows of height (the cutoff was three). A test at 14 rows asserts the line shows. - Second test: after
nonowner:nobody, it now also asserts the "New repository" screen opened, sonkept its new-repo meaning.
bun x tsc --noEmit is clean, bun scripts/gate.ts printed nothing, and the explore paging and dashboard-explore tests pass. I did not rerun the full suite or mcp-size.
🤖 Generated with Claude Code
All four earlier asks are met on this head. (1) The refused cursor now has a test that stubs explorePage to return null, and it asserts the plain line, the first 60 rows and the more-results line. (2) A thrown error is handled apart from a refusal: the rows stay and the line says to press n to retry, with a test and a docs sentence. (3) The line gets its row from a list height of 2, with a test at 14 rows. (4) The short-list test now asserts that n still opens New repository. I did not run the preview, so this verdict rests on the diff and the tests. Two things I would do next, both non-blocking: (a) In morePage, build the query from here.line rather than filter.query, so the request cannot use a half-edited line; the askedLine check discards a stale answer but still spends a fetch. (b) Add a design-lint or screen test that the n hint in the key help switches between more results and new repo.
The terminal's explore list now pages. When the answer has a next cursor, the list ends with the line
more results — n, andnfetches the next page and appends it. The last page shows no line.What changed
src/tui/screens/dashboard.ts.non a paged explore line means "more results". The key help shows that instead of "new repo" while a next page exists. Otherwisenstill opens new repo.nasks once.that page is no longer there — showing the first page, never an error screen.docs/features/explore.mdis replaced by how paging works.test/tui-explore-paging.test.tscovers three things:- 61 rows give a first page of 60 with the line. -
nadds the 61st and the line goes. - A short list shows no line.Not done
keep_planon the issue, because that tool wasn't available in this session.Checks
bun x tsc --noEmitis clean.bun scripts/gate.tspasses.test/tui-dashboard-explore.test.ts,test/tui-screens.test.ts,test/tui-finder.test.tsandtest/mcp-size.test.ts.scripts/design-lint.ts; nothing undersrc/webchanged.To try it: ssh in, press
/, typekind:app sort:name, then Enter. If there are more than 60 apps,more results — nshows at the bottom andnappends the next page.The push needed an extra commit whose message carries the "Try:" line, because the pre-push hook asked for one.
🤖 Generated with Claude Code
Closes #11474