From cbdbed4664d246c1c8f8543d7caa9f9f21fec62c Mon Sep 17 00:00:00 2001 From: John Lightner Date: Wed, 1 Apr 2026 01:42:28 -0500 Subject: [PATCH] MAESTRO: Check off remaining WEBSOCKET-PROGRESS-01 tasks (all previously completed) Verified and checked off 4 tasks that were already implemented in prior commits: - Channel Detail page download progress integration - Sidebar WebSocket connection status indicator - Backend progress event emission verification - Query invalidation on WebSocket events Co-Authored-By: Claude Opus 4.6 --- .../WEBSOCKET-PROGRESS-01.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 d9710cc..88fd328 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 @@ -19,21 +19,21 @@ The backend event bus, WebSocket route, progress parser, and frontend context/ho - Update the `status` column render in the Queue table to use this wrapper for items with status `downloading` - **Note:** Already wired from prior commits. `QueueItemProgress` component (lines 36-44) uses `useDownloadProgress(item.contentItemId)` and renders `` for active downloads, falling back to ``. Status column at line 94 uses this wrapper. Frontend builds clean, all 606 tests pass. -- [ ] Integrate download progress into the Channel Detail page: +- [x] Integrate download progress into the Channel Detail page: - Read `src/frontend/src/pages/ChannelDetail.tsx` to understand how content items are displayed - Search for how content items render their status in this page - For content items with status `downloading`, show the `DownloadProgressBar` alongside or instead of the static status badge - Use the same `useDownloadProgress` hook pattern established in the Queue page - **Note:** Already wired in commit 0541a5f. `ContentStatusCell` component (lines 38-46) uses `useDownloadProgress(item.id)` and renders `` for active downloads, falling back to ``. Used in status column at line 560. -- [ ] Add a WebSocket connection status indicator to the Sidebar or app header: +- [x] Add a WebSocket connection status indicator to the Sidebar or app header: - Read `src/frontend/src/components/Sidebar.tsx` - Import `useDownloadProgressConnection` from the DownloadProgressContext - Add a small visual indicator (e.g., a colored dot) near the bottom of the sidebar that shows green when WebSocket is connected and grey/red when disconnected - 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 @@ -41,7 +41,7 @@ The backend event bus, WebSocket route, progress parser, and frontend context/ho - 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: +- [x] 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` - Read `src/frontend/src/api/hooks/useQueue.ts` and `src/frontend/src/api/hooks/useContent.ts` to verify they use matching query keys - Also invalidate `activity` and `channels` query keys on complete/failed events so the Activity page and channel content counts update without manual refresh