Skip to content

feat(windows): mobile-parity slice — server-side conversation search, custom vocabulary, transcript segment editing (#3159) - #13702

Open
apoorvdarshan wants to merge 15 commits into
BasedHardware:mainfrom
apoorvdarshan:cursor/desktop-parity-search-vocab-segment-edit-8fff
Open

apoorvdarshan wants to merge 15 commits into
BasedHardware:mainfrom
apoorvdarshan:cursor/desktop-parity-search-vocab-segment-edit-8fff

Conversation

@apoorvdarshan

@apoorvdarshan apoorvdarshan commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

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 789de5136cd124991e9956f9ff72891b3ad4416d with a regular merge. The segment-edit mutation retains main's run_transactional boundary, revision updates, and summary-reference invalidation. Pinned main retired TRANSCRIPT_CHUNK_INDEXING_ENABLED on 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:

  • Canonical Python 3.11.15 / matching 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.
  • Node 22.19.0, pnpm 10 lockfile dependencies: npm test -- --maxWorkers=2 on seven focused search, vocabulary, and segment-edit files — 62 passed.
  • npm run typecheck — node and web both passed.
  • The retired-flag contract, normal shared preflight, and bounded pre-push gates passed for bc9467d352; canonical backend type checking reported zero errors (warnings remain). Pushed to the existing branch without force.
  • Focused ESLint on all authored TypeScript files passed; its one Prettier warning in the changelog import was corrected.
  • Headless Chrome rendered the production VocabularyEditor with 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.

Vocabulary after add/dedupe/remove

Vocabulary at narrow viewport

apoorvdarshan and others added 5 commits September 8, 2026 22:29
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]>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 16 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@Git-on-my-level

Copy link
Copy Markdown
Member

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 (lib/conversations/search.ts, pages/Conversations.tsx)

  • The request contract matches the backend exactly: POST /v1/conversations/search with {query, page: 1, per_page: 50, include_discarded: false} and start_date/end_date serialized as ISO strings for fromisoformat. Locked hits filtered, rows sorted newest-first, malformed bodies tolerated.
  • composeSearchRows bypassing the text predicate on remote hits is the right call — re-applying matchesQuery would silently drop exactly the spoken-word hits the server search exists to find. Local rows still matched client-side, cloud twins deduped.
  • Nice touches: the query+date+nonce request key so a slow response for an older query can never publish stale results, and the getCacheUid() guard so hits can't leak across an account switch. Reworking delete/merge/undo to track inList/inSearch provenance (instead of assuming rows only live in the list) is correct for deep hits from months back.
  • Two minor notes, both consistent with Mac behavior so not blockers: (1) one page of 50 hits with no pagination — a very prolific account can have older matches that never surface; (2) after a merge completes in the background, an active search's hits stay a snapshot until the query re-runs.

Custom vocabulary (lib/transcriptionVocabulary.ts, VocabularyEditor.tsx, TranscriptionTab.tsx)

  • The premise for un-blocking this (the old tab comment called it "a dead control until that lands") holds: the backend listen bootstrap reads the account vocabulary and forwards it as keyterms, and ptt/userVocabulary.ts feeds push-to-talk — both already on main, so this only adds the missing UI.
  • Client-side refusal at the backend's vocabulary[:100] cap is strictly better than the backend's silent truncation, and the case-insensitive dedupe / comma-split / per-term clip rules match Mac. Whole-list PATCH with optimistic save, revert + toast on rejection, PTT cache refreshed only after a successful save — all pinned by tests.

Segment text editing (mutations.ts, transcript.ts, TranscriptDrawer.tsx, ConversationDetail.tsx)

  • SEGMENT_TEXT_MAX_CHARS = 10_000 and the {segment_id, text} body match UpdateSegmentTextRequest (text 1–10000 chars). Addressing segments by id rather than index, and hiding the affordance entirely on segments without a backend id (same no-fabricated-ids rule as speaker naming), are both correct.
  • The optimistic apply + revert-on-failure with a friendly toast, Save gating on empty/unchanged, Cmd/Ctrl+Enter, and the keyboard-reachable hover pencil are all solid. Test coverage pins the PATCH body, the revert path, and the id-gating on legacy segments.

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 need human response.

@Git-on-my-level Git-on-my-level added positive-signal Automation verified a genuine fix/quality contribution needs-maintainer-review Needs a human maintainer to sign off before merge windows Windows desktop work labels Sep 13, 2026
- 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]>
@Git-on-my-level

