You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(websocket): respond to getState requests directly over WebSocket
The getState handler was calling app.emit("timer:state-query", ...) which
fires a Tauri frontend IPC event instead of writing back through the
WebSocket connection. The requesting client received nothing.
The fix introduces a tokio mpsc channel per connection so the receive task
can push direct replies to the send task, which holds the WebSocket sender.
handle_client_message is refactored to accept Option<TimerSnapshot> and an
unbounded sender, removing the AppHandle dependency and making the function
unit-testable without a full Tauri app.
Adds five unit tests and one network-level integration test (tokio-tungstenite).
Closes#415
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
### Bug Fixes
4
4
5
+
-**WebSocket `getState` returns no response** — sending `{"type":"getState"}` over the WebSocket API would receive no reply. The handler was routing the response to a Tauri frontend IPC event (`timer:state-query`) instead of writing it back through the WebSocket connection. The fix introduces a per-connection `tokio::sync::mpsc` channel so the receive task can deliver direct replies through the send task, which holds the WebSocket sender. `getState` now correctly responds with `{"type":"state","payload":{...}}` to the requesting client only.
5
6
-**Custom notification sounds not playing on Windows** — ADPCM-encoded WAV files (the default output of Windows Sound Recorder) failed to decode because the `symphonia-codec-adpcm` crate was not in the dependency tree. The app would silently fall back to the built-in sound while still displaying the custom filename in Settings. ADPCM decoding is now enabled by adding `symphonia-codec-adpcm` as a direct dependency.
6
7
-**Custom sound file picker offered FLAC, which could never be decoded** — the file picker filter included `.flac` as a valid extension, but FLAC decoding was never compiled in. FLAC has been removed from the filter.
7
8
-**Unsupported audio format selected silently reverted to default** — when a custom sound file was copied successfully but failed to decode (unsupported encoding), the app fell back to the default sound with no indication to the user. The file is now probed immediately after being copied; if decoding fails the file is discarded and an inline error message is shown below the relevant audio row in Settings → Notifications.
0 commit comments