# Repair Hypothesis

Case: `crwa-mobile-date-range-drawer`

## Evidence Read

- Before screenshot: `./artifacts/crwa-mobile-date-range-drawer/failure.png`
- Browser trace: `./artifacts/crwa-mobile-date-range-drawer/trace.zip`
- DOM snapshot: `./artifacts/crwa-mobile-date-range-drawer/dom-snapshot.json`
- Accessibility tree: `./artifacts/crwa-mobile-date-range-drawer/ax-tree.json`

## Localization Hypothesis

The highest-confidence source candidate is `src/components/TransactionDateRangeFilter.tsx` with score `541`.
- Matches data-test hooks found in the captured DOM.
- File path/name matches the case vocabulary.

## Root-Cause Hypothesis

Two independent issues evidenced in console.ndjson: (1) one or more XState machines (likely the auth/transaction filter machines) still declare transient transitions using `{ on: { '': ... } }` instead of `{ always: ... }`; (2) the SvgCypressLogo component renders an SVG <stop> element with the kebab-case attribute `stop-color` rather than React's camelCase `stopColor`. Neither warning is conclusively tied to TransactionDateRangeFilter.tsx from the evidence alone, despite it being the top source candidate by data-test hook match.

## Patch Hypothesis

In SvgCypressLogo, rename `stop-color` to `stopColor` on the affected <stop> element(s) to clear the React DOM property warning. Separately, in the XState machine config(s) emitting the transient-transition warning, replace `on: { '': <target> }` with `always: <target>`. Scope the change to the offending machine and SVG component without restructuring the date range drawer.

Changed files:
- `src/components/TransactionDateRangeFilter.tsx`

## Verification Evidence

- Before-state negative control: `passing`
- Verification status: `passing`
- pass: date range drawer is visible
- pass: drawer close button is visible
- pass: calendar container is within the mobile viewport
- pass: calendar starts near top of the mobile viewport
- pass: no unexpected console errors appear during drawer verification

## Truth Boundary

This hypothesis is not proof by itself. The proof is the passing verification artifact plus the before/after browser evidence.
- Residual risk: Top candidate TransactionDateRangeFilter.tsx may not be the actual source of the XState warnings; fix could land in a different machine file.
- Residual risk: Multiple machines may share the deprecated pattern; a single patch might not silence all three warnings.
- Residual risk: Renaming SVG attributes could affect snapshot tests that capture serialized DOM.
- Residual risk: Console warnings are non-blocking; underlying drawer functionality on mobile is not validated by clearing them.
