Omniscio

Global Search (Ctrl+K across everything)

One keyboard-first palette that searches every message channel in Omniscio at once — conversations, SMS, Slack, Telegram, feeds, webhooks, session titles and project metadata — with quoted phrases, exclusions and deep links into any result.

On this page

What it is

Global Search is a single keyboard-first search palette that hits every message channel in Omniscio at once — Claude conversations, SMS, Slack, Telegram, RSS feeds, and incoming webhooks, plus session titles and project metadata. It uses SQLite FTS5 for full-text ranking, supports phrase quoting, -word exclusion, and OR syntax, and renders matches with <</>> highlighting. Every result has a deep-link you can click — including omniscio://session/<id> URLs that render as native links and jump you straight to a specific session without reloading anything.

What the index covers. For Claude conversations the index is curated, not raw:

  • Operator (your) messages — indexed in full, every word.
  • Agent messages — only the final reply prose is indexed. Mid-turn narration, tool-call lines (▸ ...), tool-result lines (← ...), and still-streaming partial rows are deliberately excluded from the index.
  • System rows — never indexed.

So searches always land on something a human said or the agent's actual answer — never on Read(file.ts) plumbing or transient mid-turn chatter. The exclusion is a property of the index itself, so no per-search toggle is needed (and none exists). Other channels (SMS, Slack, Telegram, RSS, webhook) carry only their natural message content, so they're indexed in full.

In late April 2026 the filter UI was redesigned. The previous "pill row + active-chips" toolbar is gone. Desktop now uses Omniscio's standard DialogShell chrome — a centered card on a bg-surface-200 body, rounded-xl, max-w-3xl, locked to 85vh tall regardless of result count so the dialog doesn't grow as matches stream in — with a search input row at the top of the body (the Sort dropdown lives here, beside the search box) and a left-rail sidebar (220 px) below it carrying the filters, in order: Where → When → Source → Scope → Tag → Clear filters (Clear filters is the last item, and only appears when something is filtered). All filters are always visible — there is no "Advanced" expander. Mobile kept its full-screen sheet with the hero glow header (a big search input on a soft accent-color radial halo) and a single Filters pill in place of the sidebar, with the Sort dropdown sitting beside that pill. The semantic-vs-keyword toggle is gone too: AI ranking now runs silently for every search per the existing eligibility rules. The user just types and gets the most-likely results.

Where to find it

Search surfaces (tabs)

Since 2026-07 the palette carries a tab bar that scopes the query to a surface — or searches all of them at once. It opens on the Conversations tab (the primary Ctrl+K use — finding a session — keeps its full filter sidebar and muscle memory); the All tab is first in the strip, one click away:

  • All — runs every enabled surface and shows results grouped by surface (Conversations → Files → Notes → Meetings → Voice → Recordings → Helpdesk → Spreadsheets → Settings, in that fixed order), each section capped with a See all link that switches to that surface's own tab.
  • Conversations — the default; the message search the rest of this page describes (every channel + all the filters, Sort, dedup, and Ask AI). Everything below about filters / scope / status / dedup applies to this tab.
  • Files — finds any file or folder on this Windows computer by name as you type, newest first (2026-10). While this tab is open the search box says so: its placeholder and its screen-reader name read "Search files and folders by name…" rather than the sessions/messages/notes wording every other tab carries. It is powered by Everything, a free app from voidtools; Omniscio asks the running Everything directly, so no program starts per keystroke. A click selects a row without opening it (hovering moves nothing, and rows show no hover tooltip); Enter or a double-click opens the file in its default app; Ctrl+Enter (or Ctrl+double-click) shows it selected in its folder. A program or script (.exe, .bat, .ps1, .lnk, … — anything Windows itself marks dangerous) is always shown in its folder, never run. Results show as an Everything-style table (2026-10): Name, Path, Size, Date modified and Extension, plus Date created, Date accessed, Date recently changed, Attributes, Run count and Date run from the column picker (show/hide, move up/down, Reset to default). Click a header to sort every match (Everything sorts the whole result set; click again to reverse; Ctrl+Shift+1–4 sort by Name, Path, Size, Date modified); drag a header's edge to resize. The layout and sort are remembered across restarts. Scrolling loads more rows, 100 at a time up to 1,000, and the footer shows "Showing N of total". Right-click a row for Open, Show in folder and Copy path. Filters are typed into the search box and shown back as chips under it: "exact phrase", -word (exclude), word OR word, filetype:md,txt (or type:picture / document / audio / video / compressed / executable), in:"C:\folder", name:report.pdf (exact name), startswith: / endswith:, size:>10mb or size:1mb..50mb, modified:today|week|month|year or modified:>2026-01-01, created:…, is:folder|file|hidden|system|readonly, regex:… — and any filter can be excluded with a leading - (chips mark exclusions "is not" with a dashed outline). Everything's own syntax (*.pdf, a|b, dm:today) still works. Filters adds a filter by clicking (Include / Exclude); Advanced (Ctrl+Shift+Y, hidden until opened) is a form for words, folders, extensions, size and date ranges, attributes, plus Match case / Whole words / Match path; the ? button lists every operator. Filters live in the search text, so they clear the next time search opens. When Everything can't answer, the tab says why instead of showing an empty list: not installed (Get Everything (free)), installed but stopped (Start Everything — starts it quietly in the tray), still indexing, or busy (Everything is running but your computer is too loaded for it to answer in time). When it is busy, or a search fails, the tab tries again by itself every few seconds until results appear. Every notice has Hide this tab. On the All tab Files contributes up to 5 rows and stays silent when Everything is unavailable; it is not part of the Universal (AI-ranked) tab. Shown only on a Windows computer, in the desktop app — never on the phone/web view, whose requests are refused — and switchable off in Settings → Lab → Files tab in search (fileSearchEnabled, on by default). Searches and results never leave the computer. Engine details and the swap seam: file-search contract.
  • Notes — full-text search over your KMS notes; opening a result switches to the Notes view and opens the note. This tab appears only when KMS (Notes) is enabled (nothariEnabled).
  • Meetings — full-text search over your meeting notes; opening a result switches to the Meetings view and selects the meeting. Always available.
  • Voice — full-text search over your voice-history conversations; opening a result switches to the Voice History view and opens the conversation. Shown only when Voice History is enabled (its unreleased-feature flag + voiceHistorySidebarEnabled).
  • Recordings — full-text search over screen-recording titles + transcripts; opening a result switches to the Recordings library. Shown only when the Screen Recorder is enabled (screenRecorderEnabled).
  • Helpdesk — full-text search over your own help requests (Get Help question text); opening a result opens your Helpdesk panel to that request. Shown only when Get Help (the base helpdesk flag) is enabled; it searches only this install's own questions, never other users' threads.
  • Spreadsheets — finds your Omniscio Tables spreadsheets by name and by what is typed in their cells (not formulas); each result names the sheet of the first match and shows the matching text. Opening a result opens Omniscio Tables on that spreadsheet. Shown only when the Omniscio Tables plugin is enabled. A spreadsheet's contents become searchable once it has been opened (or an agent worked in it) since this feature arrived; until then it is found by its name. Omniscio Tables keeps up to about 50,000 characters of each spreadsheet for this, so a very large one is found by its first part.
  • Settings — finds a setting by label / description / keywords and jumps the Settings screen straight to that entry (scrolls + highlights it), reusing the same "jump to setting" path as the in-Settings search.

The rich conversation filter sidebar (Where / When / Source / Scope / Status / Tag) and the Sort control show only on the Conversations tab — they don't apply to the other surfaces. Keyboard nav (↑/↓, Enter, Esc) works the same across every tab, including across the grouped sections on All (one flat selection index spans the whole list), and Ctrl+Tab / Ctrl+Shift+Tab cycle the tab strip itself from anywhere inside the modal — forward and back, wrapping, skipping nothing (the strip is the enabled-tab list). Meetings, Voice, Recordings, and Helpdesk are now wired here (2026-07); the remaining unindexed surfaces (emails, Granola, full session-transcript semantic search) are the next follow-up and plug into this same tab bar once their text is indexed. Component + test-locked invariants: SearchModal surface-tabs contract.

