multica/apps/web/core
Naiyuan Qing 99dad49052 fix(core): add onSettled invalidation to all optimistic mutations + enable refetchOnReconnect
P0: Add onSettled: invalidateQueries to 10 mutations that had onMutate
optimistic updates but no server confirmation. With staleTime: Infinity,
missing onSettled means cache could permanently drift from server state.

Mutations fixed:
- useDeleteIssue, useBatchDeleteIssues (issue list)
- useUpdateComment, useDeleteComment, useToggleCommentReaction (timeline)
- useToggleIssueReaction (reactions)
- useToggleIssueSubscriber (subscribers)
- useMarkInboxRead, useArchiveInbox, useMarkAllInboxRead (inbox)

P2: Change refetchOnReconnect from false to true as safety net
for HTTP reconnection before WS reconnection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 19:07:37 +08:00
..
inbox fix(core): add onSettled invalidation to all optimistic mutations + enable refetchOnReconnect 2026-04-07 19:07:37 +08:00
issues fix(core): add onSettled invalidation to all optimistic mutations + enable refetchOnReconnect 2026-04-07 19:07:37 +08:00
runtimes feat(core): migrate workspace + runtimes to TanStack Query (Phase 3+4) 2026-04-07 17:19:52 +08:00
workspace feat(core): migrate workspace + runtimes to TanStack Query (Phase 3+4) 2026-04-07 17:19:52 +08:00
hooks.ts feat(web): add TanStack Query infrastructure (Phase 0) 2026-04-07 14:43:51 +08:00
index.ts fix: mention closure, onSettled invalidation, cleanup singleton 2026-04-07 17:53:49 +08:00
provider.tsx fix: mention closure, onSettled invalidation, cleanup singleton 2026-04-07 17:53:49 +08:00
query-client.ts fix(core): add onSettled invalidation to all optimistic mutations + enable refetchOnReconnect 2026-04-07 19:07:37 +08:00