-
Notifications
You must be signed in to change notification settings - Fork 418
Got Listener working in desktop2 #1574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR standardizes plugin versioning by removing v0/v1 feature gates across multiple Tauri plugins, deletes the entire connector plugin, introduces a new Zustand-based listener store for managing audio session state, replaces the OngoingSessionStore with the new ListenerStore throughout the app, and removes database persistence from listener session management. Changes
Sequence Diagram(s)sequenceDiagram
participant Component as ListenButton Component
participant Hook as useListener Hook
participant Store as Listener Store (Zustand)
participant Commands as Listener Commands
participant Events as Listener Events
Component->>Hook: useListener (selector)
Hook->>Store: retrieve store from context
Store-->>Hook: return selected state (status, loading, start, stop)
Hook-->>Component: status, loading, start, stop
rect rgba(100, 150, 200, 0.3)
Note over Component,Events: User clicks to start listening
Component->>Hook: handleClick() → start()
Hook->>Store: start action
Store->>Store: set loading = true
Store->>Commands: listenerCommands.startSession("")
Commands-->>Store: session started
Store->>Events: subscribe to listener events
Events-->>Store: audioAmplitude event → update amplitude
Events-->>Store: running_active event → set status, loading = false
Store-->>Hook: updated state (running_active, amplitude)
Hook-->>Component: re-render with active state & amplitude
end
rect rgba(150, 100, 200, 0.3)
Note over Component,Events: User clicks to stop listening
Component->>Hook: handleClick() → stop()
Hook->>Store: stop action
Store->>Store: set loading = true
Store->>Commands: listenerCommands.stopSession()
Commands-->>Store: session stopped
Store->>Store: reset to initialState
Store-->>Hook: updated state (inactive, zero amplitude)
Hook-->>Component: re-render with inactive state
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes The PR involves significant scope with heterogeneous changes: complete removal of a plugin (connector) with cascading dependency updates across the workspace; standardized versioning across multiple plugins; substantial state management refactoring (replacing OngoingSessionStore with new ListenerStore); type/event renames with propagation through multiple files; removal of database integration from the listener actor with implications for session persistence; and new async control flow in the listener store's start/stop actions. While many import path changes are repetitive, the overall change requires understanding plugin architecture, state management patterns, and the implications of removing database persistence. Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (41)
📒 Files selected for processing (47)
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 |
No description provided.