Desktop: local markSessionCompleted leaves transcription_sessions in a partially-open state
Summary
The local desktop transcription database can keep a successfully finalized session in a partially-open state.
User-visible behavior
A desktop conversation can fully succeed on the backend, but the local transcription_sessions row still ends up looking like:
status = completedconversationStatus = in_progress
So the session is completed in the cloud but still looks partially active in local state.
Why this is distinct
This is not the same problem as cloud-side discarded conversations or stale backend conversation IDs.
The conversation can succeed normally on the backend and still leave a locally inconsistent row behind.
Evidence
markSessionCompleted only updates a subset of completion fields:
desktop/Desktop/Sources/Rewind/Core/TranscriptionStorage.swift:101-118
It currently updates:
status = .completedbackendIdbackendSynced = trueupdatedAt
It does not update related lifecycle fields such as:
conversationStatusfinishedAt- other final-state fields needed to keep local state aligned with backend state
A recent successful desktop session reproduced exactly this shape: backend finalized normally, while the local row still remained completed | in_progress.
Most likely root cause
The local completion path closes only part of the session lifecycle and leaves other lifecycle fields untouched.
Expected behavior
When a desktop session finalizes successfully, the local row should also be fully closed and should no longer look like an active conversation.
Proposed direction
- update
markSessionCompletedto set the local lifecycle fields required to fully close the session - ensure local completion writes
conversationStatus/finishedAt/ final-state fields consistently with backend completion - optionally let server-sync backfill any missing final-state fields instead of preserving a partially-open local row indefinitely
Confirmed on v0.11.360 (macOS).
Checked the local SQLite DB directly—sessions that complete recording show status=completed, backendSynced=1, and retryCount=0, but conversationStatus permanently stuck at in_progress. No error logged, no retry triggered. The session looks healthy from the app's perspective but never surfaces in the Conversations tab.
The fix in TranscriptionStorage.swift looks straightforward — markSessionCompleted just needs to also set conversationStatus = .completed.