Add edit dialog for managed agents with relay profile sync#277
Open
wpfleger96 wants to merge 3 commits intomainfrom
Open
Add edit dialog for managed agents with relay profile sync#277wpfleger96 wants to merge 3 commits intomainfrom
wpfleger96 wants to merge 3 commits intomainfrom
Conversation
1 task
13dd89e to
370ea44
Compare
Collaborator
|
@wpfleger96 I have some agent catalog stuff in flight here, so it might change the behavior of this. Let's check things again after that merges to see where we can improve. |
Collaborator
Author
|
@wesbillman np happy to wait until that's ready! |
Collaborator
|
@wpfleger96 excellent, the start of the catalog is in there now so feel free to take a look. Might not impact this work too much. Oh also, it's nice if you can drop an image or 2 in here (or a video) to see what this feature does for the reviewers |
a64f253 to
afaed41
Compare
Collaborator
|
@wpfleger96 is the #288 work similar to yours here? |
Collaborator
Think they are adjacent, but not overlapping. #288 is mostly for importing against "my" teams and agents. |
Once a managed agent was created, there was no way to change its configuration — system prompt, parallelism, relay URL, commands, timeouts, and name — without deleting and recreating it from scratch. Extends UpdateManagedAgentRequest on the Rust side to accept all editable fields with patch semantics (absent = don't touch), updates the update_managed_agent command handler to apply them, and mirrors the extended type on the frontend. Adds a useUpdateManagedAgentMutation hook following the existing mutation pattern, creates EditAgentDialog that reuses the CreateAgentDialogSections form components pre-populated with the agent's current values, and wires an "Edit" item into the AgentActionsMenu dropdown.
afaed41 to
e6c391c
Compare
useEffect deps included non-stable references (agent object, args array), causing form state to reset on every 5s background poll while the user was editing. Pin deps to [open, agent.pubkey]. Also: validate numeric fields in canSubmit, trim relayUrl before diff, hide Edit for provider-backed agents, and block empty acpCommand/mcpCommand submission.
e6c391c to
bd01f8f
Compare
update_managed_agent was fire-and-forget for name changes — the local record updated but the relay's kind:0 profile event was never re-published, making renames invisible in @mentions, DMs, and member lists. Reuses the existing sync_managed_agent_profile() path from agent creation to re-publish the kind:0 event when the name changes.
a365ffa to
1fae620
Compare
Collaborator
Author
Collaborator
Author
Collaborator
Author
Collaborator
Author
|
@wesbillman mind giving this another look if you get the chance? 😄 |
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.






This PR adds an Edit dialog for managed agents so configuration changes don't require delete-and-recreate, and syncs name changes to the relay so they're visible in @mentions, DMs, and member lists.
UpdateManagedAgentRequestonly patchedmodelandsystem_prompt. Name, parallelism, relay URL, agent command, MCP command, turn timeout, and toolsets were write-once at creation time. Renaming an agent updated the local record but never re-published the relay profile, making name changes invisible to other users.UpdateManagedAgentRequestintypes.rswith editable fields for all runtime config (parallelism, relay URL, commands, toolsets) using patch semanticsupdate_managed_agentasync; callsync_managed_agent_profile()to re-publish the kind:0 event when the name changes (best-effort — local save always succeeds, relay sync failure is logged and returned as a non-fatal warning)useUpdateManagedAgentMutationhook with optimistic cache update and invalidation onmanaged-agentsandrelay-agentsqueriesEditAgentDialog.tsxreusingCreateAgentBasicsFieldsandCreateAgentRuntimeFieldspre-populated with current values; diffs on submit to send only changed fields; includesmcpToolsetsfield from Add per-agent MCP toolset configuration to agent setup #279DropdownMenuItemwith aPencilicon intoAgentActionsMenuinManagedAgentRow.tsx(hidden for provider-backed agents)parallelism,turnTimeoutSeconds) and block clearing previously-setacpCommand/mcpCommandto empty strings