fix(GRO-2373): add Sign out button to in-portal chrome sidebar #77

Merged
Flea Flicker merged 1 commits from feature/gro-2373-chrome-signout into dev 2026-06-11 18:24:29 +00:00
Member

Summary

The customer portal chrome (Home, Appointments, My Pets, Report Cards, Billing, Messages, Settings) had no visible sign-out control. Only the OOBE and the no-access card exposed one. Customers had to clear cookies or use devtools to sign out.

The CMPO ruling for GRO-2355 required the logout control to be reachable from the OOBE screen, the in-portal screen, and the (deep-linkable) deleted-portal screen. GRO-2358 (P1) covered the no-access + OOBE surfaces but missed the in-portal chrome. This PR closes that gap.

Fix

Added a Sign out button in the portal sidebar footer (above the "Customer Portal v1.0" version label, in the same area as "End Impersonation"). The button is always visible to authenticated customers and wires to the existing handleSignOut() callback, which calls the canonical signOut() from lib/auth-client — the SAME handler used by:

  • OOBE footer (GRO-2358 / GRO-2359)
  • no-access card (GRO-2358)
  • AdminLayout top-bar Logout

Test

  • src/__tests__/portal.test.tsx: new test renders CustomerPortal with a successful SSO bridge, lands on the chrome (verifying Hi, Jane greeting, no no-access card, no OOBE), clicks portal-chrome-signout, and asserts the shared signOutSpy fires + window.location.href navigates to /login.
  • All 30 existing tests still pass.
  • Lint: clean.
  • Typecheck: only pre-existing admin-side errors (RouteMap/Routes, missing devDeps — unrelated).

UAT Playbook

Updated UAT_PLAYBOOK.md §5.25.6f with a new test case for the chrome sign-out reachability (sibling to TC-WEB-5.25.6c/6e for OOBE / no-access).

Why this is NOT a GRO-2359 regression

GRO-2359 (the OOBE portal-creation routing) does not modify the in-portal chrome — the missing button predates GRO-2359 and the OOBE / no-access logouts are still functional. The defect is purely a pre-existing gap in the chrome layout, scoped to CustomerPortal.tsx.


🤖 Generated with Claude Code

Co-Authored-By: Paperclip noreply@paperclip.ing

## Summary The customer portal chrome (Home, Appointments, My Pets, Report Cards, Billing, Messages, Settings) had **no visible sign-out control**. Only the OOBE and the no-access card exposed one. Customers had to clear cookies or use devtools to sign out. The CMPO ruling for [GRO-2355](GRO-2355) required the logout control to be reachable from the OOBE screen, the in-portal screen, and the (deep-linkable) deleted-portal screen. [GRO-2358](GRO-2358) (P1) covered the no-access + OOBE surfaces but missed the in-portal chrome. This PR closes that gap. ## Fix Added a **Sign out** button in the portal sidebar footer (above the "Customer Portal v1.0" version label, in the same area as "End Impersonation"). The button is always visible to authenticated customers and wires to the existing `handleSignOut()` callback, which calls the canonical `signOut()` from `lib/auth-client` — the **SAME** handler used by: - OOBE footer (GRO-2358 / GRO-2359) - no-access card (GRO-2358) - `AdminLayout` top-bar Logout ## Test - `src/__tests__/portal.test.tsx`: new test renders `CustomerPortal` with a successful SSO bridge, lands on the chrome (verifying `Hi, Jane` greeting, no no-access card, no OOBE), clicks `portal-chrome-signout`, and asserts the shared `signOutSpy` fires + `window.location.href` navigates to `/login`. - All 30 existing tests still pass. - Lint: clean. - Typecheck: only pre-existing admin-side errors (RouteMap/Routes, missing devDeps — unrelated). ## UAT Playbook Updated `UAT_PLAYBOOK.md` §5.25.6f with a new test case for the chrome sign-out reachability (sibling to TC-WEB-5.25.6c/6e for OOBE / no-access). ## Why this is NOT a GRO-2359 regression GRO-2359 (the OOBE portal-creation routing) does not modify the in-portal chrome — the missing button predates GRO-2359 and the OOBE / no-access logouts are still functional. The defect is purely a pre-existing gap in the chrome layout, scoped to `CustomerPortal.tsx`. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Paperclip <noreply@paperclip.ing>
Flea Flicker added 1 commit 2026-06-11 18:22:33 +00:00
fix(GRO-2373): add Sign out button to in-portal chrome sidebar
CI / Test (pull_request) Successful in 21s
CI / Lint & Typecheck (pull_request) Successful in 29s
CI / Build & Push Docker Image (pull_request) Successful in 45s
1f7f96b00b
The customer portal chrome (Home, Appointments, My Pets, Report Cards,
Billing, Messages, Settings) had no visible sign-out control. Only the
OOBE and the no-access card exposed one. Users had to clear cookies or
use devtools to sign out.

The CMPO ruling for GRO-2355 required the logout control to be
reachable from the OOBE screen, the in-portal screen, and the
deleted-portal deep-link. GRO-2358 (P1) covered no-access + OOBE but
missed the in-portal chrome.

Fix: add a 'Sign out' button in the sidebar footer (next to 'End
Impersonation') wired to the existing handleSignOut(), which calls the
canonical signOut() from lib/auth-client — the SAME handler used by
OOBE, the no-access card, and AdminLayout's top-bar Logout.

Test: portal.test.tsx renders the CustomerPortal with a successful SSO
bridge, lands on the chrome, clicks the new portal-chrome-signout
button, and asserts the shared signOutSpy fires + window.location.href
navigates to /login.

UAT_PLAYBOOK.md: added TC-WEB-5.25.6f covering the new chrome
sign-out reachability.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Flea Flicker merged commit ddc4e3e052 into dev 2026-06-11 18:24:29 +00:00
Sign in to join this conversation.