Skip to content

fix: agent management UI fixes (permissions, parallelism, form validation)#750

Merged
wesbillman merged 4 commits into
mainfrom
agent-management-fixes
May 26, 2026
Merged

fix: agent management UI fixes (permissions, parallelism, form validation)#750
wesbillman merged 4 commits into
mainfrom
agent-management-fixes

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

Summary

Five agent management fixes:

  1. Any member can add bots to private channels — relay + DB now allow non-admin members to add bot-role users to private channels (owner/admin still required for human members)
  2. Owners can remove any non-owner member — previously owners could only remove bots; now matches admin behavior
  3. Default parallelism → 24 — both Rust constant and UI default updated
  4. MCP command field can be blank — backend now falls back to DEFAULT_MCP_COMMAND when empty string is submitted; UI validation removed
  5. Autocomplete off on agent form fields — added autoComplete="off" to all Input fields in CreateAgentDialogSections

Files Changed

Relay/DB (permissions):

  • crates/sprout-db/src/channel.rs — allow non-elevated inviters when target role is Bot
  • crates/sprout-relay/src/handlers/side_effects.rs — any channel member can add bots to private channels

Desktop (Rust):

  • desktop/src-tauri/src/commands/agent_models.rs — empty MCP command falls back to default
  • desktop/src-tauri/src/managed_agents/types.rsDEFAULT_AGENT_PARALLELISM 3 → 24

Desktop (UI):

  • desktop/src/features/channels/ui/ChannelMembersBar.tsx — show add-agent for open channels or members
  • desktop/src/features/channels/ui/MembersSidebar.tsx — owners can remove non-owner members
  • desktop/src/features/agents/ui/CreateAgentDialog.tsx — parallelism default "24"
  • desktop/src/features/agents/ui/EditAgentDialog.tsx — removed dead mcpCommandValid code
  • desktop/src/features/agents/ui/CreateAgentDialogSections.tsx — autoComplete="off"

Notes

  • The unused variable: app warning in discovery.rs:221 is pre-existing on main, not from this PR
  • Existing agents keep their stored parallelism; only new agents default to 24

…le comment

- Remove `mcpCommandValid = true` (always-true, dead code since the
  backend now handles empty → default for mcp_command)
- Remove mcpCommandValid from canSubmit conjunction
- Update the acpCommandValid comment to accurately describe the
  remaining validation (was referencing a stale 'no clear-to-None path'
  rationale that no longer applies)
@wesbillman wesbillman requested a review from a team as a code owner May 26, 2026 19:50
Previously only owner/admin could add members to private channels (with a
bot-only exception). Now any member can invite anyone, matching Slack's
behavior. Only elevated role grants (owner/admin) still require elevated
permissions.
Three new integration tests in e2e_relay.rs:
- test_private_channel_any_member_can_invite: verifies any member can
  invite others to a private channel (Slack model)
- test_private_channel_non_member_cannot_invite: verifies outsiders
  are rejected
- test_private_channel_member_cannot_grant_admin: verifies regular
  members cannot grant elevated (admin/owner) roles

Also fixes a bug found during testing: the elevated-role check was
only in the DB layer (which runs as a side effect after event storage),
not in validate_admin_event (the pre-validation gate). Moved the check
to validate_admin_event so events are properly rejected before storage.
@wesbillman wesbillman merged commit 7ac0466 into main May 26, 2026
16 checks passed
@wesbillman wesbillman deleted the agent-management-fixes branch May 26, 2026 20:39
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