From 00664acc5325ed6aa026f90b89887b863ece2cd1 Mon Sep 17 00:00:00 2001 From: Bartok9 Date: Wed, 22 Jul 2026 10:33:28 -0400 Subject: [PATCH] fix(desktop): surface relay profile-sync failure on agent rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When renaming an agent, the local save (disk + AGENTS.md) always succeeds, but the async relay kind:0 profile republish can fail (network blip, auth expiry, relay unreachable). The edit dialog only `console.warn`-ed that error and closed as if the rename fully succeeded, so the user never learned the relay still had the old name/@mention handle (#1822). Surface it with a warning toast — matching the create and persona flows, which already toast `profileSyncError`. Local-save behavior is unchanged. Refs #1822 Signed-off-by: Bartok9 --- .../features/agents/ui/AgentInstanceEditDialog.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx b/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx index ec19f4ef8a..4a952e1903 100644 --- a/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx +++ b/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx @@ -726,6 +726,17 @@ export function AgentInstanceEditDialog({ autoRestartOnConfigChange, ); } + if (result.profileSyncError) { + // The local save (disk + AGENTS.md) already succeeded, but the relay + // still has the old kind:0 profile (e.g. old @mention name). Surface + // it instead of silently closing — otherwise the dialog closes as if + // the rename fully succeeded and the user never learns the relay is + // stale (#1822). Matches the create/persona flows, which already toast + // profileSyncError. + toast.warning( + `${result.agent.name} saved locally, but relay profile sync failed: ${result.profileSyncError}`, + ); + } handleOpenChange(false); onUpdated?.(result.agent); // The auto-restart policy deliberately never fires for a stopped or