From 474da7418e4c4c1d79fa0cbabafcf19efd6ec33b Mon Sep 17 00:00:00 2001 From: zwitschi Date: Sun, 16 Aug 2026 13:40:16 +0200 Subject: [PATCH] fix(frontend): consolidate chat sidebar and modal auth flow --- .github/instructions/DONE.md | 8 --- .github/instructions/TODO.md | 32 +++++++++++ CHANGELOG.md | 2 + frontend/index.html | 27 ++++----- frontend/src/main.test.ts | 47 ++++------------ frontend/src/main.ts | 104 +++++++++++++++-------------------- frontend/src/style.css | 50 ++++++++++++++--- 7 files changed, 145 insertions(+), 125 deletions(-) diff --git a/.github/instructions/DONE.md b/.github/instructions/DONE.md index cdd2714..adf974d 100644 --- a/.github/instructions/DONE.md +++ b/.github/instructions/DONE.md @@ -2,14 +2,6 @@ > Completed tasks from [TODO](./TODO.md). Product, feature, and release history lives in [CHANGELOG](./CHANGELOG.md); this file keeps only engineering and ops notes not captured there. -## Playout startup performance (2026-08-16) - -- Parallelized playlist validation: dedup repeated paths, probe unique files concurrently (`PLAYOUT_VALIDATE_WORKERS` default `runtime.NumCPU()`), run the two `ffprobe` probes concurrently, and validate once in `main()` (removed the redundant `-validate` pre-step in `start-playout.sh`). See CHANGELOG. - -## Cloudflare Workers frontend URLs (2026-08-16) - -- Viewer `main.ts` uses `VITE_PUBLIC_APP_URL` for all API requests and `VITE_PUBLIC_WS_URL` for WebSocket connections so the Workers-served SPA reaches the app origin cross-origin. See CHANGELOG. - ## Test infrastructure & refactors (2026-08-07) - Chat service `main.go` split into 8 packages (config, auth, db, handlers, ws, media, ratelimit, metrics); `db.RedisClient` + `db.PubSub` interfaces added for mocking. diff --git a/.github/instructions/TODO.md b/.github/instructions/TODO.md index ea0b9b0..d388af3 100644 --- a/.github/instructions/TODO.md +++ b/.github/instructions/TODO.md @@ -2,6 +2,38 @@ > Completed tasks moved to [DONE](./DONE.md). Remaining tasks in [BACKLOG](./BACKLOG.md). +## Chat sidebar + +- [x] remove search bar from chat sidebar (not needed for single-room) +- [x] remove "user" toggle button from chat sidebar (hide for now, add back when user interface is stable) +- [x] make login/registration form a modal and only toggle it when user is not logged in and clicks "Login" or "Register" +- [x] when user is logged in, do not show login/registration form +- [x] make sure each message is only rendered once in the chat log (no duplicates on reconnect or initial load) + +### Plan + +Files: `frontend/index.html`, `frontend/src/main.ts`, `frontend/src/style.css`. + +1. **Remove search bar** (single-room) + - `index.html`: delete the `
` block. + - `main.ts`: remove `searchDM()` and the `dm-search-btn` listener; drop the `#dm-search-row` show/hide logic in `switchRoom()` (the `searchRow.hidden = !isDM` lines). Keep `currentDMTarget` only if the "New DM" flow stays. + +2. **Remove "Users" toggle button** + - `index.html`: delete the ` - + +
-