mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 20:03:37 +00:00
fix(ui): improve React Query hooks and fix edge cases
- Update query keys to include all relevant parameters (branches, agents) - Fix use-branches to pass includeRemote parameter to query key - Fix use-settings to include sources in agents query key - Update running-agents-view to use correct query key structure - Update use-spec-loading to properly use spec query hooks - Add missing queryClient invalidation in auto-mode mutations - Add missing cache invalidation in spec mutations after creation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,8 @@ export const queryKeys = {
|
||||
single: (projectPath: string, featureId: string) =>
|
||||
['worktrees', projectPath, featureId] as const,
|
||||
/** Branches for a worktree */
|
||||
branches: (worktreePath: string) => ['worktrees', 'branches', worktreePath] as const,
|
||||
branches: (worktreePath: string, includeRemote = false) =>
|
||||
['worktrees', 'branches', worktreePath, { includeRemote }] as const,
|
||||
/** Worktree status */
|
||||
status: (projectPath: string, featureId: string) =>
|
||||
['worktrees', projectPath, featureId, 'status'] as const,
|
||||
@@ -86,7 +87,8 @@ export const queryKeys = {
|
||||
/** Credentials (API keys) */
|
||||
credentials: () => ['settings', 'credentials'] as const,
|
||||
/** Discovered agents */
|
||||
agents: (projectPath: string) => ['settings', 'agents', projectPath] as const,
|
||||
agents: (projectPath: string, sources?: Array<'user' | 'project'>) =>
|
||||
['settings', 'agents', projectPath, sources ?? []] as const,
|
||||
},
|
||||
|
||||
// ============================================
|
||||
|
||||
Reference in New Issue
Block a user