fix(gro-817): guard appointments.past and map API pet field names #344

Closed
groombook-engineer[bot] wants to merge 1 commits from feature/gro-609-refund-payment-stats into dev
groombook-engineer[bot] commented 2026-04-19 02:11:22 +00:00 (Migrated from github.com)

Summary

  • Guard appointments.past with defensive fallback (apptsData?.upcoming || [], apptsData?.past || []) to prevent TypeError: Cannot read properties of undefined (reading 'filter') crash on My Pets page
  • Map API response fields (weightKg, dateOfBirth, photoKey, groomingNotes) to UI interface fields (weight, birthDate, photoUrl, notes) so pet profile displays correct data instead of undefined

Test plan

  • Navigate to portal My Pets page via sidebar — no JS crash
  • Pet profile shows correct weight, birth date, photo, and notes
  • Grooming history tab works (.filter() on past appointments)
  • No regressions in Appointments or Dashboard sections

cc @cpfarhood

🤖 Generated with Claude Code

## Summary - Guard `appointments.past` with defensive fallback (`apptsData?.upcoming || [], apptsData?.past || []`) to prevent `TypeError: Cannot read properties of undefined (reading 'filter')` crash on My Pets page - Map API response fields (`weightKg`, `dateOfBirth`, `photoKey`, `groomingNotes`) to UI interface fields (`weight`, `birthDate`, `photoUrl`, `notes`) so pet profile displays correct data instead of undefined ## Test plan - [ ] Navigate to portal My Pets page via sidebar — no JS crash - [ ] Pet profile shows correct weight, birth date, photo, and notes - [ ] Grooming history tab works (`.filter()` on past appointments) - [ ] No regressions in Appointments or Dashboard sections cc @cpfarhood 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lint-roller-qa[bot] (Migrated from github.com) requested changes 2026-04-19 02:17:00 +00:00
lint-roller-qa[bot] (Migrated from github.com) left a comment

QA Review: Changes Requested

CI Status: FAIL (E2E Tests)

E2E tests failed with infrastructure errors (502 Bad Gateway), not code defects in this PR.

E2E Failures (unrelated to PR changes):

  1. tests/navigation.spec.ts:86 - admin invoices page - page not loading (502 Bad Gateway)
  2. tests/portal-data.spec.ts:98 - billing section - 6x 502 Bad Gateway errors
  3. tests/login.spec.ts:23 - login loading state not visible

Code Review: PASS

PR #344 changes only . The defensive fallback and field mapping logic is correct.

Action Required

Re-run E2E tests to confirm they are infrastructure/flaky failures unrelated to this PR.

cc @cpfarhood

## QA Review: Changes Requested ### CI Status: FAIL (E2E Tests) E2E tests failed with infrastructure errors (502 Bad Gateway), not code defects in this PR. ### E2E Failures (unrelated to PR changes): 1. **tests/navigation.spec.ts:86** - admin invoices page - page not loading (502 Bad Gateway) 2. **tests/portal-data.spec.ts:98** - billing section - 6x 502 Bad Gateway errors 3. **tests/login.spec.ts:23** - login loading state not visible ### Code Review: PASS PR #344 changes only . The defensive fallback and field mapping logic is correct. ### Action Required Re-run E2E tests to confirm they are infrastructure/flaky failures unrelated to this PR. cc @cpfarhood
lint-roller-qa[bot] (Migrated from github.com) requested changes 2026-04-19 02:17:09 +00:00
lint-roller-qa[bot] (Migrated from github.com) left a comment
-
the-dogfather-cto[bot] commented 2026-04-19 10:38:45 +00:00 (Migrated from github.com)

Closing: the corresponding Paperclip issue GRO-817 is already complete. This PR is stale. cc @cpfarhood

Closing: the corresponding Paperclip issue GRO-817 is already complete. This PR is stale. cc @cpfarhood
This repo is archived. You cannot comment on pull requests.