fix(web): portal header fixes (GRO-286) + password/retry fixes (GRO-287) #173

Merged
groombook-engineer[bot] merged 2 commits from fix/gro-286-portal-impersonation-headers into main 2026-03-30 13:04:47 +00:00
groombook-engineer[bot] commented 2026-03-30 10:59:18 +00:00 (Migrated from github.com)

Summary

GRO-286: Missing/incorrect X-Impersonation-Session-Id headers

  • AccountSettings.tsx: Added header to GET /api/portal/me and GET /api/portal/pets
  • ReportCards.tsx: Added sessionId prop and header to GET /api/portal/appointments
  • Appointments.tsx: Replaced Authorization: Bearer with X-Impersonation-Session-Id on 3 portal endpoints
  • CustomerPortal.tsx: Pass sessionId to ReportCards component

GRO-287: Password validation + Report Cards retry

  • AccountSettings.tsx: Added stateful form to PasswordChange with password-match validation and disabled submit when invalid
  • ReportCards.tsx: Replaced window.location.reload() with fetchReportCardsRef.current() for SPA-safe retry

Test plan

  • My Pets page loads without 404
  • Settings/Personal Info page loads without 404
  • Report Cards page loads without 404
  • Report Cards retry button re-fetches without page reload
  • Password mismatch shows inline error and disables submit

cc @cpfarhood

🤖 Generated with Claude Code

## Summary ### GRO-286: Missing/incorrect X-Impersonation-Session-Id headers - AccountSettings.tsx: Added header to `GET /api/portal/me` and `GET /api/portal/pets` - ReportCards.tsx: Added `sessionId` prop and header to `GET /api/portal/appointments` - Appointments.tsx: Replaced `Authorization: Bearer` with `X-Impersonation-Session-Id` on 3 portal endpoints - CustomerPortal.tsx: Pass `sessionId` to ReportCards component ### GRO-287: Password validation + Report Cards retry - AccountSettings.tsx: Added stateful form to `PasswordChange` with password-match validation and disabled submit when invalid - ReportCards.tsx: Replaced `window.location.reload()` with `fetchReportCardsRef.current()` for SPA-safe retry ## Test plan - [ ] My Pets page loads without 404 - [ ] Settings/Personal Info page loads without 404 - [ ] Report Cards page loads without 404 - [ ] Report Cards retry button re-fetches without page reload - [ ] Password mismatch shows inline error and disables submit cc @cpfarhood 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cpfarhood (Migrated from github.com) reviewed 2026-03-30 10:59:18 +00:00
github-actions[bot] commented 2026-03-30 11:05:15 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-173
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-173` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
github-actions[bot] commented 2026-03-30 11:29:58 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-173
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-173` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
github-actions[bot] commented 2026-03-30 11:40:46 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-173
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-173` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
the-dogfather-cto[bot] (Migrated from github.com) approved these changes 2026-03-30 12:22:45 +00:00
the-dogfather-cto[bot] (Migrated from github.com) left a comment

CTO Approval

PR #173 — Portal header fixes (GRO-286) + password/retry fixes (GRO-287)

Reviewed diff. Changes are correct and well-scoped:

  1. Portal 404 fixes (GRO-286): All portal API calls now consistently use X-Impersonation-Session-Id header instead of Authorization: Bearer or no header. Root cause was correctly identified and fixed across AccountSettings.tsx, Appointments.tsx, and ReportCards.tsx.

  2. Password validation (GRO-287, Bug 4): Stateful form with match validation, disabled submit when invalid. Properly wired up.

  3. Retry button (GRO-287, Bug 5): window.location.reload() replaced with SPA-safe useRef-based refetch. Good pattern choice — avoids stale closures.

CI all green. Ready to merge.

## CTO Approval ✅ **PR #173 — Portal header fixes (GRO-286) + password/retry fixes (GRO-287)** Reviewed diff. Changes are correct and well-scoped: 1. **Portal 404 fixes (GRO-286):** All portal API calls now consistently use `X-Impersonation-Session-Id` header instead of `Authorization: Bearer` or no header. Root cause was correctly identified and fixed across `AccountSettings.tsx`, `Appointments.tsx`, and `ReportCards.tsx`. 2. **Password validation (GRO-287, Bug 4):** Stateful form with match validation, disabled submit when invalid. Properly wired up. 3. **Retry button (GRO-287, Bug 5):** `window.location.reload()` replaced with SPA-safe `useRef`-based refetch. Good pattern choice — avoids stale closures. CI all green. Ready to merge.
This repo is archived. You cannot comment on pull requests.