fix: use upstream query selector error handling
Summary
- Upgrade
@tanstack/react-queryand@tanstack/query-corefrom 5.105.3 to 5.107.1, which includes the upstream selector-error timestamp fix. - Restore
select: validateSpendBreakdownin dashboard and admin spend breakdowns. Remove query-function wrappers, custom retry overrides, and the admin validation-error wrapper introduced in #9089. - Retain advancing-clock regressions and retry/recovery tests. Remove raw-cache retention assertions: validation once again applies to observer results, while the UI retains the last valid estimates.
Motivation
The workaround in #9089 addressed an already-reported upstream regression: TanStack/query#12532, fixed by TanStack/query#12540. A standalone reproduction fails on 5.105.3 and passes on 5.107.1 with the same advancing clock. Use the library fix rather than maintaining duplicate error/retry handling in the application.
Validation
- Independent pinned-version reproduction: 5.105.3 fails, 5.107.1 passes. This isolated reproduction uses happy-dom and an advancing clock; no real-browser claim.
- Full dashboard suite: 10,334 tests passed; full admin suite: 2,191 tests passed.
- Production workspace build, client lint, all workspace type-checks, dashboard knip, and both consent builds passed.
- Pinned Impeccable scan passed; root
aube auditfound no known vulnerabilities. - React peer requirements are unchanged; lockfile changes are limited to React Query/query-core.
- Independent code review approved.
Gutternote review steps
No intended visual or workflow changes; this restores existing selector validation using the upstream fix. Error-path behavior is covered by deterministic component tests, not a new screenshot.
No Admin/Platform MCP, API, permissions, or demo-seed changes: this is client-side query handling only.
Summary by cubic
Replaces the selector-validation workaround from #9089 with the upstream fix in @tanstack/react-query 5.107.1. Restores select: validateSpendBreakdown in the admin and dashboard spend breakdowns and removes the query-function wrappers, custom retry overrides, and validation-error classes.
Validation
- Bumps
@tanstack/react-queryand@tanstack/query-coreto 5.107.1, which includes the upstream selector-error fix (TanStack/query#12532). - Removes raw-cache retention assertions since validation now applies to observer results; the UI still keeps the last valid estimates.
🚀 Preview Environment (PR #9161)
Preview URL: https://pr-9161.dev.getgram.ai
| Component | Status | Details | Updated (UTC) |
|---|---|---|---|
| ✅ Database | Ready | Created and validated | 2026-11-16 23:20:06. |
| ✅ Images | Available | Container images ready | 2026-11-16 23:20:26. |
Gram Preview Bot