fix(ui): auto-navigate to run page and refresh runs list after invoke
After clicking Invoke on the agent detail page, the heartbeats query is now invalidated so the runs list updates immediately. The existing navigate logic also ensures you're taken to the new run's page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -289,6 +289,7 @@ export function AgentDetail() {
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.agents.taskSessions(agentId!) });
|
||||
if (selectedCompanyId) {
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.agents.list(selectedCompanyId) });
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.heartbeats(selectedCompanyId, agentId!) });
|
||||
}
|
||||
if (action === "invoke" && data && typeof data === "object" && "id" in data) {
|
||||
navigate(`/agents/${agentId}/runs/${(data as HeartbeatRun).id}`);
|
||||
|
||||
Reference in New Issue
Block a user