Bug Description
Several frontend WebSocket call sites hardcode the backend address instead of deriving it from VITE_BASE_URL:
frontend/src/components/Matchmaking.tsx line 62
- (same pattern in other raw
new WebSocket(...) call sites: ChatRoom.tsx, TeamDebateRoom.tsx, Game.tsx, gamificationService.ts)
frontend/src/components/DebatePopup.tsx line 31 also hardcodes http://localhost:1313 for room creation.
Impact
Matchmaking, chat, and room creation silently fail on any deployed environment (or even when the backend runs on a different port). The UI shows a permanent "connecting"/"Searching…" state with no error.
Suggested Fix
Build WS URLs from import.meta.env.VITE_BASE_URL (swapping http → ws), in one shared helper.
Steps to Reproduce
No response
Logs and Screenshots
No response
Environment Details
No response
Impact
Critical - Application is unusable
Code of Conduct
Bug Description
Several frontend WebSocket call sites hardcode the backend address instead of deriving it from
VITE_BASE_URL:frontend/src/components/Matchmaking.tsxline 62new WebSocket(...)call sites:ChatRoom.tsx,TeamDebateRoom.tsx,Game.tsx,gamificationService.ts)frontend/src/components/DebatePopup.tsxline 31 also hardcodeshttp://localhost:1313for room creation.Impact
Matchmaking, chat, and room creation silently fail on any deployed environment (or even when the backend runs on a different port). The UI shows a permanent "connecting"/"Searching…" state with no error.
Suggested Fix
Build WS URLs from
import.meta.env.VITE_BASE_URL(swappinghttp→ws), in one shared helper.Steps to Reproduce
No response
Logs and Screenshots
No response
Environment Details
No response
Impact
Critical - Application is unusable
Code of Conduct