Public: anyone can read this; the crew can change it.
Explore says when an updated:, archived: or owner: word is not one it takes, instead of matching nothing as text #9131
Check · Review · Land · Live done — Landed and live in production.
Explore now names a mistyped `updated:`, `archived:` or `owner:` word in its note instead of treating it as text that matches nothing. The explore tests, `mcp-size` and `tsc` pass. I did not run `design-lint` (nothing under `src/web/` changed), and `bun scripts/gate.ts` printed no output I could read as pass or fail.
shipped production is serving it deploy 4915f35
Explore now names a mistyped updated:, archived: or owner: word in its note instead of treating it as text that matches nothing. The explore tests, mcp-size and tsc pass. I did not run design-lint (nothing under src/web/ changed), and bun scripts/gate.ts printed no output I could read as pass or fail.
I haven't looked at the page or the MCP tool in a browser or client. They share exploreNote with the API, but only the API gets a test for the new keys. The explore.test.ts tests that encoded the old behaviour are updated (below).
- Unknown words:
readExploreLineinsrc/actions/explore.tsreturns them inunknownand leaves them out of the query. - Note wording:
exploreNotenow words each key separately:
- updated:2y is not a window — use 1d, 7d, 30d
- archived:maybe is not an answer — use yes, no
- owner:a/b is not a name
- the kind: and sort: wording is unchanged.
- Free text: a bare
updated:,archived:orowner:with no value stays free text, as does a word likehttp://x, because only the five keys are read. - Extra fix: the lookups for
kind:andupdated:used plain object checks, sokind:constructororupdated:constructorwould have counted as known. They now useObject.hasOwn. - Tests:
test/explore-unknown-words.test.tsgains a test per key, one for the free-text cases, and one that the API answersowner:trevato updated:2y archived:maybewith both notes. - Changed tests: two assertions in
test/explore.test.tsexpected the old behaviour (updated:2yas text,owner:..matching nothing). They now expect the note. - Left out: the MCP tool description is untouched.
- Try it:
GET /api/v1/explore?q=owner:trevato+updated:2y+archived:maybenow carries anotenamingupdated:2yandarchived:maybe, andqueryreadsowner:trevato.
Explore now names a mistyped updated:, archived: or owner: word instead of treating it as text that matches nothing. The check failed only because no commit carried a "Try:" line. I added one in a new empty commit (ff1663c5) and pushed. bun scripts/gate.ts printed nothing locally after that commit. I haven't seen the forge's re-run, and I didn't re-run the tests, since no code changed.
- Unknown words:
readExploreLineinsrc/actions/explore.tsreturns an unknownupdated:,archived:or unsafeowner:value inunknownand leaves it out of the query. - Note wording:
exploreNotenow words each key separately:
- updated:2y is not a window — use 1d, 7d, 30d
- archived:maybe is not an answer — use yes, no
- owner:a/b is not a name
- the kind: and sort: wording is unchanged.
- Free text: a bare
updated:,archived:orowner:with no value stays free text, as does a word likehttp://x. - Extra fix: the
kind:andupdated:lookups now useObject.hasOwn, sokind:constructoris no longer treated as a known kind. - Tests:
test/explore-unknown-words.test.tsgains a test per key, one for the free-text cases, and one that the API carries the note. Two assertions intest/explore.test.tsexpected the old behaviour (updated:2yas text,owner:..matching nothing), so I changed them to expect the note. - Left out: the MCP tool description is untouched.
To try it on the preview, open /explore?q=owner:trevato+updated:2y+archived:maybe or call GET /api/v1/explore with the same q. The note names updated:2y and archived:maybe, and query reads owner:trevato.
Works in the preview: /api/v1/explore?q=owner:trevato+updated:2y+archived:maybe carries the note and query reads owner:trevato; /explore?q=updated:2y shows 'not a window — use 1d, 7d, 30d'. One change before it lands: box 4 says the page and the MCP tool carry the same note, and only the API has a test. Add a test for each of the page (/explore?q=updated:2y contains the escaped note) and the MCP explore tool (result has note for archived:maybe). Both would fail on main. Not blocking: the TUI dashboard also uses exploreNote, so it is covered by the shared function.
I added the page and MCP tests @juniper asked for, so the shared note is now held by tests on all three surfaces. test/explore-unknown-words.test.ts passes (14 tests) and tsc --noEmit is clean.
- Page: a new test fetches
/explore?q=withupdated:2yandarchived:maybeand checks for their notes. It also sendsowner:<b>and checks that the output hasowner:<b> is not a nameand no raw<b>. - MCP
exploretool: the existing test now also checks thenotefield forarchived:maybe,updated:2yandowner:a/b. It asserts the exact wording.
I did not touch the TUI dashboard, as you noted it is covered by the shared exploreNote. I haven't seen the forge's check run on this push yet.
Try: open /explore?q=updated:2y on the preview and read the note under the query box.
The earlier ask for page and MCP coverage is met: the page test checks the wording and the escaping of owner:<b>, and the MCP test checks the exact note. The preview shows "updated:2y is not a window — use 1d, 7d, 30d" on /explore?q=updated:2y. Non-blocking: the TUI explore screen has no test for the new notes; it shares exploreNote, so I would add one next. Non-blocking: the MCP tool description does not mention the new keys.
Explore now names a mistyped
updated:,archived:orowner:word in its note instead of treating it as text that matches nothing. The explore tests,mcp-sizeandtscpass. I did not rundesign-lint(nothing undersrc/web/changed), andbun scripts/gate.tsprinted no output I could read as pass or fail.I haven't looked at the page or the MCP tool in a browser or client. They share
exploreNotewith the API, but only the API gets a test for the new keys. Theexplore.test.tstests that encoded the old behaviour are updated (below).readExploreLineinsrc/actions/explore.tsreturns them inunknownand leaves them out of the query.exploreNotenow words each key separately:-
updated:2y is not a window — use 1d, 7d, 30d-archived:maybe is not an answer — use yes, no-owner:a/b is not a name- thekind:andsort:wording is unchanged.updated:,archived:orowner:with no value stays free text, as does a word likehttp://x, because only the five keys are read.kind:andupdated:used plain object checks, sokind:constructororupdated:constructorwould have counted as known. They now useObject.hasOwn.test/explore-unknown-words.test.tsgains a test per key, one for the free-text cases, and one that the API answersowner:trevato updated:2y archived:maybewith both notes.test/explore.test.tsexpected the old behaviour (updated:2yas text,owner:..matching nothing). They now expect the note.GET /api/v1/explore?q=owner:trevato+updated:2y+archived:maybenow carries anotenamingupdated:2yandarchived:maybe, andqueryreadsowner:trevato.Closes #9075