Conversation
📝 WalkthroughWalkthroughIntroduces streaming-based message handling in ListenerActor, restructures session supervision to optionally pass ListenerArgs on respawn, and refactors TranscriptManager to use a generic manager_offset and preloadable partial words via a builder. Public APIs and state fields are updated accordingly across listener, session, and manager components. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Mic as Audio Source
participant Stream as Stream Client
participant RX as RX Task
participant LA as ListenerActor
participant TM as TranscriptManager
participant Sess as SessionActor
Note over LA,TM: Initialization (pre_start)
LA->>TM: builder().with_manager_offset(ts?).with_existing_partial_words(...)
TM-->>LA: TranscriptManager
Mic->>Stream: Audio frames
Stream-->>RX: StreamResponse / errors / lifecycle events
rect rgba(200,230,255,0.3)
RX->>LA: ListenerMsg::StreamResponse(result)
LA->>TM: append/process words per channel
LA-->>Sess: Emit PartialWords / FinalWords
LA->>Sess: Update session with final words
end
alt Stream start failed
RX->>LA: StreamStartFailed(err)
LA->>LA: Stop
else Stream error/timeout/end
RX->>LA: StreamError/StreamTimeout/StreamEnded
LA->>LA: Stop
end
sequenceDiagram
autonumber
participant Sess as SessionActor
participant LA as ListenerActor
participant Prev as Previous ListenerState
Note over Sess: Supervision on ListenerActor termination
Sess->>Sess: maybe_state.extract(Prev?)
alt Previous state exists
Sess->>LA: start_listener(listener_args=Some(reconstructed from Prev: app, session_id, languages, onboarding, partial_words_by_channel))
else No previous state
Sess->>LA: start_listener(listener_args=None)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
plugins/listener/src/actors/listener.rs(5 hunks)plugins/listener/src/actors/session.rs(4 hunks)plugins/listener/src/manager.rs(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}
⚙️ CodeRabbit configuration file
**/*.{js,ts,tsx,rs}: 1. Do not add any error handling. Keep the existing one.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".
Files:
plugins/listener/src/actors/listener.rsplugins/listener/src/actors/session.rsplugins/listener/src/manager.rs
🧬 Code graph analysis (1)
plugins/listener/src/actors/listener.rs (1)
plugins/listener/src/manager.rs (3)
builder(39-41)words(56-59)words(71-74)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: ci (windows, windows-latest)
- GitHub Check: ci (macos, macos-14)
No description provided.