Context
Per review comment on #184 by @svozza: the hand-rolled useProjectsCache hook (~200 lines) manually implements stale-while-revalidate, dedup, TTL, and error states. A library like Tanstack Query or SWR provides all of this out of the box with devtools, retry, prefetch, and garbage collection.
Expected outcome
- Replace
useProjectsCache.ts with Tanstack Query hooks
- Reduce cache boilerplate by ~50%
- All consumers (
AppSidebar, Dashboard, Project, ObservabilityLayout) updated
- Behavior unchanged: stale-while-revalidate, 120s TTL projects, 60s sprints
Notes
- Tanstack Query is tree-shakeable and ~12kB gzipped
- This is a refactor, no user-facing behavior change
Context
Per review comment on #184 by @svozza: the hand-rolled
useProjectsCachehook (~200 lines) manually implements stale-while-revalidate, dedup, TTL, and error states. A library like Tanstack Query or SWR provides all of this out of the box with devtools, retry, prefetch, and garbage collection.Expected outcome
useProjectsCache.tswith Tanstack Query hooksAppSidebar,Dashboard,Project,ObservabilityLayout) updatedNotes