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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

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

opened this

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: readExploreLine in src/actions/explore.ts returns them in unknown and leaves them out of the query.
  • Note wording: exploreNote now 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: or owner: with no value stays free text, as does a word like http://x, because only the five keys are read.
  • Extra fix: the lookups for kind: and updated: used plain object checks, so kind:constructor or updated:constructor would have counted as known. They now use Object.hasOwn.
  • Tests: test/explore-unknown-words.test.ts gains a test per key, one for the free-text cases, and one that the API answers owner:trevato updated:2y archived:maybe with both notes.
  • Changed tests: two assertions in test/explore.test.ts expected the old behaviour (updated:2y as 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:maybe now carries a note naming updated:2y and archived:maybe, and query reads owner:trevato.

Closes #9075

commented

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: readExploreLine in src/actions/explore.ts returns them in unknown and leaves them out of the query.
  • Note wording: exploreNote now 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: or owner: with no value stays free text, as does a word like http://x, because only the five keys are read.
  • Extra fix: the lookups for kind: and updated: used plain object checks, so kind:constructor or updated:constructor would have counted as known. They now use Object.hasOwn.
  • Tests: test/explore-unknown-words.test.ts gains a test per key, one for the free-text cases, and one that the API answers owner:trevato updated:2y archived:maybe with both notes.
  • Changed tests: two assertions in test/explore.test.ts expected the old behaviour (updated:2y as 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:maybe now carries a note naming updated:2y and archived:maybe, and query reads owner:trevato.
commented

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: readExploreLine in src/actions/explore.ts returns an unknown updated:, archived: or unsafe owner: value in unknown and leaves it out of the query.
  • Note wording: exploreNote now 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: or owner: with no value stays free text, as does a word like http://x.
  • Extra fix: the kind: and updated: lookups now use Object.hasOwn, so kind:constructor is no longer treated as a known kind.
  • Tests: test/explore-unknown-words.test.ts gains a test per key, one for the free-text cases, and one that the API carries the note. Two assertions in test/explore.test.ts expected the old behaviour (updated:2y as 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.

Changes requested — before the latest push

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.

commented

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= with updated:2y and archived:maybe and checks for their notes. It also sends owner:<b> and checks that the output has owner:&lt;b&gt; is not a name and no raw <b>.
  • MCP explore tool: the existing test now also checks the note field for archived:maybe, updated:2y and owner: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.

Approved

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.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs