Repository navigation
feat(windows): mobile-parity slice — server-side conversation search, custom vocabulary, transcript segment editing (#3159) - #13702
Conversation
chore: sync fork main from BasedHardware/omi
The Conversations search field only filtered the already-loaded page by title/overview text on the client, so anything said in an older conversation — or anywhere outside a title — was unfindable. Mobile and macOS both run a debounced backend search (POST /v1/conversations/search, Typesense over every conversation plus spoken-word transcript chunks). - lib/conversations/search.ts: request builder mirroring Mac (250ms debounce, page 1 of 50, discarded excluded, date window on the wire), hit → row mapping that lifts the backend's match_snippets as the preview, and composeSearchRows() which applies folder/starred/type/date refinements to hits client-side (never the text predicate — a hit may match on spoken words absent from title/preview) and appends client-matched local-only rows. - pages/Conversations.tsx: response stored with the key of the request it answered so a slow older response can't be mistaken for the current query and clearing needs no reset; skeleton until the first hits land, "Couldn't search" state with Try again, "N results" header, spinner in the field. Row mutations (star/rename/move/delete/merge + undo) act on both the list and the hits. Verification (Linux, Node 22.19, pnpm 10): `pnpm typecheck`, `pnpm lint` (0 errors), `pnpm test` 566 files / 5583 tests green including the new search.test.ts (14) and Conversations.search.test.tsx (6: debounce coalescing, request body, deep hit shown with snippet, teardown on clear, error → retry, starred refinement without a second request). References BasedHardware#3159 Co-authored-by: Apoorv Darshan <[email protected]>
Mobile (custom_vocabulary_page) and macOS ("Custom Vocabulary" card) let
the user maintain names/brands/jargon for the recognizer; the Windows tab
noted the control as deliberately unbuilt because nothing consumed the
list. That is no longer true: the backend's listen bootstrap forwards the
account's vocabulary to Deepgram as keyterms for the ambient socket, and
ptt/userVocabulary.ts already feeds it into push-to-talk keyword boosting.
- lib/transcriptionVocabulary.ts: GET/PATCH /v1/users/transcription-preferences,
pure add/remove rules (trim, comma-split like Mac, case-insensitive
dedupe keeping the user's casing, refuse past the backend's hard cap of
100 rather than letting vocabulary[:100] silently drop terms), and a PTT
cache refresh after a successful save.
- VocabularyEditor: removable chips, Enter/+ to add, N/100 counter,
optimistic edits reverted with a toast on rejection, load-error retry.
Fetch result is keyed to the reload nonce so the effect only starts the
request (no setState-in-effect).
- TranscriptionTab: new "Custom vocabulary" SettingRow between Language
mode and Local VAD gate (Mac order); stale header comment updated.
Existing tab test stubs the new module to stay hermetic.
Verification: `pnpm typecheck`, `pnpm lint` (0 errors), `pnpm test`
green; transcriptionVocabulary.test.ts (11) and VocabularyEditor.test.tsx
(5) cover parse/dedupe/cap, the PATCH body, cache refresh only on success,
add/remove flows, revert-on-failure, and load retry.
References BasedHardware#3159
Co-authored-by: Apoorv Darshan <[email protected]>
Mobile's conversation detail lets the user correct a mis-transcribed line
(edit_segment_sheet → PATCH /v1/conversations/{id}/segments/text). Neither
desktop app offered it; the transcript drawer was read-only.
- mutations.setConversationSegmentText: body {segment_id, text}, text
bounded by the backend's 1–10000 chars.
- transcript.canEditSegmentText: only segments carrying a backend id are
editable — never fabricate one (same rule as speaker naming).
- TranscriptDrawer: hover-revealed pencil next to the timestamp (kept in
the tab order); optional onEditText prop so a live/pending transcript
can stay read-only.
- ConversationDetail: EditSegmentModal (speaker label, textarea, Save
disabled while empty/unchanged, Ctrl/Cmd+Enter), optimistic in-place
swap addressed by segment id with revert + toast on rejection.
Verification: `pnpm typecheck`, `pnpm lint` (0 errors), `pnpm test`
green; ConversationDetail.test.tsx gains 4 tests (edit affordance only on
id-bearing segments, PATCH body, disabled Save rules, revert on failure).
References BasedHardware#3159
Co-authored-by: Apoorv Darshan <[email protected]>
…ttings work References BasedHardware#3159 Co-authored-by: Apoorv Darshan <[email protected]>
There was a problem hiding this comment.
All reported issues were addressed across 16 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Thanks @apoorvdarshan — this is a really well-built parity slice. I went through all three features against the mobile/macOS references and the backend contracts, and everything checks out. Details below, plus two minor parity-scoped notes. Server-side conversation search (
Custom vocabulary (
Segment text editing (
The changelog entries are accurate to the implementation, and the ~460 lines of tests are behavioral (request bodies, debounce coalescing, teardown on clear, retry paths) rather than snapshot noise. The diff is large but cohesive around one product outcome — no split needed. Leaving for human maintainer review: this is a product/scope decision on the #3159 desktop-parity checklist (which items land in this slice and their sequencing), not a technical objection — everything I could verify against the backend contracts and the Mac/mobile references checked out. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
- Block vocabulary add/remove while save is in flight; reject >60 char terms with toast - Force-refresh PTT vocabulary cache after PATCH (no dedupe over stale sign-in fetch) - Search: UID guard on error, activation generation on re-enter, keep prior hits while refining, restoreEverywhere key guard, paginate through total_pages (cap 20) - Invalidate conversations cache after segment edit; guarded optimistic rollback - Import mobile-parity changelog fragment in whatsNew; shorten toast line Verification: pnpm typecheck; vitest on Conversations.search, search, vocabulary, VocabularyEditor, ConversationDetail, userVocabulary, whatsNew (65 tests). Co-authored-by: Apoorv Darshan <[email protected]>
|
Thanks @apoorvdarshan — this is a well-built parity slice. I reviewed all 17 files statically and verified every backend contract the code relies on against current main; all four match (search endpoint incl. match_snippets/is_locked/fromisoformat dates; segments/text UpdateSegmentTextRequest bounds; transcription-preferences vocabulary[:100] cap; listen-session bootstrap forwarding the vocabulary). The earlier review's three findings are addressed on this head. File-by-file notes:
Only substantive product question for a maintainer: whether the Windows client should adopt the multi-page fan-out or stay at Mac's single page of 50 for now. Leaving for human maintainer review on that point; nothing blocking found. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Keeping this open on MERGEABLE Windows CI green but 19-file +1661 mobile-parity slice not shrink-only. I am not approving or merging this SHA. |
|
Keeping this open. Not approving — Astar, on behalf of @aryanorastar |
Conflict-free integration preserves upstream files byte-for-byte and the existing Windows parity slice. No autoformatting of inherited upstream sources. Feature repairs are kept for the following normally hooked commit; complete PR preflight follows.
Refresh transcript vectors from committed segment text, prune obsolete windows, and run the existing Typesense projection hook. Index outages preserve the saved edit response and emit degraded fallback telemetry per FC-post-commit-index-maintenance-terminal. Failure-Class: none Verification: backend/test.sh passed 94 tests across shared PATCH refresh, transcript indexing, transactional revisions, summary invalidation and client-processing suites. git diff --check passed. Live provider indexing remains unverified without service credentials.
|
Thanks @apoorvdarshan — this is a genuinely well-executed parity slice. I went through the full diff and verified the backend contract claims against the repo source rather than taking the description's word for it. Everything checks out, and the test coverage is unusually thorough. Detailed notes below, plus two design questions for a maintainer. Verified contracts (all real at this head):
Highlights:
Two design questions for a maintainer (tradeoffs, not defects):
No security, auth, workflow, or dependency changes; no agent-guidance docs touched. Leaving for human maintainer review on the two design points above and the overall product direction before merge. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Retain run_transactional for committed segment edits and refresh search only on success. Match macOS single-page search; document synchronous full-conversation reembedding cost and outstanding maintainer decision. Verified 94 backend tests, 62 focused Windows tests, and node/web typechecks. Failure-Class: none
Capture the production VocabularyEditor in a local browser fixture with mocked API and PTT refresh. Verify add, case-insensitive dedupe, remove, request payloads, and 1100px/640px layouts. No Electron launch or Windows native sign-off. Also correct one authored changelog import formatting warning. Failure-Class: none
Pinned main retired TRANSCRIPT_CHUNK_INDEXING_ENABLED as never-run code. Remove the old branch reembedding and extra Typesense round trip instead of reviving that path. Preserve transactional edits and upstream projection invalidation. Guard successful edits against vector calls even with a stale enabled flag and against extra Typesense sync. Existing search freshness limitations remain documented. Failure-Class: none
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@apoorvdarshan this conflicts with |
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01L6nc4Dq4LXiSGCnJBvD7ix
main routes update_conversation_segment_text through review_transcript_changes.edit_user_segment, whose record_change tail refreshes the conversation's Typesense document and rebuilds its transcript-chunk vectors via utils/review_projection.py. The _sync_conversation_search_index guard re-added during the merge could never fire on that path, and the ARCHITECTURE.md paragraph described the pre-merge implementation. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01L6nc4Dq4LXiSGCnJBvD7ix
|
Verdict: the production code here is correct, carefully guarded, and cleanly scoped — nothing blocking from automated review. A human maintainer has already approved this head; what remains open are the two product decisions the description itself flags (noted at the end). What I verified on this head:
Performance: one POST per debounced query change, no request fan-out; refinements are client-side. Cost: no new external API/LLM spend. Security: no new surfaces — vocabulary and edits ride existing authenticated endpoints. Blast radius: Windows renderer Conversations/Transcription surfaces only. CI on this exact head: Desktop Windows CI (typecheck, lint, full test suite, Windows build smoke) and the backend suites are green. USER IMPACT: Windows users can now search spoken words across their full history (with match snippets in the list), add a custom transcription vocabulary that boosts both recordings and push-to-talk, and fix transcript lines inline — like the phone app. Still wanted before merge (product calls, not code fixes): confirmation that page-1-only search (deeper matches stay unseen under folder/type refinements) is acceptable Windows parity, and a maintainer decision on edited-word freshness in semantic search — this PR correctly preserves main's retired transcript-chunk indexing rather than reviving it, and reintroduction is a deliberate freshness/cost decision. Both stay with the human maintainers already engaged here. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Verified on the current head — the production change is correct and well-tested; what remains is product sign-off, not code work. What I checked:
Testing: this repo has no Windows CI job, so I ran the renderer suites on this head myself — all 7 new/modified vitest files pass (62 tests across search, Conversations.search, VocabularyEditor, TranscriptionTab, ConversationDetail, transcriptionVocabulary, userVocabulary). The backend edits are covered by the green Backend unit suite. Performance: one debounced (250 ms) POST per settled query; no request fan-out on refinement. Cost: server-side Typesense only, no new LLM spend. Blast radius: Windows desktop only; no backend production code changed. USER IMPACT: Windows users get three mobile-parity features — conversation search that reaches the full history with spoken-word snippet previews, a custom transcription vocabulary that boosts both recordings and push-to-talk, and transcript line correction from the conversation drawer. Still open for a maintainer (the PR body flags these too):
Leaving those two direction decisions for human maintainer review; no code changes requested. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
What changed and why
References #3159 (partial; issue remains open). Windows/Linux gains debounced server-side conversation search with spoken-word snippets, a custom transcription vocabulary editor with the server's 100-term cap, and optimistic transcript segment editing using real backend segment IDs.
Integrated pinned main
789de5136cd124991e9956f9ff72891b3ad4416dwith a regular merge. The segment-edit mutation retains main'srun_transactionalboundary, revision updates, and summary-reference invalidation. Pinned main retiredTRANSCRIPT_CHUNK_INDEXING_ENABLEDon October 8 as never-run code. The old branch's per-edit vector replacement and extra Typesense sync have been removed to preserve that upstream decision. Segment edits add no embedding-provider or vector-pruning work; stale deployment values cannot revive the retired writer.Search now requests only page 1 (50 hits), matching
desktop/macos/Desktop/Sources/MainWindow/Conversations/ConversationRepository.swift:search. It no longer fans out 20 requests. Folder/starred/type refinements apply to those returned hits, so matches beyond the first page can remain unseen. The pagination regression expectation changed to this existing reference-client contract, not to an invented completeness promise.Maintainer decision still required
The per-edit synchronous reembedding concern is resolved by retaining main's retired indexing path, not by introducing an untracked background task or reviving a retired flag. Typesense does not index transcript segments. Search retains the existing server's optional historical chunk hits and current-text snippets, but newly edited words are not guaranteed to become fresh semantic candidates. Reintroducing a transcript index needs a maintainer-owned freshness/cost decision and durable revision fencing/coalescing. Overall search completeness and parity remain human decisions.
The September 24 hold and overall parity direction remain for human maintainer review. No hardware approval claimed. Device connectivity, audio playback, calendar extraction, and other #3159 gaps are outside this slice.
Verification
October 11 on macOS, all heavy work serialized with max two workers:
pylock.toml:BACKEND_PYTEST_WORKERS=2 BACKEND_UNIT_TEST_FILE_LIST=... bash backend/test.sh— 91 passed across five files on the final implementation (earlier implementation: 94 passed before removing the three obsolete vector-replacement cases). Coverage now guards endpoint access, absence of vector-provider work even with a stale enabled flag, absence of extra Typesense sync, transaction revisions, projection invalidation, and summaries. Obsolete vector-replacement cases were removed with the retired path.npm test -- --maxWorkers=2on seven focused search, vocabulary, and segment-edit files — 62 passed.npm run typecheck— node and web both passed.bc9467d352; canonical backend type checking reported zero errors (warnings remain). Pushed to the existing branch without force.VocabularyEditorwith production vocabulary logic and mocked API/PTT boundaries. Add, case-insensitive deduplication, remove, and both PATCH payloads passed at 1100×700 and 640×520. No page errors, framework overlay, or horizontal overflow were observed. This is component evidence on macOS, not native Windows acceptance.Historical full-suite/E2E evidence is not claimed for this merged head. No desktop application started and no production Typesense/Deepgram/Pinecone calls made. Electron runtime download was stopped after stalling; focused tests use the repository's Electron stub, and native packaging is unverified.
Product invariants affected
none
Failure-Class: none
UI evidence
The surrounding frame is a labeled test fixture; the editor itself is imported from this branch. Browser plugin was unavailable; the repository's Playwright drove installed headless Chrome under the shared resource lock.