fix: throw on missing env vars in backend createServerSupabase()
From the PR description
Summary
backend/src/lib/supabase.tsnow throwsError("SUPABASE_URL and SUPABASE_SECRET_KEY must be set")when either env var is absent, matching the frontend fix from PR #73- Removes dead
getUserIdFromRequestexport (no callers) which still used the old|| ""pattern
Closes #97 Closes #114 Closes #117 Closes #124
Changes
backend/src/lib/supabase.ts- replace|| ""fallbacks with explicit guard; remove deadgetUserIdFromRequestexportbackend/src/lib/__tests__/supabaseServer.test.ts- new test: throws on missing URL, missing key, both missing; succeeds when both setbackend/vitest.config.ts- vitest configuration withincludefilter andisolate: true;"test"script added topackage.json
Test plan
- Unit tests added and passing (4/4)
- Backend build passes
Our analysis
Guard Supabase env vars in the backend — read the full analysis →
Think the analysis missed something the PR description covers?
Capture this PR into my fork
Download a Markdown prompt that tells Claude how to port every
commit in this PR into your working tree. Run it via
claude -p < capture-pull-106.md from
inside the repo you want the changes in.