2.3 KiB
2.3 KiB
1. Regression coverage for cache coherence
- 1.1 Add a colocated
TbankConnectionSectionintegration test with a realQueryClient, mocked authenticated user and MSW responses; cover successful PUT and DELETE, assert the visible connection status changes, and assert the generated Brokerage Accounts cache entry is invalidated. - 1.2 Extend affected query-hook tests only where needed to prove operations and portfolio requests still reach their generated endpoint with the existing parameters, stale times and retry policy.
2. Single-owner query identity
- 2.1 Refactor
useBrokerageAccounts.tsto derive and export the generated Brokerage Accounts query key from its owner, then updateuseAccountPageViewModel.tsand the T-Bank connection mutation UI to consume that exported identity. - 2.2 Refactor
useTbankConnectionViewModelso its read query and successful PUT/DELETE handlers use the same generated connection-status identity. - 2.3 Remove conflicting local query-key overrides from the operations, events and portfolio hooks while retaining their generated request initialization, enabled predicates, stale times and retry policies.
- 2.4 Run the new T-Bank connection integration test and affected query-hook tests; confirm the pre-change cache-lifecycle regression is resolved without changing API requests.
3. Strict TypeScript contract
- 3.1 Enable
strictintsconfig.app.jsonandtsconfig.node.json. - 3.2 Resolve every resulting application diagnostic in the T-Bank connection feature and account events/operations pages through explicit null/error/state narrowing; preserve current loading, error, empty and loaded UI behavior without unsafe assertions or broad casts.
- 3.3 Run
npm run typecheckand confirm strict compilation succeeds for both application and Vite tooling source.
4. Completion evidence and audit tracking
- 4.1 Run
npm run verifyandopenspec validate stabilize-frontend-query-and-strict-contracts --type change --store wealth-ledger-specs; record their exact successful results. - 4.2 Update
docs/development/audit-remediation.md: mark WL-P1-01 and WL-P1-02 done only after all implementation and verification tasks pass, include date, archive path, commits and exact non-mutating checks, then choose the next single recommended change.