From b16e0553cfe969d82a13dcbd105cc34b85b57745 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 17:58:04 +0000 Subject: [PATCH] Changes Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com> --- src/routes/painel.cronjobs.$id.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/routes/painel.cronjobs.$id.tsx b/src/routes/painel.cronjobs.$id.tsx index a7809d9..fc10478 100644 --- a/src/routes/painel.cronjobs.$id.tsx +++ b/src/routes/painel.cronjobs.$id.tsx @@ -88,12 +88,11 @@ function CronjobDetailPage() { async function remove() { try { - await deleteMut.mutateAsync(job!.id); - toast.success("Excluída."); - - const { error: syncError } = await syncAgentRuntime(job!.agent_instance_id, "cronjobs"); - if (syncError) { - toast.warning("Automação removida, mas o runtime do agente não sincronizou."); + const result = await deleteMut.mutateAsync(job!.id); + if (result.runtime_sync_warning) { + toast.warning("Excluída do painel; limpeza final do runtime pendente."); + } else { + toast.success("Excluída."); } navigate({ to: "/painel/cronjobs" });