Skip to content

fix(desktop): surface relay profile-sync failure on agent rename#2302

Open
Bartok9 wants to merge 1 commit into
block:mainfrom
Bartok9:bartok9/rename-profile-sync-feedback
Open

fix(desktop): surface relay profile-sync failure on agent rename#2302
Bartok9 wants to merge 1 commit into
block:mainfrom
Bartok9:bartok9/rename-profile-sync-feedback

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 21, 2026

Copy link
Copy Markdown

Refs #1822

Problem

Renaming an agent runs two phases in update_managed_agent:

  1. Local save (disk write + AGENTS.md regen) — synchronous, always succeeds.
  2. Relay profile sync — async kind:0 republish with the new display_name. This can fail (network blip, auth expiry, relay unreachable).

The Tauri command already returns profile_sync_error: Option<String>, but the edit dialog's success handler only console.warn-ed it and then closed the dialog as if the rename fully succeeded. The user had no way to know the relay still advertised the old name (and old @mention handle) — a silent, confusing partial failure.

Fix

Surface profileSyncError with a warning toast:

<agent> saved locally, but relay profile sync failed: <error>

This matches how the create flow (useManagedAgentActions / SecretRevealDialog) and the persona flow (usePersonaActions) already surface the same field. Local-save behavior is unchanged; the dialog still closes (the save did happen) but the user is now told the relay is stale and can retry.

How to test

  • pnpm typecheck — clean
  • pnpm exec biome check on the file — clean

Manual: rename an agent while the relay is unreachable → a warning toast reports the profile-sync failure instead of the rename appearing fully successful.

Scope

Just the missing user feedback for the profile-sync seam. The separate, larger issue of notifying running agents mid-session about the rename (#1823) is intentionally out of scope.

Signed-off-by DCO.

@Bartok9
Bartok9 requested a review from a team as a code owner July 21, 2026 22:09
@Bartok9
Bartok9 force-pushed the bartok9/rename-profile-sync-feedback branch from 41a2797 to dd70b9a Compare July 21, 2026 22:12
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 (block#1822).

Surface it with a warning toast — matching the create and persona flows,
which already toast `profileSyncError`. Local-save behavior is unchanged.

Refs block#1822

Signed-off-by: Bartok9 <danielrpike9@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant