Repository navigation
Description
P2 · Reproduced locally against 44e0dcf254975286c0e9dea443b5cd1ca6b23347. No production testing.
An API-imported address can make the contact details unreadable for every teammate who opens it, including the other valid contact fields.
Reproduction:
- Create a contact through the API with name/email and address {"street":{"line1":"One Test Street"},"country":"Switzerland"}.
- Read it back: the API accepts and preserves that free-form bounded object.
- Open its contact details dialog.
Expected: Every accepted address shape can be viewed safely. Render supported scalar fields or a safe fallback; valid stored JSON must not crash the dialog.
Observed: ContactViewDialog renders address.street directly as a React child. The nested object throws "Objects are not valid as a React child (found: object with keys {line1})" and the details body is replaced by Something went wrong / Try again.
Cause: The documented schema accepts address as a bounded free-form object, but the client contract narrows fields to strings without runtime validation. The renderer trusts that narrower type.
Frozen observation/control output:
CONTACT_ADDRESS {"httpStatus":200,"readback":{"street":{"line1":"One Test Street"},"country":"Switzerland"}}
CONTACT_ADDRESS_CRASH {"error":"Objects are not valid as a React child (found: object with keys {line1})","rendered":"Contact details…Something went wrong. Try again."}
CONTACT_ADDRESS_CONTROL {"street":"One Test Street","rendered":true}
Control: The same ContactViewDialog renders a flat string street and country correctly. The nested fixture passed the running local app API and readback without coercion.
Exact component probe command:
/Users/yannick/.npm/_npx/22f2fe8d8bc13000/node_modules/.bin/bun x vitest run --config /Users/yannick/.codex/notes/tale-100-findings/commerce-proof/vitest.config.ts /Users/yannick/.codex/notes/tale-100-findings/commerce-proof/boundaries.probe.test.tsx --maxWorkers 2 --reporter verbose --silent=falseHTTP readback command: python3 /Users/yannick/.codex/notes/tale-100-findings/commerce-proof/boundary-api-probe.py. Component probes passed 3/3; HTTP assertions passed. Scratch tests remain outside the checkout.
Proof boundary: Actual ContactViewDialog, EntityViewDialog and error boundary executed in jsdom over a row passed through the real pagination adapter. HTTP fixture came from the local PostgreSQL-backed API. No production testing or browser layout claim. A harmless async locale effect emitted an act warning after the assertion; the observed React child error and successful flat control are explicit.
Source:
- services/platform/app/features/contacts/components/contact-view-dialog.tsx:97
- services/platform/backend/domains/contacts/input-schema.ts:70
- services/platform/scripts/openapi/spec.ts:835
Deduplication: All-state contact address crash returned no matches; cached contact titles reviewed. This concerns supported address JSON reaching rendering, not malformed import parsing.
Acceptance: Cover the triggering boundary with a regression test, enforce the expected behavior, and retain the passing control.
Parent verification: independently reran the observation/control proof successfully; retained output: commerce-proof/parent-boundaries.log. Live all-state feature searches and related historical reports were reviewed before filing.
Activity
fix(platform): render any stored contact address in the details dialog
fix(platform): render any stored contact address in the details dialog
fix(platform): render any stored contact address in the details dialog