Skip to content

feat(dashboard): Search To-dos through /api/search - #4113

Merged
BYK merged 7 commits into
mainfrom
feat/omni-search-todos
Nov 23, 2026
Merged

BYK merged 7 commits into
mainfrom
feat/omni-search-todos

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Open and in-progress To-dos show in a To-dos group, after open Inbox items.
  • Done and dropped To-dos show under Done, after closed Inbox items. They have a "To-do" label, because Done also holds Inbox items.
  • Each row uses the To-do's status icon and opens the To-do's Conversation.

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 rootVisibleToViewer and the root-validity checks from conversationAccessFromRows. This way, the capped ranking window holds only To-dos the viewer can see.

Matching and ranking
searchTodosForViewer (chat/todos/search.ts) uses the shared src/search legs and the fused ranking that the other sources use:

  • simple tsvector word-prefix matches, so a half-typed word finds results
  • pg_trgm matches on the title, so a typo still finds a To-do
  • new GIN indexes for both legs (0167_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")

Dark Light
Desktop dark desktop light desktop
Mobile dark mobile light mobile

Refs #4095

via @BYK.

--

View Session [Sentry]

sentry-junior Bot and others added 5 commits November 23, 2026 16:26
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]>
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
@sentry-junior
sentry-junior Bot requested a review from BYK November 23, 2026 17:41
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 23, 2026 8:20pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

17 screenshot changes — 13 changed · 4 added · 0 removed

Review screenshots in Frameshift

Conversation Event Log · Mobile
Conversation Event Log · Mobile
Changed
Inbox Palette Feedback · Desktop
Inbox Palette Feedback · Desktop
Changed
Inbox Palette Feedback · Mobile
Inbox Palette Feedback · Mobile
Changed
Inbox Palette Feedback Light · Desktop
Inbox Palette Feedback Light · Desktop
Changed
Inbox Palette Feedback Light · Mobile
Inbox Palette Feedback Light · Mobile
Changed
Inbox Palette Search · Desktop
Inbox Palette Search · Desktop
Changed
Show 7 more changed screenshots
Inbox Palette Search · Mobile
Inbox Palette Search · Mobile
Changed
Inbox Palette Search Light · Desktop
Inbox Palette Search Light · Desktop
Changed
Inbox Palette Search Light · Mobile
Inbox Palette Search Light · Mobile
Changed
Inbox Tree State · Desktop
Inbox Tree State · Desktop
Changed
Inbox Tree State Light · Desktop
Inbox Tree State Light · Desktop
Changed
System Cache Health 24h · Desktop
System Cache Health 24h · Desktop
Changed
System Cache Warming · Desktop
System Cache Warming · Desktop
Changed

Renumber the To-do search index migration to 0166, after main's 0165.
@BYK
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
@BYK
BYK merged commit 070bb83 into main Nov 23, 2026
56 checks passed
@BYK
BYK deleted the feat/omni-search-todos branch November 23, 2026 20:33

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 1ddf9388 Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant