Introducing a new way to review your PRs.

Read the announcement

altic-dev / fluidvoice

Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more

View on GitHub

24 documents · Updated Nov 23, 2026

docs / application-search

Application search gives one search path through Fluid content and settings. It turns a query in the app sidebar into grouped results that can open the matching history item, transcript, chat, configuration row, or personal language entry.

This page is part of the Application experience guide. Read Application lifecycle and menu bar for app startup and routing, Recording overlays and modes for recording-state UI, and Settings and onboarding for the broader configuration flow.

Search scope

The search surface covers both durable user content and short configuration lists. Indexed content uses full-text ranking, while small lists use direct in-memory matching so all product areas appear in one result view.

Searchable content

The search service returns results in fixed groups. It keeps groups separate because scores from different content sets do not have a shared meaning.

GroupWhat it makes discoverableWhere selection leads
HistorySaved dictation output and its app contextThe selected history entry
TranscriptsSaved file-transcription resultsThe selected transcript detail
ChatsCommand-mode chat sessions, messages, and commandsThe selected chat
DictionaryCustom replacement entriesThe matching dictionary entry
PromptsDictation prompt profilesThe matching prompt editor
VocabularyUser vocabulary terms and aliasesThe matching vocabulary entry
PunctuationPunctuation rules and aliasesThe matching punctuation entry
SettingsAvailable settings and their search terms, including FluidMeet and meeting recording controlsThe matching settings control

References: Sources/…/AppSearchService.swift• L5-20 Sources/…/AppSearchService.swift• L115-135

The app sidebar changes from navigation sections to search results when the query has non-space text. The search field sends each change to the shared search service, which waits briefly for typing to settle and then updates the result groups.

The flow moves from a query to a grouped result and then to a product destination:

flowchart LR
    A[Sidebar query] --> B[Debounced search]
    B --> C[Indexed content and in-memory lists]
    C --> D[Grouped result rows]
    D --> E[History, transcript, or chat detail]
    D --> F[Dictionary, prompt, or settings editor]

The search field also supports keyboard focus and movement. Escape clears the query. Up and Down move through visible rows. Return opens the current row or the first row when no row is selected. A chosen result clears the query after navigation.

References: Sources/…/ContentView.swift• L1294-1354 Sources/…/ContentView.swift• L1394-1437 Sources/…/SettingsSearch.swift• L663-719 Sources/…/SettingsSearch.swift• L811-850

Result presentation

Results appear in the same order as their groups. Each group shows up to five rows at first. A “more” row expands that group without mixing it with other groups. A result row presents a short title and a query-focused snippet, and hover or keyboard selection keeps the row visible.

The result list shows “No results” when no group has a hit. It shows a retry action when search preparation fails. Changing the query clears old groups at once, so an earlier answer does not remain visible while a new search is in progress.

References: Sources/…/AppSearchResultsView.swift• L3-20 Sources/…/AppSearchResultsView.swift• L23-59 Sources/…/AppSearchResultsView.swift• L62-89 Sources/…/AppSearchService.swift• L65-113

Destination reveal

Selecting a result does more than change the main sidebar selection. History and transcript results set the selected record in their stores, while chat results switch the active chat. Dictionary and prompt results carry a reveal target into the destination screen so the matching editor opens. Settings results open the right section and mark the matching control for scroll and visual emphasis.

This shared target state lets search select content before the destination view is ready. The destination then scrolls to the selected history or transcript detail, or to the matching settings control.

References: Sources/…/ContentView.swift• L300-313 Sources/…/ContentView.swift• L1415-1437 Sources/…/TranscriptionHistoryView.swift• L32-46 Sources/…/TranscriptionHistoryView.swift• L209-221 Sources/…/MeetingTranscriptionView.swift• L108-116 Sources/…/SettingsSearchPresentation.swift• L25-62 Sources/…/SettingsSearchPresentation.swift• L97-150

Search matching

Indexed content is ranked by the text index. The service joins each hit back to the current store row before it builds a result, so a stale index id cannot open content that the store no longer has. Hits are ordered by search score, with newer content breaking ties.

The smaller lists use a simpler rule: every query word must occur in at least one searchable field. Matching ignores case and diacritics. Settings use a richer local score that favors exact titles, section names, prefixes, phrases, and close fuzzy matches. Common connecting words do not dominate a settings query. Settings that are not available under the current permissions or feature state are left out, such as controls that need accessibility access, saved audio, a bottom overlay, or private AI.

References: Sources/…/AppSearchService.swift• L137-167 Sources/…/AppSearchService.swift• L210-292 Sources/…/SettingsSearch.swift• L172-227 Sources/…/SettingsSearch.swift• L477-579

Snippet behavior

Snippets give each result enough surrounding text to explain the match without showing the full record. The service flattens line breaks, takes a bounded window around the earliest query-word match, adds ellipses when text is omitted, and marks matching words for emphasis.

The index returns ids and scores rather than match positions. Snippet creation therefore finds the words again. It matches without regard to case or diacritics, and prefix matching can emphasize forms such as “meetings” for “meeting.” A result can still display when no word can be marked.

References: Sources/…/AppSearchSnippet.swift• L3-11 Sources/…/AppSearchSnippet.swift• L13-53 Sources/…/AppSearchService.swift• L169-207

