fix desktop speaker selection dialog and transcript name persistence#6357
Conversation
…istence Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR fixes two bugs in the macOS desktop app's transcript speaker-naming workflow: (1) the speaker-selection dialog not showing on the first tap of a label, and (2) speaker name assignments reverting to generic labels on the next navigation. The changes span four files:
Three concerns are flagged below: an empty-sheet scenario when Confidence Score: 3/5Merge with caution — the core dialog and persistence fixes are sound, but a data-loss race and a potential empty-overlay regression need addressing. The in-memory update path in ConversationDetailView and the item-based sheet presentation are well-implemented and directly address both bugs. However, the full segment delete+reinsert in upsertSegmentsFromServerConversation can silently wipe locally-saved personId values if a background sync fires during the API round-trip; the appState nil guard in RewindPage leaves the overlay triggerable with no content (reproducing Bug 1 in an edge path); and the animation Bool value in DismissableSheetItemModifier produces broken transitions on rapid taps. TranscriptionStorage.swift (upsertSegmentsFromServerConversation race condition), RewindPage.swift (nil appState guard missing at tap site) Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant RV as RewindPage / ConvDetailView
participant DM as DismissableSheetItemModifier
participant AS as AppState
participant TS as TranscriptionStorage
participant API as Backend API
U->>RV: Tap speaker label
RV->>RV: selectedSegment = segment
RV->>DM: item binding set (non-nil)
DM->>DM: Show overlay + sheet content
U->>DM: Enter name, press Save
alt Live transcript
DM->>AS: liveSpeakerPersonMap[speaker] = personId
else History conversation
DM->>API: onAssignSpeaker(convId, segIds, personId)
API-->>RV: success = true
RV->>RV: loadedConversation updated in-memory
RV->>TS: updateSegmentSpeakerAssignment persists to SQLite
end
DM->>DM: selectedSegment = nil, overlay dismissed
Note over TS,API: Race risk: background upsertSegmentsFromServerConversation
Note over TS,API: can delete local personId before server confirms
|
…d-transcript Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…asedHardware#6357) ## Bugs Fixed **Bug 1 — Speaker selection dialog doesn't open on first click** Clicking a speaker label in the transcript darkens the window but the dialog doesn't appear. Repeated clicks on the same segment repeat the problem. Clicking a different segment's label opens it correctly, after which the original segment works too. Demo: https://github.com/user-attachments/assets/2085e9ed-a334-454d-8202-8b07b54b5922 **Bug 2 — Speaker name changes not saved** After assigning names to unrecognized speakers, the changes are lost on next open and revert to generic labels (e.g. "Speaker 1"). Demo: https://github.com/user-attachments/assets/c926b876-f705-4df3-9c05-476757881e76 ## After Fix https://github.com/user-attachments/assets/65b266a3-3012-4e0e-b192-feaacfe3b30d 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Bugs Fixed
Bug 1 — Speaker selection dialog doesn't open on first click
Clicking a speaker label in the transcript darkens the window but the dialog doesn't appear. Repeated clicks on the same segment repeat the problem. Clicking a different segment's label opens it correctly, after which the original segment works too.
Demo:
CleanShot.2026-04-04.at.21.06.23.mp4
Bug 2 — Speaker name changes not saved
After assigning names to unrecognized speakers, the changes are lost on next open and revert to generic labels (e.g. "Speaker 1").
Demo:
CleanShot.2026-04-04.at.21.07.37.mp4
After Fix
Screen.Recording.2026-04-06.at.3.53.03.PM.mov
🤖 Generated with Claude Code