fix: use VITE_BASE_URL instead of undefined VITE_API_URL (#434) - #436
fix: use VITE_BASE_URL instead of undefined VITE_API_URL (#434)#436RounakKumarAgarwal wants to merge 1 commit into
Conversation
) VITE_API_URL was referenced in teamService, notificationService, useDebateWS, and ViewDebate but is never defined in .env.example. Only VITE_BASE_URL is documented, so these flows fell back to localhost in production. Switch all four to VITE_BASE_URL. Fixes AOSSIE-Org#434
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe frontend now uses ChangesFrontend URL alignment
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The frontend now uses the documented backend URL for team, notification, debate, and spectator flows, restoring production routing without changing endpoints or authentication behavior. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4 files. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
VITE_API_URL was referenced in teamService, notificationService, useDebateWS, and ViewDebate but is never defined in .env.example. Only VITE_BASE_URL is documented, so these flows fell back to localhost in production. Switch all four to VITE_BASE_URL.
Addressed Issues:
Fixes #434
Screenshots/Recordings:
Config-only change with no UI effect; behaviour is identical in local dev. Happy to attach a screen recording of the affected pages if useful.
Additional Notes:
VITE_API_URLis referenced in four files but is never defined in.env.example— onlyVITE_BASE_URLis documented. In any real deploymentVITE_API_URLis undefined, so these flows fell back tolocalhost:1313(or, for the WebSocket files, the frontend's own host), breaking team features, notifications, and the spectator/view-debate WebSocket in production. All four now use the documentedVITE_BASE_URL. No behavioural change in local dev (the localhost fallback still applies).Note:
npm run buildcurrently fails onmaindue to pre-existing TypeScript errors in unrelated files (CommentTree.tsx,Game.tsx,Profile.tsx,TeamDebateRoom.tsx,teamDebateService.ts). Those are present before and after this change — this PR neither introduces nor resolves them.AI Usage Disclosure:
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.
Check one of the checkboxes below:
I have used the following AI models and tools: Claude (Anthropic)
Checklist
Summary by CodeRabbit