Files
skillshare/ui/src/hooks
Willie d60d739f55 refactor(ui): name the event behind each query invalidation
Which queries a mutation makes stale was knowledge each caller carried:
139 invalidateQueries calls in 48 files listed keys by hand, the lists
differed, and some used hand-written prefix keys such as ['sync-matrix']
that queryKeys could not express.

The key list of every event now lives once in lib/queryEvents.ts and call
sites say what happened: invalidate(queryClient, 'skillsUninstalled').
The three existing helpers (invalidateAfterSync, refreshTargets,
refreshInstructions) became events too. queryKeys gained the prefix keys
(syncMatrixAll, diffAll, logAll, logStatsAll) and every query key that was
written inline, so no key literal remains outside queryKeys.ts.

No call site's invalidated set changed. Each event is tested once against
a real QueryClient, including which queries it reaches by prefix.

Refs #445
2026-10-07 00:03:13 +08:00
..