Add recoverable listener session review#13
Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughPersistent listener-session state per active note and STT chunk ledger loading were added. Session state is normalized, queued, and atomically persisted to note metadata across capture lifecycle events; notes now include parsed latest STT chunk records and related metadata. ChangesListener Session State & STT Chunk Persistence
sequenceDiagram
actor User
participant App as App.tsx
participant Preload as preload.cjs
participant Main as main.cjs
participant FS as "File System"
participant DB as "SQLite DB"
User->>App: Start Capture
App->>Preload: IPC startCapture
Preload->>Main: startCapture event
Main->>Main: set activeListenerSessionNoteId
Main->>Main: normalizeListenerSessionState -> "recording"
Main->>FS: writeListenerSessionState to metadata
Main->>DB: sync metadata row
Main-->>App: notify UI
Main->>Main: broadcastCaptureEvent(stateChanged)
Main->>Main: persistCaptureEventSessionState()
Main->>FS: write updated metadata
Main->>DB: sync
User->>App: Stop Capture
App->>Preload: IPC stopCapture
Preload->>Main: stopCapture event
Main->>Main: enqueue stopping -> completed writes
Main->>FS: write stopping/completed
Main->>DB: sync
Main->>Main: clear activeListenerSessionNoteId
Main-->>App: notify completion
User->>App: Load Note
App->>Preload: IPC readNote(id)
Preload->>Main: readNote(id)
Main->>FS: read metadata.json
Main->>FS: read stt-chunks.jsonl
Main->>Main: parseSTTChunkLedgerJSONL & latestSTTChunks
Main-->>App: return NoteDetail with listenerSession & sttChunks
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Review rate limit: 1/3 review remaining, refill in 37 minutes and 7 seconds. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28fd2b0938
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Code Review
This pull request introduces a transcript runtime review feature, allowing users to monitor listener session states and individual STT chunk statuses. It includes backend updates for persisting session metadata and tracking active captures, alongside a new UI component in the transcript view for visualizing progress and retrying failed chunks. Feedback identifies a potential race condition in the metadata update logic, suggests improving error visibility by logging caught exceptions, and recommends adding default cases to state-to-label mapping functions for better robustness.
Summary
Adds persisted listener session state and a transcript chunk review surface for local STT sessions.
Why
Long recordings need recoverable runtime state and reviewable chunk evidence so interrupted or failed STT work can be inspected and retried without defaulting to whole-recording transcription.
Changes
stt-chunks.jsonlstatus into note detail for review.Validation:
npm run desktop:checkgit diff --check HEAD~2..HEADSummary by CodeRabbit
New Features
Bug Fixes