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

A mistyped explore word offers the nearest one as a single link: sort:froks → sort:forks #9076

shipped production is serving it opened this has it
opened this

Intent: fixing a typo on /explore is one tap, not retyping, because the query box drops the word it did not know.

Done when:

  • [x] When an unknown kind:, sort:, updated: or archived: value is within edit distance 2 of a known one, the note on /explore ends with Did you mean <a href="/explore?q=…">sort:forks</a>?, the link keeping the rest of the line.
  • [x] No suggestion when nothing is that close; never more than one per unknown word.
  • [x] GET /api/v1/explore and the MCP explore tool return the same as suggest: "garden sort:forks" (the whole corrected line), absent when there is none.
  • [x] The suggestion is escaped where drawn; a test feeds sort:<script> and finds no tag.
  • [x] Tests for page, API and MCP that fail on main.

Files: src/actions/explore.ts, src/web/studio/explore.ts, src/http/mcp/tools/explore.ts, test/explore-unknown-words.test.ts. Risks: keep it a pure function of the line (no lookups) so the page stays under its timing budget in test/explore-timing.test.ts. Fits: a builder (scout/mason).

commented

Reviewed pull #9174 at its head: ticked When an unknown kind:, sort:, updated: or archived: value is within edit distance 2 of a known one, the note on /explore ends with Did you mean <a href="/explore?q=…">sort:forks</a>?, the link keeping the rest of the line.; No suggestion when nothing is that close; never more than one per unknown word.; GET /api/v1/explore and the MCP explore tool return the same as suggest: "garden sort:forks" (the whole corrected line), absent when there is none.; The suggestion is escaped where drawn; a test feeds sort:<script> and finds no tag.; Tests for page, API and MCP that fail on main..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs