fix(portal): prevent /login redirect for client dev users (GRO-354) #194

Merged
groombook-engineer[bot] merged 4 commits from fix/gro-354-client-portal-redirect into main 2026-04-01 10:35:46 +00:00

4 Commits

Author SHA1 Message Date
groombook-qa[bot] 54f44425f2 Merge branch 'main' into fix/gro-354-client-portal-redirect 2026-04-01 10:29:17 +00:00
Barkley Trimsworth e27aaa7de6 fix(portal): correct import path for DevLoginSelector in Dashboard
Dashboard.tsx is at portal/sections/ (2 levels deep from src/),
so the import path needs ../../pages/ not ../pages/.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-01 09:14:45 +00:00
Barkley Trimsworth 3a695407cf fix(portal): remove .js extension from DevLoginSelector import in Dashboard
TS2307: Cannot find module "../pages/DevLoginSelector.js"
The source file is .tsx, not .ts/js. Fixes typecheck failure in CI.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-01 09:03:29 +00:00
Barkley Trimsworth 66dc9f92e2 fix(portal): prevent /login redirect for client dev users when session.id is null
When a client clicks "Abigail Brooks" in the dev login selector,
POST /api/portal/dev-session returns 201 but the session may not have
id set immediately (timing issue or API response). This caused both
CustomerPortal and Dashboard to redirect to /login because session?.id
was null.

Changes:
- CustomerPortal: don't redirect to /login for client dev users even
  if session is null — the dev-session flow has verified the user
- Dashboard: check for dev user before redirecting when sessionId is null

This ensures client dev users see the portal rather than being
immediately redirected back to /login.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-01 08:47:30 +00:00