Repository navigation
feat(dashboard): Search To-dos through /api/search - #4113
Merged
Merged
Conversation
Add GET /api/search?q=&sources=, which Cmd+K reads once for each typed query instead of two list searches. It still matches Inbox item bodies and Automation instructions, skills, and event triggers, not only titles. Each source filters with GIN indexes: a weighted simple-config tsvector for word-prefix matches, and a pg_trgm title index for typos. It ranks a capped window of the newest matches. The ranks of each match leg fuse with the shared search ranking that memory recall now uses too. The search runs in omniSearch, outside the route, with each source's own page access rule. Refs #4095 Co-Authored-By: BYK <[email protected]>
Co-Authored-By: BYK <[email protected]>
Cmd+K's Memories group now reads the memories source of /api/search with its other searched groups, in one request. The source runs the hybrid word and vector search of automatic recall over active public memory, with recall's vector cutoff, and matches word prefixes so a half-typed word still finds its memory. Co-Authored-By: BYK <[email protected]>
Add To-dos as a source of /api/search, so Cmd+K finds them by title. Open and in-progress To-dos show in a To-dos group. Done and dropped ones show under Done, after closed Inbox items. A row opens the To-do's Conversation. A To-do shows only when its Conversation shows its private content to the viewer: its root is public, or the viewer is a Participant of the root. That is the rule that redacts To-dos on the Conversation page, and the query applies it in SQL, so the ranked window holds only visible To-dos. Matching uses the shared word-prefix and trigram legs, read from new GIN indexes on the To-do title, and the shared fused ranking. Refs #4095 Co-Authored-By: BYK <[email protected]>
Co-Authored-By: BYK <[email protected]> # Conflicts: # packages/junior-dashboard/e2e/inbox/command-palette.spec.ts # packages/junior-dashboard/e2e/search-fixture.ts # packages/junior-dashboard/src/client/shell/components/CommandPaletteDialog.tsx # packages/junior-dashboard/src/mock-reporting/search-routes.ts # packages/junior-dashboard/src/mock-reporting/search.ts # packages/junior/migrations/meta/_journal.json # packages/junior/src/api/schema.ts # packages/junior/src/api/schema/search.ts # packages/junior/src/chat/omni-search/search.ts # packages/junior/tests/fixtures/sql-budget.ts # packages/junior/tests/integration/api/search.test.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
17 screenshot changes — 13 changed · 4 added · 0 removed Review screenshots in Frameshift Show 7 more changed screenshots |
Renumber the To-do search index migration to 0166, after main's 0165.
BYK
approved these changes
Nov 23, 2026
BYK
enabled auto-merge (squash)
November 23, 2026 20:16
# Conflicts: # packages/junior/migrations/meta/0166_snapshot.json # packages/junior/migrations/meta/_journal.json # packages/junior/tests/integration/api/search.test.ts
22 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cmd+K now finds To-dos by title. To-dos are a new source of
/api/search, next to Inbox items, Automations, and memories. This is the next step of #4095.What shows where
Access
A To-do shows only when its Conversation shows private content to the viewer: the root's Destination is public, or the viewer is a Participant of the root. The Conversation page redacts To-dos by this same rule, so search never shows a title that the page hides. The query applies the rule in SQL with
rootVisibleToViewerand the root-validity checks fromconversationAccessFromRows. This way, the capped ranking window holds only To-dos the viewer can see.Matching and ranking
searchTodosForViewer(chat/todos/search.ts) uses the sharedsrc/searchlegs and the fused ranking that the other sources use:simpletsvector word-prefix matches, so a half-typed word finds resultspg_trgmmatches on the title, so a typo still finds a To-do0167_todo_search_indexes, created concurrently)It runs from
omniSearch, not from the route, so a future Omni Search agent tool can call it with the same access rule. Like Inbox items and Automations, To-dos have no embeddings yet.Screenshots (mock data, query "dashboard")
Refs #4095
via @BYK.
--
View Session [Sentry]