fix(desktop): surface agent rename relay profile sync failure as a warning toast#2279
Open
ayobamiseun wants to merge 1 commit into
Open
fix(desktop): surface agent rename relay profile sync failure as a warning toast#2279ayobamiseun wants to merge 1 commit into
ayobamiseun wants to merge 1 commit into
Conversation
…rning toast When renaming an agent, update_managed_agent saves locally (record + AGENTS.md) and then best-effort republishes the kind:0 profile to the relay. On sync failure the edit dialog only console.warn'd the error and closed as if the save fully succeeded, so the relay silently kept the old display name — breaking @mention resolution and showing the stale name to other agents until the next profile reconcile. Toast a warning instead (matching the create/persona paths, which already surface profileSyncError) and point the user at the working retry path: re-saving the same name skips the sync (name_changed compares against the already-updated record), but starting the agent re-syncs via reconcile_agent_profile. Fixes block#1822 Signed-off-by: ayobamiseun <adegokeayobamiseun@gmail.com>
ayobamiseun
force-pushed
the
fix/agent-rename-profile-sync-toast
branch
from
July 22, 2026 08:58
8e49a0a to
3edab6b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1822
Problem
Renaming an agent via the agent settings dialog performs a local save (always succeeds) and a best-effort relay kind:0 republish (can fail: network blip, auth expiry, relay unreachable). On sync failure the dialog
console.warn'd the error and closed as a clean success — the user had no signal that the relay still holds the old name, which breaks@mentionresolution and shows the stale name in other agents'From:lines (discovered via #1743).Fix
Surface
profileSyncErroras atoast.warninginAgentInstanceEditDialog, matching the treatment the create and persona-save paths already give the same field (useManagedAgentActions.ts,UserProfilePanelPersonaSubmit.ts). The save is not blocked — the local rename is valid and persists, per the issue's guidance.The toast points at the retry path that actually works: restarting the agent. Re-saving the same name does not retry —
update_managed_agentcomputesname_changedagainst the already-updated record, so a second identical save skips the sync — butstart_managed_agentfiresreconcile_agent_profile, which queries the relay's kind:0 and republishes when the display name diverges.Scope notes:
EditRespondToDialog(the third caller of the update mutation) never changes the name, and the Rust side only setsprofile_sync_errorwhen the name changed — so no change needed there.sync_managed_agent_profile) is not taken here;reconcile_agent_profileon agent start already provides self-healing, and this change makes that path discoverable at the moment of failure.Testing
just desktop-check— biome + file-size + px-text + pubkey-truncation guards clean.just desktop-test— 3331 passed, 0 failed..test.mjsconvention covers extracted pure logic, and there is no extracted logic here to unit-test (consistent with the equivalent toast branches on the create/persona paths).