Skip to content

Add agent lifecycle controls to channel members sidebar#291

Merged
wesbillman merged 10 commits intomainfrom
rick/channel-agent-controls
Apr 10, 2026
Merged

Add agent lifecycle controls to channel members sidebar#291
wesbillman merged 10 commits intomainfrom
rick/channel-agent-controls

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

@wesbillman wesbillman commented Apr 10, 2026

Summary

  • Add per-bot lifecycle controls (stop/respawn/spawn) and bulk actions (spawn-all, stop-all, remove-all) to the channel members sidebar via 3-dot dropdown menus
  • Extract shared managed-agent control rules (managedAgentControlActions.ts) so the Agents view and sidebar use the same start/stop/delete logic
  • Multi-channel orphan check: removing a bot from one channel only deletes its managed-agent record when it has no remaining channel memberships
  • 4 new E2E tests covering respawn, bulk remove, multi-channel orphan safety, and permission gating

Test plan

  • Open a channel with managed bots, verify the 3-dot menu appears on hover for each member row
  • Stop a running bot via the per-row menu, verify status updates to "Stopped"
  • Respawn a stopped bot, verify status returns to "Running"
  • Use bulk "Remove all from channel" via the Bots section header menu
  • Remove a bot from one channel when it's in multiple channels — verify managed agent record persists
  • Remove the same bot from its last channel — verify managed agent record is cleaned up
  • Verify bulk remove/stop/spawn actions work from the Bots header ⋯ menu
  • Run pnpm test:e2e to validate all E2E tests pass

🤖 Generated with Claude Code

wesbillman and others added 7 commits April 10, 2026 11:27
Per-bot stop/respawn actions and bulk spawn-all/stop-all/remove-all
controls in the members sidebar. Shared managed-agent control rules
extracted so AgentsView and the sidebar use the same start/stop/delete
logic. Multi-channel orphan check prevents premature managed-agent
record deletion. E2E coverage for respawn, bulk remove, multi-channel
orphan, and permission gating.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Drop card borders in favor of hover backgrounds, replace UserMinus
icon with X for remove actions, show per-bot action buttons on hover
only, use ghost variant with consistent muted-foreground styling, and
shrink icon buttons to h-7/w-7 with h-3.5 icons for a lighter feel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Give both the header bulk controls and per-row action containers the
same fixed width (5.75rem = 3 buttons + 2 gaps) with justify-end, so
the X/remove buttons form a clean right-aligned column.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace inline icon buttons on each member row with a single 3-dot
(Ellipsis) dropdown menu matching the AgentActionsMenu pattern from
ManagedAgentRow. Bot rows show lifecycle action (stop/respawn/spawn)
and remove; people rows show remove. Eliminates the alignment problem
between header bulk buttons and per-row actions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the 3 inline icon buttons (spawn-all, stop-all, remove-all)
in the Bots section header with a single 3-dot dropdown menu,
consistent with the per-row member action menus. Remove the now-unused
MembersSidebarIconButton component and TooltipProvider wrapper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Ellipsis trigger is hidden by default (opacity-0) and fades in on
row hover (group-hover:opacity-100) or when the menu is open
(data-[state=open]:opacity-100).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wesbillman
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-04-10 at 12 03 49 PM Screenshot 2026-04-10 at 12 03 56 PM Screenshot 2026-04-10 at 12 04 03 PM

wesbillman and others added 3 commits April 10, 2026 12:19
The 3-dot trigger has opacity-0 by default and only becomes visible
on row hover. Playwright considers opacity-0 elements not actionable,
so we must hover the row first. Extract openMemberMenu helper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace hover-then-click with force:true click to bypass Playwright's
opacity actionability check. The element exists in the DOM and is
clickable — it's just visually hidden until hover. force:true is more
reliable in CI where hover timing can be flaky.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- openMemberMenu: scroll into view, hover row, then open via keyboard
  (focus + Enter) to work around @radix-ui/react-dropdown-menu@2.1.16
  ignoring pointer re-opens after onCloseAutoFocus
- Add data-channel-id to sidebar channel buttons so tests can read UUIDs
- Fix command count expectations in multi-channel orphan test (delta-based)
- Rewrite "bulk remove" test to use a relay-observed bot (alice) the user
  doesn't manage, with accurate comments about hasControllableManagedBots

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wesbillman wesbillman merged commit e333371 into main Apr 10, 2026
9 checks passed
@wesbillman wesbillman deleted the rick/channel-agent-controls branch April 10, 2026 23:08
tlongwell-block added a commit that referenced this pull request Apr 11, 2026
…ona-migration

* origin/main:
  feat(desktop): add Pulse social notes surface (#296)
  Fix flaky desktop smoke tests (#294)
  Add agent lifecycle controls to channel members sidebar (#291)
  Update nest_agents.md tagging info (#292)
  feat: add Sprout nest — persistent agent workspace at ~/.sprout (#290)
  Fix auth and SSRF vulns (#261)
  Add per-agent MCP toolset configuration to agent setup (#279)
  feat(desktop): team & persona import/edit flows (#288)
  Remove menu item subtitles and fix persona card overflow (#289)
  feat: Phase 1 video upload support (Blossom-compliant-ish) (#285)
  Add inline subtitles to menu items and field descriptions (#276)
  Improve ephemeral channel affordances and hide archived sidebar rows (#286)
  Fix @mention search to use word-boundary prefix matching (#278)
  Allow bot owners to remove their agents from any channel (#284)
  [codex] Polish agent selectors and settings layout (#283)

# Conflicts:
#	desktop/scripts/check-file-sizes.mjs
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