multica/apps/web/features/realtime
Naiyuan Qing 240813c605 fix(web): add global WS handlers for per-issue cache invalidation
Per-issue WS events (comments, activities, reactions, subscribers) were
only handled by component-level useWSEvent hooks that unsubscribe on
unmount. With staleTime: Infinity, this left timeline/reactions/subscribers
caches silently stale — reopening an issue served cached data without
refetching, causing missing comments in inbox and issue detail views.

Add global fallback handlers in useRealtimeSync that invalidateQueries
for the affected issue on every per-issue WS event, ensuring caches are
marked stale even when IssueDetail is unmounted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:21:14 +08:00
..
hooks.ts fix(web): replace actor_id self-event filtering with idempotent cache updates 2026-04-08 13:57:24 +08:00
index.ts refactor(issues): extract hooks from issue-detail, eliminate dual source of truth 2026-03-31 13:09:17 +08:00
provider.tsx fix(web): replace actor_id self-event filtering with idempotent cache updates 2026-04-08 13:57:24 +08:00
use-realtime-sync.ts fix(web): add global WS handlers for per-issue cache invalidation 2026-04-08 15:21:14 +08:00