feat(listener): add loading state events for better UI feedback#2517
Closed
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Closed
feat(listener): add loading state events for better UI feedback#2517devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Conversation
Add new SessionEvent variants to provide visibility into the connection and initialization phases between 'start listening' and 'got first transcript': - InitializingAudio: emitted when SourceActor starts audio initialization - AudioReady: emitted after audio streams are successfully set up - Connecting: emitted when ListenerActor starts WebSocket connection - Connected: emitted after successful WebSocket connection - ConnectionError: emitted when connection fails (with error details) These events allow the UI to show appropriate loading states during the 1-8 second window that was previously a blind spot. Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hyprnote-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ontend wiring - Add AudioMode enum for serializing ChannelMode - Enhance AudioReady event with mode and device fields - Add AudioError event for mic/device failures - Enhance Connected event with adapter field - Replace retry_count with is_retryable in ConnectionError - Wire up all new events in frontend general.ts - Add loadingPhase and lastError fields to live state Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
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.
feat(listener): add loading state events for better UI feedback
Summary
Adds new
SessionEventvariants to provide UI visibility into the connection and initialization phases between "start listening" and "got first transcript". Previously, there was a 1-8 second blind spot where the UI had no insight into what was happening.New events:
InitializingAudio- emitted when SourceActor begins audio initializationAudioReady { mode, device }- emitted after audio streams are successfully set up (includes audio mode and device name)AudioError { error, device }- emitted on mic/device failuresConnecting- emitted when ListenerActor starts WebSocket connection to STT serviceConnected { adapter }- emitted after successful WebSocket connection (includes adapter name like "Deepgram", "OpenAI", etc.)ConnectionError { error, is_retryable }- emitted on connection failureEvent flow:
Frontend state changes:
LoadingPhasetype:"idle" | "initializing_audio" | "audio_ready" | "connecting" | "connected"loadingPhaseandlastErrorfields toGeneralState.livegeneral.tsUpdates since last revision
AudioModeenum for serializingChannelModeto frontendmode,device,adapter)AudioErrorevent for mic/device failuresretry_countwithis_retryableboolean inConnectionErrorReview & Testing Checklist for Human
plugins/dbmissing Cargo.toml). Verify CI regenerates bindings correctly and types match.ConnectionErrorfires; deny mic permission to verifyAudioErrorfires.is_retryablelogic: Currently hardcoded totruefor all connection errors - may need refinement for non-retryable errors (e.g., auth failures).loadingPhaseandlastErrorstate fields are populated but UI components don't consume them yet - this PR only adds the state management layer.Recommended test plan:
loadingPhasetransitions)ConnectionErrorfires andlastErroris setAudioErrorfiresNotes
AudioErroris emitted whenStreamFailedmessage is received in SourceActorLink to Devin run: https://app.devin.ai/sessions/d08f3c9e84644c12bc2c884f7951c29d
Requested by: yujonglee (@yujonglee)