From 8873dd793f16956c73cc646dc664b6ab282c6eeb Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 3 Mar 2026 10:09:15 -0600 Subject: [PATCH] fix(ui): fix config save button persisting after save on agent configure page The parent query for agent detail uses routeAgentRef (URL key like "claudecoder") in its cache key, but ConfigurationTab and rollbackConfig only invalidated by agent.id (UUID). This meant the refetch never fired when navigating by URL key, so the dirty overlay was never cleared and the save button stayed visible indefinitely. Add urlKey-based invalidation to match the pattern already used by other mutations in the parent component. Co-Authored-By: Claude Opus 4.6 --- ui/src/pages/AgentDetail.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/src/pages/AgentDetail.tsx b/ui/src/pages/AgentDetail.tsx index c0c51928..9243bc2b 100644 --- a/ui/src/pages/AgentDetail.tsx +++ b/ui/src/pages/AgentDetail.tsx @@ -1057,6 +1057,7 @@ function AgentConfigurePage({ mutationFn: (revisionId: string) => agentsApi.rollbackConfigRevision(agent.id, revisionId, companyId), onSuccess: () => { queryClient.invalidateQueries({ queryKey: queryKeys.agents.detail(agent.id) }); + queryClient.invalidateQueries({ queryKey: queryKeys.agents.detail(agent.urlKey) }); queryClient.invalidateQueries({ queryKey: queryKeys.agents.configRevisions(agent.id) }); }, }); @@ -1161,6 +1162,7 @@ function ConfigurationTab({ mutationFn: (data: Record) => agentsApi.update(agent.id, data, companyId), onSuccess: () => { queryClient.invalidateQueries({ queryKey: queryKeys.agents.detail(agent.id) }); + queryClient.invalidateQueries({ queryKey: queryKeys.agents.detail(agent.urlKey) }); queryClient.invalidateQueries({ queryKey: queryKeys.agents.configRevisions(agent.id) }); }, });