Skip to content

feat(desktop): add agent teams - #132

Merged
wesbillman merged 1 commit into
mainfrom
feat/agent-teams
Mar 20, 2026
Merged

feat(desktop): add agent teams#132
wesbillman merged 1 commit into
mainfrom
feat/agent-teams

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

Add Agent Teams — named groups of personas that can be batch-deployed to channels.

What's new

Backend (Rust/Tauri)

  • TeamRecord type with id, name, description, persona_ids, timestamps
  • managed_agents/teams.rs — JSON storage with sort and unit tests
  • commands/teams.rs — full CRUD: list_teams, create_team, update_team, delete_team
  • Wired into lib.rs invoke handler

Frontend — Agents Settings Page

  • tauriTeams.ts API layer
  • React Query hooks (useTeamsQuery, useCreateTeamMutation, etc.)
  • TeamsSection.tsx — team cards with persona avatar pills, dropdown menu
  • TeamDialog.tsx — create/edit dialog with persona multi-select checkboxes
  • TeamDeleteDialog.tsx — confirmation dialog
  • AddTeamToChannelDialog.tsx — deploy all team personas to a channel at once
  • useTeamActions.ts — extracted hook to keep AgentsView under file size limit

Frontend — Add Agent Dialog (channel-level)

  • AddChannelBotTeamsSection.tsx — team toggle chips in the "Add agents" dialog
  • Click a team chip → all its personas get selected/deselected. One click, whole squad.

Architecture

  • Teams are local-only (stored in Tauri app data as teams.json, same pattern as personas)
  • A team is a named list of persona IDs
  • "Deploy team to channel" reuses the existing createChannelManagedAgents batch flow
  • No relay or backend server changes needed

Quality

  • TypeScript: zero errors
  • Biome lint/format: zero errors
  • Rust cargo check + clippy: passes
  • Unit tests: all pass (including 3 new team sort tests)
  • File size limits: all pass
  • No unwrap()/expect() in Rust, no any types in TypeScript

Files changed (18)

File Change
src-tauri/src/managed_agents/types.rs TeamRecord, CreateTeamRequest, UpdateTeamRequest
src-tauri/src/managed_agents/teams.rs Storage: load, save, sort + unit tests
src-tauri/src/commands/teams.rs CRUD commands
src-tauri/src/commands/mod.rs Wire teams module
src-tauri/src/managed_agents/mod.rs Wire teams module
src-tauri/src/lib.rs Register 4 team commands
src/shared/api/types.ts AgentTeam, CreateTeamInput, UpdateTeamInput
src/shared/api/tauriTeams.ts Tauri API layer
src/features/agents/hooks.ts Team query + mutation hooks
src/features/agents/ui/useTeamActions.ts Extracted team state hook
src/features/agents/ui/TeamsSection.tsx Team cards grid
src/features/agents/ui/TeamDialog.tsx Create/edit dialog
src/features/agents/ui/TeamDeleteDialog.tsx Delete confirmation
src/features/agents/ui/AddTeamToChannelDialog.tsx Deploy-to-channel dialog
src/features/agents/ui/AgentsView.tsx Wire teams into settings page
src/features/channels/ui/AddChannelBotTeamsSection.tsx Team toggle chips
src/features/channels/ui/AddChannelBotDialog.tsx Wire team chips
scripts/check-file-sizes.mjs AgentsView 575-line exception

@wesbillman

Copy link
Copy Markdown
Collaborator Author
Screenshot 2026-03-20 at 11 18 23 AM

Add the ability to create, edit, and delete agent teams — named groups
of personas that can be batch-deployed to channels.

Backend (Rust/Tauri):
- TeamRecord, CreateTeamRequest, UpdateTeamRequest types
- teams.rs storage module with load/save/sort and unit tests
- CRUD Tauri commands: list_teams, create_team, update_team, delete_team
- Wired into commands/mod.rs and lib.rs invoke handler

Frontend (React/TypeScript):
- AgentTeam, CreateTeamInput, UpdateTeamInput types
- tauriTeams.ts API layer
- useTeamsQuery, useCreateTeamMutation, useUpdateTeamMutation,
  useDeleteTeamMutation hooks
- TeamsSection with team cards showing persona avatar pills
- TeamDialog with persona multi-select checkboxes
- TeamDeleteDialog confirmation
- AddTeamToChannelDialog for deploying a team to a channel
- AddChannelBotTeamsSection for one-click team selection in the
  existing Add Agent dialog
- useTeamActions hook extracting team state from AgentsView
- All wired into AgentsView.tsx and AddChannelBotDialog.tsx
@wesbillman
wesbillman merged commit 107bf5a into main Mar 20, 2026
8 checks passed
@wesbillman
wesbillman deleted the feat/agent-teams branch March 20, 2026 21:32
tlongwell-block added a commit that referenced this pull request Mar 20, 2026
…viders

* origin/main:
  feat(desktop): add agent teams (#132)
tlongwell-block added a commit that referenced this pull request Mar 20, 2026
Picks up feat(desktop): add agent teams (#132).
Bumps AgentsView.tsx file-size override to 650 (teams added ~90 lines).
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