You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lib/query/keys.ts already defines a well-structured key factory — good foundation. What is missing is consistent invalidation on mutation, so stale data lingers after edits.
Tasks
Extend the key factory to cover transfers, notifications, locations, and inventory as those land.
Set sensible global defaults (staleTime, retry, refetchOnWindowFocus) in the query provider.
Add optimistic updates with rollback for high-frequency mutations: status change, assign, mark notification read, add note.
Invalidate every affected key after a mutation — approving a transfer must refresh the transfer list, the asset detail, the asset history, and dashboard counts.
Add prefetching on hover for list → detail navigation.
Document the conventions so contributors follow them.
Acceptance Criteria
Mutations update the UI immediately and roll back cleanly on error.
No stale list remains after a create, update, or delete.
All query keys come from the factory — no inline key arrays.
Overview
lib/query/keys.tsalready defines a well-structured key factory — good foundation. What is missing is consistent invalidation on mutation, so stale data lingers after edits.Tasks
staleTime,retry,refetchOnWindowFocus) in the query provider.Acceptance Criteria
Notes for Contributors
Comment below to be assigned.