Copy link
Copy Markdown
Member

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:

  • lib/conversations/search.ts — the request-keyed state and the account-switch guard (getCacheUid comparison before publishing hits) are right, and exempting remote hits from matchesQuery in composeSearchRows is the crucial correct call: re-applying the text predicate would silently drop spoken-word hits whose title/preview lack the term. One deliberate deviation from Mac worth a product call: when total_pages > 1 you fan out pages 2..N in parallel (up to SEARCH_MAX_PAGES = 20), where the Mac reference fetches only page 1 of 50 — bounded and deduped, just louder than the reference client. Fine by me; flagging for parity intent.
  • pages/Conversations.tsx — the dual-store bookkeeping (patchRow/removeEverywhere/restoreEverywhere with inList/inSearch snapshots) is careful and the tests pin it; undo restoring a row only where it came from is exactly right. Nit: the two adjacent comments above searchActivation say the same thing twice — drop one.
  • lib/conversations/transcript.ts + mutations.ts + TranscriptDrawer.tsx — id-gated edit affordance (canEditSegmentText requires a non-empty backend id) mirrors the speaker-naming rule; addressing segments by id rather than index so a concurrent reprocess can't misplace the edit is the correct design.
  • pages/ConversationDetail.tsx — optimistic swap with revert guarded by s.text === text (avoids clobbering a newer edit) is a nice touch; the comment noting search can lag until the backend reindexes chunks is honest and matches the shared mobile behavior.
  • components/settings/controls/VocabularyEditor.tsx + lib/transcriptionVocabulary.ts — nonce-keyed load, optimistic whole-list save with revert, upfront 100-term refusal (matching the server's vocabulary[:100] slice), and refreshUserVocabulary({force:true}) after save all check out; test coverage incl. the cap UI, rejection revert, and retry path is thorough.
  • lib/ptt/userVocabulary.ts — the force option correctly invalidates an in-flight same-account fetch via generation++ and the new test pins that the stale response can't win.
  • whatsNew.ts + changelog fragment + TranscriptionTab.tsx — wiring and copy are accurate to the shipped behavior (the old "deliberately NOT built" note correctly removed now that the backend consumes the vocabulary).

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 need human response.

@aryanorastar

Copy link
Copy Markdown
Collaborator

Keeping this open on 7b8460eb3c9f.

MERGEABLE Windows CI green but 19-file +1661 mobile-parity slice not shrink-only.

I am not approving or merging this SHA.

@aryanorastar

Copy link
Copy Markdown
Collaborator

Keeping this open. Not approving 7b8460eb3c9f. those renderer files are the PR’s own additions; MERGEABLE/BLOCKED, CI SUCCESS. Desktop non-BLE. Do not approve this sha.

— 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.
@Git-on-my-level

Copy link
Copy Markdown
Member

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):

  • POST /v1/conversations/search parses start_date/end_date via datetime.fromisoformat and is rate-limited (conversations:search) — buildSearchRequest serializing dates as ISO strings matches.
  • The "custom vocabulary is no longer a dead control" claim is true: listen_session_bootstrap.py really forwards the account vocabulary downstream, and ptt/userVocabulary.ts consumes it for PTT.
  • _sync_conversation_search_index follows the same pattern as the existing call sites in database/conversations.py.
  • The prune prefix {uid}-{conversation_id}-c in upsert_transcript_chunk_vectors(replace=True) matches the existing vector id format exactly, so pruning cannot leak across conversations.

Highlights:

  • lib/conversations/search.ts — the predicate split is the crux of this feature and it's right: remote hits bypass matchesQuery (so spoken-word hits aren't silently dropped) while folder/starred/type/date refinements stay client-side over the returned rows. The account-switch guard via getCacheUid() and the request-key state model in Conversations.tsx (nonce + activation counters) correctly prevent a slow response for an older query from being mistaken for the current answer.
  • Conversations.tsx — delete/merge/undo tracking rows in both the list and the active search-hit stores (inList/inSearch) is the subtle part of composing hits with the list, and it's handled precisely.
  • transcript_chunks.py — refresh_transcript_chunks_after_edit re-reads the committed transcript rather than trusting the client payload, respects TRANSCRIPT_CHUNK_INDEXING_ENABLED and deleted/locked state, retracts stale vectors when indexing is disabled, and contains provider failures after the authoritative write so a Pinecone outage can't roll back a landed edit. Good failure discipline.
  • vector_db.py — embed-upsert-then-prune ordering keeps searchable data intact if the provider fails mid-replacement.
  • VocabularyEditor.tsx / transcriptionVocabulary.ts — clean optimistic save with revert, and enforcing the 100-term cap client-side to surface what vocabulary[:100] would otherwise silently drop is the right call.
  • ConversationDetail.tsx — edit gated on a real backend segment id (never fabricated, never index-addressed) with optimistic apply and revert; matches the mobile contract.
  • userVocabulary.ts — the force: true generation bump correctly invalidates an in-flight same-account fetch so a save's refresh can't be shadowed by a stale sign-in fetch.
  • The ARCHITECTURE.md addition and the changelog fragment are accurate against the code.