Search index

The search index is a derived local copy of three source stores: dictation history, file-transcription history, and chat history. Each content type has its own word-based namespace. The source stores remain authoritative, so the index can be rebuilt after a reset or missing data without losing user content.

The index supports typing search by treating the last query word as a prefix. It returns ranked ids and scores to the search service. Scores are used only inside one namespace, which is why the application presents groups instead of one global ranking.

References: Sources/…/SearchIndex.swift• L4-16 Sources/…/SearchIndex.swift• L35-41 Sources/…/SearchIndex.swift• L104-128 Sources/…/SearchIndexRecord.swift• L3-10

Persisted records

A SearchIndexRecord is the store-to-index contract. It gives the index a stable UUID, a revision, a source timestamp, and the text that should be searchable. The record contains only fields that help a person find and identify the content.

SourceSearchable record textChange signal
Dictation historyProcessed text, app name, and window titleA restore can raise the record revision
File transcriptsDisplay title, file name, and transcript textA rename or other text change raises the revision
Chat sessionsTitle, message content, and tool commandsThe saved search revision rises when the session changes

Archived chats and chats with malformed ids are not searchable. The index compares revisions before it writes. A newer record replaces old text under the same id. A missing source row is removed from the namespace. This keeps search results aligned with edits, deletes, history caps, archives, and restores.

References: Sources/…/SearchIndexRecord.swift• L12-39 Sources/…/SearchIndexRecord.swift• L41-97 Sources/…/SearchIndex.swift• L43-91

Index synchronization

The coordinator mirrors current snapshots from the three stores, but production starts this work lazily when search is requested. It waits for history to finish loading before it treats the first snapshot as complete. It then debounces store changes and reconciles each content type in order. A change report causes the visible search to refresh.

If a namespace is damaged or absent, the next reconcile fills it from the source store. Reconcile also removes rows no longer present in a source snapshot. If index maintenance fails, the source data remains intact and a later update can retry the derived work. Search preparation has a bounded wait and can report that the index is still getting ready.

References: Sources/…/SearchIndexCoordinator.swift• L4-11 Sources/…/SearchIndexCoordinator.swift• L25-67 Sources/…/SearchIndexCoordinator.swift• L97-138 Sources/…/SearchIndexCoordinator.swift• L214-257

Change checklist

When these files or sections are changed, remember to consider these:

  • When a searchable store changes its id, text, delete, cap, archive, or restore behavior, update its SearchIndexRecord and the matching coordinator snapshot together.
  • When a result target changes, update the sidebar routing and the destination reveal state as one contract.
  • When a settings target or availability rule changes, update the settings search entry, section mapping, and control reveal target together.
  • When a record revision rule changes, verify that an edit or restore replaces old indexed text instead of leaving stale terms searchable.
  • When a new indexed content type is added, give it a separate namespace and result group rather than comparing its score with another namespace.

Important failure modes

TriggerConsequenceGuard
A query changes while an index request is still runningAn older answer could replace the newer query's resultsThe service cancels the pending task and index request, then rejects cancelled answers
History publishes an empty snapshot before its load completesA valid index could be cleared at startupHistory uses a loaded snapshot publisher and waits for complete history during search preparation
Search preparation exceeds its time limitThe result view shows no answer even though source data still existsThe coordinator reports a bounded preparation error and the view offers Retry
A source row is deleted, archived, or evicted but the index is not reconciledSearch can return a row that the destination store cannot openReconcile deletes ids missing from the current source snapshot, and chat results filter unavailable sessions
Restored text keeps an equal or lower revisionOld text remains searchable under the restored idRestore raises the record revision when it replaces indexed text
A chat has a non-UUID idThe index hit cannot map back to a chat targetChat record creation returns no record and the row is not indexed
A settings result points to an unavailable controlSearch can open the wrong or unusable settings pathAvailability filters permission- and state-dependent targets before presentation

Key files

FileWhy to read it
Sources/…/ContentView.swiftConnects the app sidebar search field to result presentation and destination routing.
Sources/…/AppSearchResultsView.swiftShows grouped rows, expansion, loading and error states, empty state, hover selection, and keyboard-visible rows.
Sources/…/AppSearchService.swiftDefines the search groups, query flow, ranking, in-memory matching, and result targets.
Sources/…/AppSearchSnippet.swiftDefines the short result excerpt and query emphasis behavior.
Sources/…/SearchIndex.swiftDefines the derived full-text index and reconcile/query contract.
Sources/…/SearchIndexRecord.swiftDefines the searchable fields and revisions for history, transcripts, and chats.
Sources/…/SearchIndexCoordinator.swiftKeeps the derived index aligned with source-store snapshots and prepares it before search.
Sources/…/SettingsSearch.swiftDefines settings search terms, feature-based availability, local ranking, and the sidebar keyboard search field.
Sources/…/SettingsSearchPresentation.swiftReveals and marks the settings control selected from application search.
Tests/…/SearchIndexTests.swiftShows the contracts for reconcile, revision changes, startup safety, and recovery.
Tests/…/AppSearchServiceTests.swiftShows the contracts for ranking, stale-query handling, snippets, and in-memory matching.