From 76473fa0df321bd8944bb4323e2880d8f237be1c Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 21:35:34 +0000 Subject: [PATCH 1/2] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- src/routes/admin.agente.$id.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/admin.agente.$id.tsx b/src/routes/admin.agente.$id.tsx index 76dce61..7ac6c74 100644 --- a/src/routes/admin.agente.$id.tsx +++ b/src/routes/admin.agente.$id.tsx @@ -91,11 +91,12 @@ function AgentDetailPage() { }, }); - const { data: agent, isLoading: agentLoading } = useQuery({ + const { data: agent, isLoading: agentLoading, error: agentError } = useQuery({ queryKey: ["agent-detail", id], enabled: !!isAdmin, refetchInterval: 10_000, queryFn: async () => { + console.log("[admin.agente] fetching agent detail", { id }); const { data, error } = await supabase .from("agent_instances") .select( From 1af3fa23d6fe4b92d80c3f3c5d433cad2356ed5d Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 21:35:42 +0000 Subject: [PATCH 2/2] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- src/routes/admin.agente.$id.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/routes/admin.agente.$id.tsx b/src/routes/admin.agente.$id.tsx index 7ac6c74..f4654d2 100644 --- a/src/routes/admin.agente.$id.tsx +++ b/src/routes/admin.agente.$id.tsx @@ -232,7 +232,12 @@ function AgentDetailPage() { } }, [roleLoading, isAdmin, navigate]); - if (authLoading || roleLoading || agentLoading) { + console.log("[admin.agente] render", { + id, authLoading, roleLoading, agentLoading, + isAdmin, hasUser: !!user, hasAgent: !!agent, agentError, + }); + + if (authLoading || roleLoading) { return (