docs(specs): plan frontend query remediation
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
## Why
|
||||
|
||||
Frontend declares custom React Query keys before generated API options, so the generated key silently wins. Mutations and consumers then update a different cache entry, while the documented strict TypeScript invariant is not enforced by the project configuration.
|
||||
|
||||
## What Changes
|
||||
|
||||
- Establish one exported, generated cache identity for each frontend query whose cache is consumed or invalidated outside its hook.
|
||||
- Make successful T-Bank connection replacement and deletion update the same status cache and invalidate the same brokerage-account cache that the UI reads.
|
||||
- Remove duplicate query-key declarations from the remaining generated query hooks while preserving their request parameters and caching policies.
|
||||
- Enable TypeScript strict mode for application and Vite tooling compilation, resolve the current strict diagnostics with explicit state narrowing, and keep the existing typecheck command as the executable gate.
|
||||
- Add regression tests for the T-Bank connection cache lifecycle and the affected query behavior.
|
||||
|
||||
## Capabilities
|
||||
|
||||
### New Capabilities
|
||||
- `frontend-query-coherence`: Ensures frontend query consumers and mutations use the generated cache identity of the data they read.
|
||||
|
||||
### Modified Capabilities
|
||||
- `project-foundation`: Makes strict TypeScript compilation a required local frontend quality invariant.
|
||||
|
||||
## Impact
|
||||
|
||||
Affected frontend modules are the generated-query hooks for brokerage accounts, operations, events, portfolio and T-Bank connection; the T-Bank connection mutation UI; the account view model; account/events/operations page type narrowing; colocated frontend tests; and frontend TypeScript configuration. `docs/development/audit-remediation.md` tracks the change as active and will receive completion evidence. The backend API, persisted data, OpenAPI schema and dependency set do not change.
|
||||
Reference in New Issue
Block a user