Private
Public Access
Another user's new display name or avatar didn't show up until you reloaded -- update_profile/upload_avatar/remove_avatar never told anyone. Same root cause and fix shape as #26 (room_added): the frontend's already-fetched member list had no way to hear about a change, since nothing ever pushed one. Reuses the existing per-room broadcast channel (not the per-user one #26 added, since this only matters for rooms the affected user shares with someone currently looking at them) -- publishes member_updated to every room the user belongs to; ChatShellPage refetches members when it arrives for the currently open room. Verified end-to-end in the browser: one user's room-info member list updated live when another user changed their display name from a separate session, no reload. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
DS Chat frontend (Phase 1)
React + Vite PWA. Login, room list, and chat views wired to the backend's
REST API and /ws/chat WebSocket endpoint. See ../README.md
and ../backend/README.md for full local setup.
Dev
npm install
npm run dev
The dev server proxies /api and /ws to http://localhost:8000 (see
vite.config.ts), so the backend must be running for anything beyond the
login page to work.
Build
npm run build
Generates the PWA manifest and service worker via vite-plugin-pwa into dist/.
Layout
src/
main.tsx, App.tsx routes: /login, /rooms, /rooms/:roomId
api/ fetch wrappers (client, auth, rooms)
ws/useChatSocket.ts WebSocket hook (join/send/receive)
context/AuthContext.tsx current-user state, hydrated via GET /api/auth/me
components/ ProtectedRoute, RoomListItem, MessageList, MessageInput
pages/ LoginPage, RoomListPage, ChatRoomPage