From 57626f5f01b1682c62d43eb983e04b491bdbd640 Mon Sep 17 00:00:00 2001 From: John Lightner Date: Wed, 1 Apr 2026 00:42:34 -0500 Subject: [PATCH] MAESTRO: Verify backend WebSocket download progress event wiring is complete Confirmed all event bus wiring between DownloadService, WebSocket route, and server builder is correctly connected. No changes needed. Co-Authored-By: Claude Opus 4.6 --- .../WEBSOCKET-PROGRESS-01.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Auto Run Docs/Initiation/2026-03-31-WebSocket-Progress-And-Polish/WEBSOCKET-PROGRESS-01.md b/Auto Run Docs/Initiation/2026-03-31-WebSocket-Progress-And-Polish/WEBSOCKET-PROGRESS-01.md index 7cf14aa..4453db7 100644 --- a/Auto Run Docs/Initiation/2026-03-31-WebSocket-Progress-And-Polish/WEBSOCKET-PROGRESS-01.md +++ b/Auto Run Docs/Initiation/2026-03-31-WebSocket-Progress-And-Polish/WEBSOCKET-PROGRESS-01.md @@ -32,12 +32,13 @@ The backend event bus, WebSocket route, progress parser, and frontend context/ho - Use existing CSS variables (`--success` for connected, `--text-muted` for disconnected) - **Done:** Added connection status indicator at bottom of sidebar with green/grey dot and "Connected"/"Disconnected" label. Collapses to just the dot when sidebar is collapsed. Uses `useDownloadProgressConnection` hook. -- [ ] Verify the backend emits progress events during streaming downloads: +- [x] Verify the backend emits progress events during streaming downloads: - Read `src/services/download.ts` to confirm the `spawnDownload` method emits `download:progress` events via the event bus - Read `src/server/routes/websocket.ts` to confirm the WebSocket route subscribes to the event bus and broadcasts to clients - Read `src/server/index.ts` to confirm the event bus is passed to both the WebSocket route plugin and the server builder - If any wiring is missing between `buildServer()` and the WebSocket route registration, fix it - Verify the `--newline` and `--progress` flags are added to yt-dlp args in `spawnDownload` (they should already be there) + - **Verified:** All wiring is correct. Single `DownloadEventBus` instance created in `src/index.ts:61` is shared between `buildServer` (→ WebSocket route) and `DownloadService`. `spawnDownload` adds `--newline`/`--progress` flags, parses progress lines, and emits all three event types. WebSocket route subscribes and broadcasts to clients. All 13 related tests pass. - [ ] Invalidate relevant queries on WebSocket events for immediate UI freshness: - Read the `DownloadProgressContext.tsx` — it already invalidates `content` and `queue` query keys on `download:complete` and `download:failed`