How to use it

  1. Open it. Press Ctrl+K (Windows/Linux) or ⌘K (Mac) from anywhere in the app — it works even while you're typing in a text field. You can also press / (GitHub-style) when you're not typing in a text field; inside a text box / types a literal slash, so click out or press Esc first. Alternative entry points: the magnifying-glass icons in the header and the sessions sidebar.

  2. Type a query. Results appear after 500 ms of idle typing (SEARCH_QUERY_DEBOUNCE_MS in SearchModal.tsx; a unit test locks the floor at 400 ms so a future "perf tweak" can't tighten it below the type-then-pause threshold). Use quotes for exact phrases ("dead letter queue"), -word to exclude (refund -test), or OR to combine (staging OR production). Single words match any token. Search-as-you-type prefix matching: the trailing bare-word token of every query is auto-prefixed (Pr matches Project alpha, hello wo matches hello world), so partial words find hits before you finish typing. Trailing phrases ("hello") and trailing negations (-bug) suppress the auto-prefix — only an unquoted final token is expanded.

    Quoted phrases are word-exact. Wrapping text in "..." narrows the result to a true word-for-word match:

    • "meeting" does not match meetings or premeeting (the boundary is [\p{L}\p{N}_] lookarounds — a real word edge).
    • Matching is case-insensitive: "Meeting" and "meeting" are the same query.
    • Whitespace inside a phrase is flexible — "project plan" matches project plan (multiple spaces) and project\nplan (newline) in stored text.
    • A hyphen between words counts as a space — "scar tissue" matches scar-tissue, and "scar-tissue" matches scar tissue. It stays word-exact: scar-tissues and scartissue do not match.
    • The quotes apply to every Conversations result: a session name only matches when it holds the phrase (not just its words somewhere), and a quoted search adds no meaning-based (semantic) matches, OR queries included. (SMS, Slack, Telegram, feeds, webhooks and scratchpads match the typed text literally, quote marks included.)
    • The result snippet — and a matching session name — jumps to the quoted phrase itself and highlights it whole, never a longer word ("test" highlights test, not testing). A plain word is only found at the start of a word, so scar never highlights the inside of discard.
    • Regex metacharacters are literal — "c++ template" matches the literal three-character c++ sequence, not "any character".
    • Unquoted searches still use FTS5's porter-stemmer recall superset (meeting finds meetings, deploy finds deployed), so quote only when you genuinely want to forbid near-matches.
    • Negated phrases (-"foo") stay on the stemmed path — excluding a stemmed near-match is the safe direction.
    • OR queries skip exact-narrowing entirely (each branch's row contains only one side of the OR; word-exact AND-ing every quoted phrase would wrongly reject real hits).
  3. Apply filters.

    • Desktop: a 220 px-wide SearchSidebar sits to the left of the results, in the order Where → When → Source → Scope → Status → Started by → Harness → Model → AI helpers → Tag. Where, When, and Tag are buttons that open a popover anchored under each. Where is a combined popover with two sections: "Project" (each row has the project's icon — folder image for user projects, lucide icon for virtual ones like Recipes, Skills, Cron) and "Channel" (each row has the channel's lucide icon — chat for conversations, phone for SMS, hash for Slack, etc.). When opens a date-range popover with From/To inputs and Today / 7 days / 30 days preset chips. Click an option to set it; click the same row again or press Escape to close the popover without closing the modal. Each button shows the current value inline (muted "Anywhere"/"Anytime"/"Any tag" when default, full text when active). All section labels use the same small gray uppercase style.
    • Sort lives by the search box, not in the filters. It is a compact <Select> dropdown (Newest first / Oldest first / Most relevant) in the search-input row — sort orders results, it doesn't filter them. On mobile it sits in the Filters row beside the pill (the hero search input has no room beside it).
    • Clear filters appears as a small text link at the very bottom of the sidebar (after every filter) only when at least one filter is non-default; clicking it resets every sidebar control in one go (Source, Scope, Status, Started by and AI helpers included).
    • Source, Search scope, Status, Started by, Harness & Model: between When and Tag, the sidebar shows always-visible control groups — Source (Any / My messages / Agent) and Scope (Titles + initial / All / Titles only / Initial only) as single-select radio rows, and Status (Live / Needs you / Starting or idle / Archived / Done — Live is only sessions that are running right now, the green dot), Started by (Me / An agent / Omniscio) and Harness / Model (the engines and models your recent sessions ran on, with counts) as multi-select checkbox rows, followed by an AI helpers section with one Include AI helper sessions checkbox (off by default — see "How it works"). They render inline, available from the start (no "Advanced" expander). On desktop their headings match the gray uppercase style of the other filter labels; on mobile they use the sheet's sentence-case style. Both are disabled on non-conversation channels (SMS/Slack/etc. don't carry the same metadata) — the disabled controls show a tooltip explaining why. The old Hide tool actions switch was removed once the index itself stopped covering mid-turn agent narration / tool calls / tool results — there is no longer anything to hide at search time.
    • Mobile: a hero-glow header (a big search input with a soft accent radial halo, full-screen sheet preserved from the previous design) sits above the results, and a single Filters pill (with the Sort dropdown beside it) replaces the sidebar. Tapping the pill opens a bottom sheet whose main view mirrors the desktop column — Where / When at the top, the Source / Search scope / Status / Started by control groups below (always visible — no expander, and Harness / Model included), then a conditional Clear filters link at the bottom. Where opens a drill-down sub-screen with a back button (Channel section + Project list, each row showing its icon). When uses From/To inputs plus Today / 7 days / 30 days preset chips inline. The Source and Scope controls are disabled on non-conversation channels just like desktop.
  4. Result rows. Each row shows the channel icon, the match title (FTS5-bolded), a relative-time timestamp, and a snippet with <mark> highlights. The snippet window is sized to the row's two visible lines (SEARCH_SNIPPET_TOKEN_BUDGET), so the highlighted term stays anchored near the start and visible — a wider window would let a long lead-in push the match past the two-line clamp, making a real hit look like it lacked your word. Session results also carry a small status dot trailing the title — the same colored dot (running = green, needs-you = amber, error = red, archived = grey, …) and hover tooltip the sidebar uses, so you can read a session's state at a glance without opening it. Non-session results (SMS/Slack/Telegram/RSS/webhook) have no dot. The project name appears as a small subtitle line only when no specific project is filtered — once you scope a search to a single project, the project name disappears from each row (it'd be redundant). Sessions you opened from a project sidebar already start with that project pre-applied, so their result rows skip the subtitle by default. One row per session, not per match — when several messages in the same session match your query, the modal collapses them into a single row with a small ×N badge after the title (e.g. Refunds for May ×4). The row navigates you to the best match in that session, where "best" prefers a title hit, then the initial message, then most-recent operator/agent content. So if you searched refund and the title is "Refunds for May", clicking lands you on the session header — but if only the body matched, clicking lands you on the matched message itself. Single-match sessions skip the badge entirely. The same dedup applies to every channel by its natural group key (Conversation by sessionId, SMS by phone number, Slack by channel id, Telegram by conversation id, RSS by entry id, Webhook by source id).

    • A session's own name comes first. On the All content scope (the default), the search also looks at session names, and up to 5 sessions whose name contains every word you typed sit at the top of the first page, above message matches, whatever the sort order. So typing Release Overseer finds the session named [Release] Overseer #1 straight away, even when newer sessions merely mention those words. Name matching is word by word, in any order, ignoring punctuation between the words (every scope that searches titles works this way) — except that a quoted phrase must appear in the name as a phrase. The name lookup is skipped on later pages and when Source narrows results to one kind of message.
  5. Result count. Above the results: N session / N sessions. Screen readers hear it from one always-mounted status region that every tab shares — it speaks N sessions on Conversations and N results on the other tabs once a search settles (including 0 sessions / 0 results when nothing matches), and stays silent while a search is still running. Each result row also says its type in words (Notes, Settings, SMS…), not only through its icon, every "See all" button is named after its section ("See all Notes"), and the search box points aria-controls at whichever result lists are on screen. This is the unique-session count after dedup, not the total number of matches across all messages. The previous "Top N matches" wording from the semantic-AI banner is gone too.

  6. Navigate results. Arrow Up/Down selects. Enter opens. Escape — or Ctrl+W / ⌘W (the browser "close" gesture) — closes, layered: if a sidebar popover is open it closes the popover first; a second press closes the modal. On mobile, the same layering applies between the FiltersSheet and the modal. The browser/mobile hardware back button mirrors the same layering via popstate, so swiping back on Android closes the sheet before the modal.

  7. Jump to older results. Each page shows 30 matches — use the Load more button (cursor-based pagination) to scroll deeper.

  8. No results? When a non-empty query yields zero matches and the Scope filter is narrowed (anything other than "All content"), the empty state shows a "Search all message content for "<query>"" button. Clicking it widens the scope to all in place, re-running the search across full message bodies — the same query that just failed will usually find hits in agent replies or middle-of-thread operator messages that titles+initial misses.

  9. Ask AI (scoped background search). If keyword results aren't what you want, click the Ask AI button (sparkle icon — desktop in the modal header, mobile in the Filters row). It opens a small popover (pre-filled with your query) where you tweak what to search; submitting spawns a Session Search chat in the background, scoped to the tab you're on (Conversations folds in your filters · Notes → your KMS vault · Settings → your settings catalog). You stay where you are — a toast with an Open button, plus the chat's normal sidebar status, lets you switch in when it's ready. Submit is disabled until the box is non-empty; a launch failure keeps the popover open to retry. The button hides itself if the Session Search project hasn't been seeded yet (very first launch) or outside the desktop app. Full flow: session-search.md.

Filters

Sidebar column, in order (Sort is NOT in the column — see the last row):

Sidebar control Options
Where "All projects" + per-project list (icons) — and a Channel section: Any / Conversation / SMS / Slack / Telegram / RSS / webhook
When From / To dates + Today / 7 days / 30 days preset chips
Source Any / my messages / agent messages (disabled on non-conversation channels)
Scope All content / titles only / initial messages only / titles + initial (disabled on non-conversation)
Status (multi-select checkboxes) Live / Needs you / Starting or idle / Archived / Done — narrows results to sessions in the selected state(s); none selected = no status filter (disabled on non-conversation)
Started by (multi-select checkboxes) Me / An agent / Omniscio — who started the session; none ticked = no filter (disabled on non-conversation)
Harness (multi-select checkboxes) Claude / DeepSeek / GLM / … — which engine the session ran on, most recently used first with a session count; none ticked = no filter (disabled on non-conversation)
Model (multi-select checkboxes) the models your sessions used, plus Default model for sessions that never picked one; none ticked = no filter (disabled on non-conversation)
AI helpers (one checkbox) Include AI helper sessions — off by default (and again on every open), so the app's own code-reviewer and crew-scribe sessions stay out of results; tick to bring them back (disabled on non-conversation)
Tag (only when session tags are enabled) "Any tag" + per-tag list
Clear filters reset link, last item, shown only when a filter is non-default
Sort (a <Select> by the search box, NOT in the column) Newest first / Oldest first / Most relevant

Where starts on the project you opened search from — but only when that project is in the picker. Opening search from a built-in hub (Session Search, Settings, a plugin panel) starts on "All projects", because the picker cannot list a hub and a filter you cannot see must never narrow your results.

The Status buckets fold the internal session statuses so the user picks from a short, friendly set: Live = running / starting / ready / terminating / waiting; Needs you = needs-input / error / stalled; Archived; Done = ended / paused. Selecting any bucket makes the search conversation-only (non-conversation channels carry no session status, so they drop out); the mapping lives in search-status-buckets.ts and the filter is applied inside the query so paging stays correct.

Started by splits every session into exactly one of three groups, so ticking all three is the same as ticking none:

  • Me — you started it by typing: the main chat box, Quick Launch, a new session, a session host's "+ New", and similar. Sessions from before the app recorded who started them (mostly March–April 2026) also count as yours.
  • An agent — another session started it.
  • Omniscio — the app started it: scheduled jobs, automations, recipe runs, alert fixers, the auto-lander, code reviewers, cloud runs, plugins, and inbox "Start session" taps whose prompt the app wrote.

Like Status, ticking any group makes the search conversation-only. It is independent of Include AI helper sessions — helpers stay hidden unless that box is ticked. The groups live in search-started-by.ts and the filter is applied inside the query so paging stays correct.

Harness and Model narrow by the session's engine (sessions.provider) and the model it actually ran (sessions.model). The option lists come from the sessions used in the last 180 days, read through the search's own off-thread DB host and cached for 30 minutes, so the panel never waits on a scan; a model that never picked one shows as Default model. Two stored values that share one friendly name (a reseller copy such as crofai/glm-5.2 beside glm-5.2) are shown with the stored value beside the label, so two rows can never look identical. A value you already ticked stays in the list even if it has fallen out of the window, so a filter can never become invisible. Both groups live in search-model-harness.ts and the SQL in search-filter-facets.ts; like Status and Started by, ticking either makes the search conversation-only.

Non-conversation channels (SMS/Slack/Telegram/RSS/webhook) don't carry the same metadata as Claude conversations, so the Source, Scope, Status, Started by, Harness and Model controls are disabled when one is selected. Where, When, and Sort stay enabled for every channel.

How it behaves

How it works

The Ctrl+K and / shortcuts are the globalSearch action, declared in core.keybindings.ts and collected via keybindings.ts. It is passthroughInputs: true, but buildBindingLookup resolves that per-binding: Ctrl+K has a modifier so it keeps firing while a text field/editor is focused (unchanged), while bare / is forced non-passthrough (no modifier) so it types a literal slash in inputs and opens search only when you're not typing. The top-level component is SearchModal.tsx; it branches on useIsMobile() to render the desktop sidebar layout or the mobile FiltersSheet. The modal is a lazy chunk, so both the desktop header search button (hover/focus) and the mobile breadcrumb search button (pointerdown) preload it on intent, and both open behind a shared SearchModalOpeningFallback.tsx — an instant "Opening search…" loading affordance that mirrors the real modal's geometry per platform (desktop: a centered, dialog-sized card over the same translucent scrim as DialogShell at size="xl" fixedHeight; mobile: the full-screen sheet, tap-to-dismiss) — so a cold first open reads as the search box opening, never a blank frame or a full-screen "whole screen goes black" flash while the chunk fetches. Closing the modal also aborts any in-flight search. See the mobile-search-startup-perf postmortem.

The desktop modal renders inside DialogShell at size="xl" (max-w-3xl, centered, bg-surface-200, rounded-xl) and passes fixedHeight so the shell uses h-[85vh] instead of the default max-h-[85vh] — keeps the dialog at a stable height instead of expanding from short-to-tall as result rows stream in — DialogShell owns the portal, focus trap, animation, header X, and footer; SearchModal supplies the body. The body is a standard search input row (using INPUT_CLASS from styles.ts, no halo) above a CSS Grid 220px 1fr two-column section: sidebar on the left, results pane on the right. The sidebar component is SearchSidebar.tsx; it composes the Where / When / Tag popovers using the same custom POPOVER_CONTAINER pattern as the rest of the app (no Radix), with the Source / Scope groups inline between them and the Clear-filters link last. Sort is no longer a sidebar row — it renders as the standardized <Select> (variant="compact", fed SORT_OPTIONS) in SearchModal's search-input row (desktop) and the mobile filter-pill row, wired to the same sortOrder state. Where is its own component at WhereFilterPopover.tsx so the project-rows-with-icons logic stays isolated; it imports <ProjectIcon> from ProjectIcon.tsx — the single source of truth for project visuals across the app, including virtual-project lucide icons. The Source and Search scope control groups live in AdvancedFilters.tsx, rendered inline with no toggle (always visible) plus the disabled-state gating for non-conversation channels. The component takes labelClassName + className props so each host styles its own surface — desktop passes the uppercase MODAL_SECTION_LABEL + a flush wrapper so Source/Scope match the sidebar's other labels; mobile keeps the sentence-case defaults. See the search filter layout contract (order, Sort-by-the-box, label parity, always-visible). The mobile branch keeps the previous hand-rolled full-screen sheet — a single <input> wrapped in a div with a radial-gradient background-image style using the --accent-rgb CSS variable, so the glow follows the theme accent. A drift-prevention test at no-new-bare-modal.test.ts blocks any new hand-rolled portal+backdrop modal from being added — new dialogs must use DialogShell (inbox approval panes use ApprovalPaneShell, which is inline and doesn't trip the rule); the existing hand-rolled dialogs (mobile SearchModal among them) sit on a frozen allowlist that can only grow with a deliberate edit.

The mobile path renders FiltersSheet.tsx (drill-down bottom sheet with a focus trap, in a Portal with AnimatePresence) behind a single FilterPill.tsx pill. Shared label maps — SORT_LABELS, the SORT_OPTIONS array the Sort <Select> consumes, SOURCE_LABELS, SCOPE_LABELS, STATUS_LABELS + the STATUS_OPTIONS order for the Status group, CHANNEL_LABELS, CHANNEL_OPTIONS, and the CHANNEL_ICONS map — live in filter-labels.ts.

SearchModal is lazy-loaded by every caller — Dashboard, SessionsSidebar, and the header — because Rollup will hoist any statically-imported module into the entry chunk if any file in the entry graph imports it, even a sidebar sibling. A build test at non-registry-lazy-load.test.ts guards this invariant — it scans every renderer source file for static SearchModal imports and (when a production build is present) checks that SearchSidebar / WhereFilterPopover / AdvancedFilters / FiltersSheet identifiers don't leak into the entry chunk. See the CLAUDE.md frontend rules and the mobile-search-startup-perf postmortem.

Resume-typing responsiveness. Once results are on screen, continuing to type stays smooth: each result row is a React.memo'd SearchResultRow (in SearchModal.tsx) fed only props that stay stable across a query-only change, so a keystroke re-renders the input but skips the unchanged rows — without it, every keystroke rebuilt the whole list once results existed (the "search is laggy when I restart typing" report). The query→search effect also aborts the in-flight AbortController the instant query changes, so a slow reply for a previous query can never overwrite the screen mid-typing — the ac.signal.aborted guards in doSearch drop the stale reply. Both are locked by tests; see the search-modal resume-typing contract.

On the backend, the IPC.SEARCH_ALL handler in session-handlers.ts parses the query (safely escaping FTS5 operators so user input like " can't inject) via parseFts5Query in search.ts — a typed-token parser (bare / phrase / not / or) that quote-wraps every bare term to prevent operator injection, and auto-suffixes the final bare token with * so search-as-you-type prefixes (Pr, proj) hit FTS5's prefix-match path. Phrase, negation, and OR-operator trailers are recognized and left un-suffixed. The parsed query hits the conversation_messages_fts virtual table with snippet() producing the <</>> highlighted excerpt — a SEARCH_SNIPPET_TOKEN_BUDGET-token window (10), right-sized to the result row's two-line line-clamp-2 so a long lead-in can't push the match past the clamp (see the FTS index contract, I12) — and fans out to each channel's searchMessages() helper in parallel so a single round-trip returns results from all six channel types. After the channel results merge (and after the semantic ranker runs), a dedupBySessionGroup pass collapses rows that share a group key into one — keeping the highest-priority matchScope (title > initial > operator > agent > system) as the surviving row and stamping matchCount so the renderer can draw the ×N badge. The pass runs before the final sort and pagination, so total, hasMore, and the cursor all reflect the post-dedup count. Sessions that match only once still pass through with matchCount: 1 (the renderer hides the badge in that case). On the default searchIn: 'all' scope the handler also runs searchSessionTitles (first page only — no cursor — capped at PINNED_TITLE_MATCH_LIMIT = 5, and skipped when a sourceFilter is set), and after the sort titleMatchesFirst stable-partitions matchScope: 'title' rows to the front, so the sort can never re-bury a session the user named. searchSessionTitles folds the query, splits it into up to 8 words and requires each (fold(s.name) LIKE ? per word), highlighting every matched word in the snippet. After the final slice, a single chokepoint tags each visible session result with its current status via one batched getSessionStatusesByIds lookup — covering all conversation producers at once rather than threading s.status through each SELECT — which the renderer draws as the shared StatusDot; non-session channels stay undotted. See the search-result status dot contract. The Status filter is a separate concern from that dot: when the user selects one or more Status buckets, the handler expands them to raw statuses via expandStatusBuckets (search-status-buckets.ts) and threads that allow-list into every conversation producer as an s.status IN (…) clause — applied inside the query, before paging (via the shared query builders, so the off-thread worker path honors it too), which keeps total/hasMore/cursor correct. A non-empty status filter also makes the search conversation-only: the non-conversation channels + the semantic ranker are skipped, since neither carries a session status. See the search status filter contract. AI helper sessions are hidden by default: unless the request carries includeHelperSessions: true (the Include AI helper sessions checkbox), the handler passes excludeHelperSessions to every conversation producer — the message search, the first-message search and searchSessionTitles — which adds (s.reviewer_json IS NULL OR TRIM(s.reviewer_json) = '') inside the query, and drops helper sessions from the meaning results with one id lookup (listHelperSessionIds). A reviewer-locked session is an AI code reviewer or a crew scribe; since 2026-10-08 thousands of scribe prompts (up to ~1 MB each) were filling the newest results. Other callers of the same queries (the CLI /search/fts route, voice) pass nothing and still see them. Every newest/oldest search reads only the page: both the all-messages search and the first-message search ("Initial messages only" / "Titles + Initial msgs") go through the page-first steps in search-page-first.ts, which find, filter and order matches without reading any message body, then read bodies by id for the displayed rows alone (relevance sort and quoted phrases still use the single statement). See the FTS index contract time-sorted-search-reads-only-the-page and ctrl-k-hides-ai-helper-sessions-by-default. Semantic AI ranking is unshifted into the same response when eligibility criteria are met (see semantic-search.md) — the renderer no longer marks those rows specially, so semantic and keyword matches blend invisibly in the result list. SearchChannelType is defined in types.ts. Result snippets that contain markdown links like [label](omniscio://session/<id>) are rendered as real clickable links by the markdown renderer (via agent-markdown-path-utils.ts) so clicking them routes through useSessionStore.setActiveSession instead of opening an external browser.

Why a search stays fast on a big history, and what serves it. The backend half of this — the page-first read, the warm database helper a conversation search runs on, and the cost of a search over a long history — is on Global Search (part 2).

  • Global Search (Ctrl+K) (part 2) — the continuation of this page: what reaches the search index, the contentless index and its excerpts, and the word-exact phrase narrowing.

  • SearchModal surface-tabs contract — the tab model (All · Conversations · Notes · Meetings · Voice · Recordings · Helpdesk · Settings), per-surface search, grouped All, and the one-flat-index keyboard nav

  • semantic-search.md — AI-powered meaning-based matches now blend silently into these results, no UI toggle to flip

  • deep-links.md — the omniscio:// URLs that search results render as clickable

  • mempalace-memory.md — MemPalace drawer search is a separate surface for "recall things agents saw"

  • lazy-content-load.md — search hits that land on tool-output lines inside a not-yet-expanded Actions pill trigger an auto-expand before scroll, so the highlighted match is visible when you arrive; the index is contentless, and the excerpt is rebuilt from the message's own content when the row is displayed

Last verified 2026-10-02