3.1 KiB
3.1 KiB
TODO
Chat sidebar
- remove search bar from chat sidebar (not needed for single-room)
- remove "user" toggle button from chat sidebar (hide for now, add back when user interface is stable)
- make login/registration form a modal and only toggle it when user is not logged in and clicks "Login" or "Register"
- when user is logged in, do not show login/registration form
- 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.
-
Remove search bar (single-room)
index.html: delete the<div id="dm-search-row">block.main.ts: removesearchDM()and thedm-search-btnlistener; drop the#dm-search-rowshow/hide logic inswitchRoom()(thesearchRow.hidden = !isDMlines). KeepcurrentDMTargetonly if the "New DM" flow stays.
-
Remove "Users" toggle button
index.html: delete the<button id="users-toggle-btn">button.main.ts: removetoggleUserList()and theusers-toggle-btnlistener; drop the now-unusedusersVisiblevariable.
-
Login/registration form as a modal
index.html: wrap the#auth-panelform in a modal structure (.auth-modal+ backdrop) with a close button.style.css: add.auth-modal/.auth-modal-backdropstyles.main.ts: addopenAuthModal()/closeAuthModal(); change theauth-toggle-btnhandler to open the modal (only when not authenticated) instead of toggling#auth-panelinline; wire a close/backdrop-click tocloseAuthModal().
-
Hide form when logged in
main.tsupdateAuthUI(): whenauthenticated→ hide the "Sign in" button and callcloseAuthModal(); show the user label + "Sign out" button. When not authenticated → show "Sign in" and hide "Sign out".
-
No duplicate messages
main.ts: addclearMessages()(empties#messages) and call it at the top ofconnectWebSocket()so each (re)connect renders history fresh instead of appending.- Fix the initial double-connect: make the initial
connectWebSocket("main")wait forrefreshUserSession()(or connect once with the resolved username) so history isn't pushed twice on load.
Frontend Tests
User Frontend
- Test coverage for all critical frontend components and interactions
- Add code coverage reporting and enforce minimum coverage threshold in CI/CD pipeline
- Document test cases and expected outcomes
Admin Frontend
- Test coverage for all critical admin UI components and interactions
- Add code coverage reporting and enforce minimum coverage threshold in CI/CD pipeline
- Document test cases and expected outcomes
Backend Integration Tests
Cloudflare R2
- Test retrieval of segments and manifests from R2 via Cloudflare edge
- Validate cache hit/miss behavior and performance metrics
- Validate edge cache hit/miss behavior with repeat requests — script
scripts/validate-edge-cache.shcreated