Two design questions for a maintainer (tradeoffs, not defects):

  1. routers/conversations.py → refresh_transcript_chunks_after_edit runs synchronously in the PATCH request path and re-embeds the entire conversation's chunk windows on every single-segment edit. A one-word fix on a long conversation means hundreds of embeddings inside the request. Correctness and failure handling are fine — the question is tail latency and embedding cost per edit, and whether this belongs in a background job.
  2. search.ts fans out up to SEARCH_MAX_PAGES = 20 parallel pages (1,000 hits) per debounced query against a rate-limited endpoint, where Mac fetches only page 1. The cap makes it safe, but it's worth a deliberate product call on whether the desktop should fan out at all.

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 need human response.

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
@apoorvdarshan apoorvdarshan added the ci:full Maintainer-granted: run full CI on this fork PR label Oct 13, 2026
apoorvdarshan and others added 2 commits October 13, 2026 23:22
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@undivisible

Copy link
Copy Markdown
Collaborator

@apoorvdarshan this conflicts with main now. Please rebase and push; it still looks valid.

apoorvdarshan and others added 2 commits October 17, 2026 00:12
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

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature (Windows mobile-parity slice: search, vocabulary, segment editing), not a bug fix — approve only per area rule. No merged sibling found for #3159 (issue still open, only this PR references it).

@Git-on-my-level

Copy link
Copy Markdown
Member

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:

  • lib/conversations/search.ts — one debounced request per key change (250ms, page 1 of 50, include_discarded: false, matching the Mac reference client); hits are deduped and locked conversations dropped; composeSearchRows deliberately does NOT re-apply the text predicate to remote hits, so spoken-word matches aren't silently filtered away, while local-only rows still match client-side.
  • pages/Conversations.tsx — search state is keyed by query + date window + retry/activation nonces, so a slow response for an older query can never be mistaken for the current answer; the effect guards account switches (getCacheUid) and tears down the debounce timer; clearing the field tears the search down synchronously. Optimistic star/rename/delete patch both the list and any active search hits, and undo restores each row only where it came from.
  • pages/ConversationDetail.tsx — segment edits are addressed by backend segment id (never index), applied optimistically, and reverted only if the text is still the attempted value (a newer edit can't be clobbered by a stale revert); the modal mirrors mobile's save gating with the 10,000-char cap and Cmd/Ctrl+Enter.
  • lib/conversations/transcript.ts — canEditSegmentText hides the pencil on legacy segments with no backend id rather than fabricating one (same rule as speaker naming); the drawer's button stays keyboard-reachable.
  • lib/transcriptionVocabulary.ts + components/settings/controls/VocabularyEditor.tsx — the backend's 100-term cap is enforced client-side (matching the server's silent [:100] slice) plus a 60-char per-term bound; every edit writes the whole list with optimistic revert, and a save force-refreshes the push-to-talk vocabulary cache (userVocabulary.ts's new force option correctly invalidates a superseded in-flight fetch via the generation guard).
  • Backend changes are tests + docs only: the new case in test_conversation_segment_text_access_guard.py pins that a stale TRANSCRIPT_CHUNK_INDEXING_ENABLED value cannot revive the retired vector writer, and the ARCHITECTURE.md additions match backend/utils/review_projection.py.

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 need human response.

@Git-on-my-level

Copy link
Copy Markdown
Member

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:

  • lib/conversations/search.ts: request/response mapping matches the backend contract (POST /v1/conversations/search; dates ISO-serialized for the backend's fromisoformat parse). Stale-response discipline is key-addressed (query + date window + retry/activation nonces) with an account-switch guard, so a slow response for an old query can never publish. Local-only rows stay client-matched and de-dupe against their cloud twins.
  • Conversations.tsx: delete/merge undo now restores rows only where they came from (inList/inSearch), and star/rename patch both the list and active search hits — deep hits from months back are not lost on mutation. Folder/type refinements are client-side over the returned hits, so refining never fires a second request.
  • lib/transcriptionVocabulary.ts + VocabularyEditor.tsx: the client-side 100-term cap matches the server's silent vocabulary[:100] slice (backend/database/users.py:2335) — the client refuses up front what the server would silently drop. Optimistic saves revert on rejection; loads are nonce-keyed so a stale retry can't paint.
  • ConversationDetail.tsx (EditSegmentModal) + lib/conversations/mutations.ts: PATCH /v1/conversations/{id}/segments/text body {segment_id, text} matches UpdateSegmentTextRequest (1–10000 chars; client limit aligned). Edits address segments by id, never index, and the revert is guarded so it won't clobber a concurrent change to the same segment.
  • Backend deltas are test/doc only: the new guard test pins that a stale TRANSCRIPT_CHUNK_INDEXING_ENABLED deployment value cannot revive the writer main retired on Oct 8 (the flag appears nowhere else in backend/), and the ARCHITECTURE.md additions accurately describe utils/review_projection.py's fail-open post-commit sync.

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):

  • Search completeness: page-1-only (50 hits) matches the Mac reference client, but deeper matches staying unseen is a product call worth explicit sign-off.
  • Making edited words fresh semantic candidates would mean reintroducing transcript-chunk indexing — a maintainer-owned freshness/cost decision, correctly not attempted here.

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 need human response.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Maintainer-granted: run full CI on this fork PR needs-maintainer-review Needs a human maintainer to sign off before merge positive-signal Automation verified a genuine fix/quality contribution windows Windows desktop work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants