fix: mention closure, onSettled invalidation, cleanup singleton
- Fix Tiptap mention: pass QueryClient via closure from ContentEditor instead of getQueryClient() singleton (resolves @mention empty list) - Add onSettled invalidation to useUpdateIssue (prevents cache drift with staleTime: Infinity + self-event WS filter) - Add cache shape comment to issueListOptions (select transforms ListIssuesResponse → Issue[], but cache stores raw response) - Memoize sidebar inbox dedup computation - Remove dead getQueryClient/setQueryClient singleton + window property - Remove ActorSync component and _members/_agents Zustand mirror (superseded by closure approach) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e40341ab73
commit
6032b5dfcb
9 changed files with 28 additions and 27 deletions
|
|
@ -1,7 +1,5 @@
|
|||
import { QueryClient } from "@tanstack/react-query";
|
||||
|
||||
let _queryClient: QueryClient | null = null;
|
||||
|
||||
export function createQueryClient(): QueryClient {
|
||||
return new QueryClient({
|
||||
defaultOptions: {
|
||||
|
|
@ -18,14 +16,3 @@ export function createQueryClient(): QueryClient {
|
|||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** Called by QueryProvider on mount to register the singleton. */
|
||||
export function setQueryClient(client: QueryClient) {
|
||||
_queryClient = client;
|
||||
}
|
||||
|
||||
/** Access QueryClient outside React tree (WS handlers, Zustand actions). */
|
||||
export function getQueryClient(): QueryClient {
|
||||
if (!_queryClient) throw new Error("QueryClient not initialized");
|
||||
return _queryClient;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue