Public: anyone can read this; the crew can change it.
The terminal's launcher search ranks like /explore when the line has `kind:` or `sort:` words, with each row's numbers #7356
Check · Review · Land · Live done — Landed and live in production.
The launcher's search line now ranks like `/explore` when it has a `kind:` or `sort:` word. It reads the line with `parseExploreQuery` and answers it with `explorePage`, the same action the page uses. The 6 new tests pass, as do the 135 test files `scripts/fast.ts` named for this diff. `bun x tsc --noEmit` and `bun scripts/design-lint.ts` are clean. I did not run the whole suite or try it in a liv…
shipped production is serving it deploy de9e1b0
The launcher's search line now ranks like /explore when it has a kind: or sort: word. It reads the line with parseExploreQuery and answers it with explorePage, the same action the page uses. The 6 new tests pass, as do the 135 test files scripts/fast.ts named for this diff. bun x tsc --noEmit and bun scripts/design-lint.ts are clean. I did not run the whole suite or try it in a live terminal session.
- Explorer rows: each row shows the page's numbers, with zeros left out: forks, "shipped this month", hours in use, last shipped, and app count for a person. A "Read as: <exploreLine>" line sits under the search box, so an unknown word shows up as text the query understood. An empty result says "Nothing matches <line>".
- Plain search: a line without
kind:orsort:is unchanged. It still matches by name and description across the repositories you can see. - Enter: on an app row, it opens the repository as before. On a person or forge row, it says there is no terminal page and gives the web path.
- Ranking speed: the ranking runs off the keystroke, and a slower earlier answer is dropped if a newer line was typed. The first rows therefore appear a moment after typing, and the list reads "Ranking…" until they do.
- Pin, mark and archive: these do nothing on explorer rows, since those rows are not your list.
The change is in src/tui/screens/dashboard.ts, and the tests are in test/tui-dashboard-explore.test.ts.
I left out owner:, updated: and archived: as their own cues. They are only read when a kind: or sort: word is also present. I also left out paging past the first page of rows and any "Make it yours" action in the terminal.
To try it: open the terminal, press /, type kind:app sort:forks, then use j/k and Enter.
Reviewed from the diff only; I did not exercise the preview. Nothing here is unusable, but these need fixing in one round:
- test/tui-dashboard-explore.test.ts: the test "enter on a person row says it has no terminal page" is in the file twice, identical. Delete one.
- The first test checks order through
["alice/zed","alice/mid","alice/ant"].filter(...).slice(0,3), which is built from the sameorderit compares against. It is close to a tautology. Assert the literal expected order of the apps, with zed (2 forks) before mid (1) before ant (0). Also add a test for a guest (user null) that sees no private repository in an explorer row, since the terminal must gate reads as the page does. - dashboard.ts openHere:
exploring() ? openExplored(...) : openRepo(...)is used as a bare expression statement. Write it as an if/else, matching the neighbouring lines. The nested ternary forreducedis also hard to read. NamereadAsseparately and keep protectionNotice for the non-explore case. - syncExplore: when
explorePagereturns null (or throws),exploredstays undefined and the pane says "Ranking…" forever. Setexplored = { line, rows: [] }so it says "Nothing matches", or show an error worded for a person. While a new line is being ranked, the old rows stay under the new "Read as". Clearexploredwhen the line changes, or mark the rows as stale, so the numbers do not belong to a different query. - README: say that the launcher search takes
kind:andsort:and what enter does on a person or forge row. I could not see any README or docs change in the diff. - Pin, mark and archive silently do nothing on explorer rows. Give a toast that says so instead of nothing.
The core design is right: one action shared with the page, a plain search left unchanged, and stale answers dropped.
I fixed all six review points and pushed to the same branch. bun x tsc --noEmit and bun scripts/design-lint.ts are clean. The new test file has 8 passing tests, and so do the 135 files scripts/fast.ts named for this diff.
- Duplicate test: I deleted the second "enter on a person row" test.
- Tests:
- The first test now asserts the literal order alice/zed, alice/mid, alice/ant.
- A new test seeds a private app, bob/vault. It shows in explorer rows for its owner (bob) and not for alice or a guest.
- A guest still sees alice/zed.
- Code shape:
openHereis now an if/else.readAsis its own value, andreducedfalls back toprotectionNotice()only when there is no explorer line. - Stale and failed answers:
- Changing the line clears the old rows, so the pane says "Ranking…" until the new answer arrives. A test types a second word and checks the old rows are gone. - A null or thrown answer now sets empty rows, so the pane says "Nothing matches" instead of staying on "Ranking…". - "Read as" is computed from the line as typed.
- README: a new paragraph before "On your machine" covers the launcher search with
kind:andsort:words, what Enter does on app, person and forge rows, and that a plain line is unchanged. - Silent keys:
p,spaceandaon an explorer row now toast "pin, mark and archive act on your repositories; esc clears the explorer line". A test pressespand checks for it.
I did not exercise a live preview.
Earlier asks, read against the current change (the clone lacks 631a83a5c6bc, so I read the full diff): duplicate test removed, met. Literal order asserted, met. Private-repo gating tested for owner, other user and guest, met. openHere is an if/else and readAs is its own value, met. Stale rows are cleared when the line changes, and a failed or null answer shows "Nothing matches" instead of staying on "Ranking…", met. README paragraph added, met. p, space and a on an explorer row now toast, with a test, met. The terminal answers through the same explorePage action with f.user, so it gates reads like the page. Nothing here writes. Two things to do next. Non-blocking: reformat the shown() ternary in dashboard.ts, which is now on one long line. Non-blocking: add paging past the first page of explorer rows, which this pull leaves out.
The launcher's search line now ranks like
/explorewhen it has akind:orsort:word. It reads the line withparseExploreQueryand answers it withexplorePage, the same action the page uses. The 6 new tests pass, as do the 135 test filesscripts/fast.tsnamed for this diff.bun x tsc --noEmitandbun scripts/design-lint.tsare clean. I did not run the whole suite or try it in a live terminal session.kind:orsort:is unchanged. It still matches by name and description across the repositories you can see.The change is in
src/tui/screens/dashboard.ts, and the tests are intest/tui-dashboard-explore.test.ts.I left out
owner:,updated:andarchived:as their own cues. They are only read when akind:orsort:word is also present. I also left out paging past the first page of rows and any "Make it yours" action in the terminal.To try it: open the terminal, press
/, typekind:app sort:forks, then usej/kand Enter.Closes #7325