Skip to content

Fix transcript history session linkage - #79

Merged
pranc1ngpegasus merged 1 commit into
mainfrom
agent/fix-session-transcript-linkage
Jul 15, 2026
Merged

Fix transcript history session linkage#79
pranc1ngpegasus merged 1 commit into
mainfrom
agent/fix-session-transcript-linkage

Conversation

@pranc1ngpegasus

Copy link
Copy Markdown
Member

Summary

  • Allocate the database session before audio starts and attach its session ID to every runner update.
  • Ignore stale lifecycle/transcription updates and prevent history navigation from replacing an active or not-yet-persisted transcript.
  • Persist the final transcript atomically and idempotently, with session-ID validation and retryable failure handling.
  • Keep recorded WAV paths aligned with stored paths and reserve recording directories exclusively.
  • Distinguish unstarted failures from partial recordings so empty failed sessions are deleted while recoverable output is preserved.

Root cause

The live recording and history views shared the same in-memory segment buffer. Navigating to an older history item while recording or stopping could replace that buffer; the eventual stop handler then persisted the visible historical segments under the active session ID. Lifecycle updates also lacked a stable session identity, so delayed updates could mutate a newer session.

Impact

Transcripts now remain bound to the session that produced them across navigation, delayed worker events, start/stop failures, persistence retries, and application shutdown. Existing already-corrupted rows are not rewritten because their intended association cannot be inferred safely.

Integration

Rebased onto the latest origin/main (fae9982), retaining the input-device-change handling from #77 and incorporating the recording-path linkage intent from #78 into the preallocated-session flow.

Validation

  • cargo test -p wisp-desktop --features gpui/runtime_shaders (35 passed)
  • cargo test --workspace --exclude wisp-desktop --all-targets
  • cargo clippy -p wisp-storage --all-targets -- -D warnings
  • swift build --package-path native/WispAudioKit --jobs 4
  • cargo fmt --all -- --check
  • git diff --check

@pranc1ngpegasus
pranc1ngpegasus marked this pull request as ready for review July 15, 2026 06:26
@pranc1ngpegasus
pranc1ngpegasus merged commit f062558 into main Jul 15, 2026
3 checks passed
@pranc1ngpegasus
pranc1ngpegasus deleted the agent/fix-session-transcript-linkage branch July 15, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant