veza/apps/web/src/utils
senke 057a1b5523 data-flow: create React Query sync utility for cross-tab cache sync
- Created reactQuerySync.ts with setupReactQuerySync() function
- Uses BroadcastChannel API to sync cache updates across browser tabs
- Subscribes to QueryClient mutation cache to broadcast mutation successes
- Subscribes to QueryClient query cache to broadcast query invalidations
- Implements message deduplication using message IDs and processed messages Set
- Implements tab ID tracking to avoid processing messages from same tab
- Handles three message types: query-invalidate, query-set-data, mutation-success
- Includes shouldSync filter function for selective synchronization
- Includes cleanup function to stop synchronization
- Focuses on invalidations and mutations (not every query update) for performance
- Comprehensive error handling and logging
- Action 2.3.1.1 complete - utility ready for integration
2026-01-15 17:55:06 +01:00
..
apiErrorHandler.test.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
apiErrorHandler.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
apiToastHelper.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
apiToastHelper.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
broadcastSync.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
csp.ts stabilizing apps/web: FIRST BATCH 2025-12-17 08:07:35 -05:00
date.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
date.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
errorMessages.test.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
errorMessages.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
format.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
format.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
formValidation.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
idNormalization.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
idNormalization.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
logger.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
logger.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
networkErrorTracker.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
offlineDetection.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
optimisticStoreUpdates.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
optimisticUpdates.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
reactQuerySync.ts data-flow: create React Query sync utility for cross-tab cache sync 2026-01-15 17:55:06 +01:00
reportIssue.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
sanitize.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
sanitize.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
serviceErrorHandler.test.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
serviceErrorHandler.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
stateHydration.ts state-ownership: replace all useAuthStore().user with useUser() hook 2026-01-14 01:45:42 +01:00
stateInvalidation.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
stateMiddleware.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
stateMiddleware.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
stateNormalization.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
storeSelectors.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
timeoutHandler.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
timeoutHandler.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
typeGuards.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
typeGuards.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
undoRedo.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
url.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
url.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
validation.test.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
validation.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00