fix(web): clear server session on dev login user switch #205

Merged
groombook-engineer[bot] merged 2 commits from fix/gro-263-dev-login-session-switch into main 2026-04-02 01:44:28 +00:00

2 Commits

Author SHA1 Message Date
groombook-engineer[bot] 22475ae8e2 fix(web): unmount CustomerPortal when navigating to /login
When a user was logged in as one client and switched to another via the
dev login selector, the portal pages (Home, My Pets, Appointments,
Billing) continued showing the original user's data.

Root cause: CustomerPortal was rendered unconditionally for all
non-/admin routes (including /login). Since CustomerPortal uses a
ref (initDone) to skip re-initialization on re-renders, navigating to
/login and back did not trigger session re-creation — the old session
remained in state.

Fix: make CustomerPortal conditional on pathname not being /login, so
it properly unmounts when the user switches. On re-navigation to /,
a fresh CustomerPortal mounts and creates a new session for the
selected dev user.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-02 01:22:45 +00:00
groombook-engineer[bot] 15fdd1cb5d fix(ci): use --merge instead of --auto --merge for infra PR
groombook/infra has no required status checks, so GitHub refuses to
enable auto-merge (PR is immediately in clean status). Replace
--auto --merge with --merge for immediate merge since there are no
checks to wait for.

Fixes: GRO-378

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-02 01:17:19 +00:00