Fix transcript history session linkage - #79
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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-targetscargo clippy -p wisp-storage --all-targets -- -D warningsswift build --package-path native/WispAudioKit --jobs 4cargo fmt --all -- --checkgit diff --check