Skip to content

refactor(desktop): consolidate packs into teams#852

Merged
wpfleger96 merged 1 commit into
mainfrom
wpfleger/wire-pack-management
Jun 10, 2026
Merged

refactor(desktop): consolidate packs into teams#852
wpfleger96 merged 1 commit into
mainfrom
wpfleger/wire-pack-management

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Renames the internal "packs" concept to "teams" across the desktop app and replaces pack installation with directory-backed team management. This consolidates the data model, migration path, backend operations, and the full team management UI into a single change.

Backend

Type renames (with serde aliases for backward compat):

  • PersonaRecord: source_packsource_team, source_pack_persona_slugsource_team_persona_slug
  • ManagedAgentRecord: persona_pack_pathpersona_team_dir, persona_name_in_packpersona_name_in_team
  • TeamRecord: add source_dir, is_symlink, symlink_target, version fields

New team operations (teams.rs):

  • import_team_from_directory() — copy or symlink a directory into team storage, validate and re-validate after install
  • delete_team_with_cascade() — remove directory and personas for directory-backed teams
  • sync_team_from_dir() — reconcile directory changes with stored records (add/remove/update personas, update metadata)

Migration (migration.rs):

  • migrate_packs_to_teams() — one-time on-launch migration: renames agents/packs/agents/teams/, rewrites field names in personas.json and managed-agents.json
  • reconcile_persona_team_dirs() — replaces reconcile_persona_pack_paths(), handles both old and new field names

Tauri commands: pack commands replaced with install_team_from_directory, sync_team_directory, pick_team_directory.

Removed: import_persona_pack, uninstall_persona_pack, list_installed_packs, and all pack infrastructure from personas.rs.

Runtime: runtime.rs reads persona_team_dir/persona_name_in_team for ACP env var resolution (env var names unchanged for compatibility).

Frontend

  • TeamsSection.tsx + useTeamActions.ts — directory-backed team UI: install from directory, sync, delete, and "Reveal in Finder" via revealItemInDir(team.sourceDir)
  • tauriTeams.ts — wires the new install_team_from_directory, sync_team_directory, pick_team_directory commands
  • types.tsAgentTeam gains sourceDir, isSymlink, symlinkTarget, version; sourcePacksourceTeam
  • AgentsView.tsx, PersonaActionsMenu.tsx — "Managed by pack" → "Managed by team"

Notes

The migration test suite was extracted to migration_tests.rs to keep migration.rs under the file-size limit.

wpfleger96 added a commit that referenced this pull request Jun 4, 2026
wpfleger96 added a commit that referenced this pull request Jun 4, 2026
@wpfleger96 wpfleger96 changed the title feat(desktop): wire persona pack management through the frontend feat(desktop): full persona pack CRUD with dedicated packs section Jun 4, 2026
wpfleger96 added a commit that referenced this pull request Jun 4, 2026
wpfleger96 added a commit that referenced this pull request Jun 4, 2026
wpfleger96 added a commit that referenced this pull request Jun 4, 2026
wpfleger96 added a commit that referenced this pull request Jun 4, 2026
@wpfleger96 wpfleger96 force-pushed the wpfleger/wire-pack-management branch from d9396bc to 75d39c6 Compare June 4, 2026 21:45
@wpfleger96 wpfleger96 changed the base branch from main to wpfleger/fix-symlink-packs June 4, 2026 21:45
Base automatically changed from wpfleger/fix-symlink-packs to main June 4, 2026 21:52
@wpfleger96 wpfleger96 force-pushed the wpfleger/wire-pack-management branch 3 times, most recently from 3519a5e to f489fd6 Compare June 8, 2026 21:41
@wpfleger96 wpfleger96 changed the title feat(desktop): full persona pack CRUD with dedicated packs section refactor(desktop): consolidate packs into teams — backend plumbing Jun 8, 2026
@wpfleger96 wpfleger96 force-pushed the wpfleger/wire-pack-management branch from dda2d4b to 166f982 Compare June 8, 2026 22:42
@wpfleger96 wpfleger96 changed the title refactor(desktop): consolidate packs into teams — backend plumbing refactor(desktop): consolidate packs into teams Jun 8, 2026
@wpfleger96 wpfleger96 force-pushed the wpfleger/wire-pack-management branch from 166f982 to ab5ffb8 Compare June 9, 2026 01:55
@wpfleger96 wpfleger96 marked this pull request as ready for review June 9, 2026 01:59
@wpfleger96 wpfleger96 requested a review from a team as a code owner June 9, 2026 01:59
@wpfleger96 wpfleger96 force-pushed the wpfleger/wire-pack-management branch 3 times, most recently from f313184 to 749d5f4 Compare June 9, 2026 17:16
wpfleger96 pushed a commit that referenced this pull request Jun 9, 2026
@wpfleger96 wpfleger96 force-pushed the wpfleger/wire-pack-management branch 2 times, most recently from b10c938 to f9bc286 Compare June 9, 2026 18:33
wpfleger96 pushed a commit that referenced this pull request Jun 9, 2026
@wpfleger96

Copy link
Copy Markdown
Collaborator Author

Team Management UI Screenshots

E2E screenshot tests from desktop/tests/e2e/team-management-screenshots.spec.ts — all 6 tests passing. Each shot is now scoped to its target element, so all six images are distinct.

01 — Teams section with cards

01-teams-section

02 — Regular team context menu

02-team-card-menu

03 — Directory-backed team with version badge

03-directory-team-card

04 — Directory team context menu (Sync from directory, Reveal in Finder)

04-directory-team-menu

05 — Symlinked team with link icon

05-symlinked-team

06 — Install from directory button

06-install-from-directory

wpfleger96 pushed a commit that referenced this pull request Jun 9, 2026
… cleanup

The team shipped four byte-identical PNGs on PR #852 because an unscoped
full-page capture photographed the same resting grid for every shot, and
then left the superseded screenshot comment live because post-screenshots.sh
appends rather than replaces. AGENTS.md covered animation waits and cropping
but neither failure mode. Add a shasum distinctness gate before posting and
the gh api comment-delete step after reposting.

Signed-off-by: npub1fgdl5qqnh3k3f2xkqrvt7cujalhm623x4s7fdjdj5yrtp5fzjl9qrjpucw <4a1bfa0013bc6d14a8d600d8bf6392efefbd2a26ac3c96c9b2a106b0d12297ca@sprout-oss.stage.blox.sqprod.co>
wpfleger96 pushed a commit that referenced this pull request Jun 9, 2026
… cleanup

The team shipped four byte-identical PNGs on PR #852 because an unscoped
full-page capture photographed the same resting grid for every shot, and
then left the superseded screenshot comment live because post-screenshots.sh
appends rather than replaces. AGENTS.md covered animation waits and cropping
but neither failure mode. Add a shasum distinctness gate before posting and
the gh api comment-delete step after reposting.

Signed-off-by: npub1fgdl5qqnh3k3f2xkqrvt7cujalhm623x4s7fdjdj5yrtp5fzjl9qrjpucw <4a1bfa0013bc6d14a8d600d8bf6392efefbd2a26ac3c96c9b2a106b0d12297ca@sprout-oss.stage.blox.sqprod.co>
@wpfleger96 wpfleger96 force-pushed the wpfleger/wire-pack-management branch from 06b322a to 8937db3 Compare June 9, 2026 19:07
@wpfleger96 wpfleger96 force-pushed the wpfleger/wire-pack-management branch 5 times, most recently from 5c1a381 to c342be8 Compare June 9, 2026 23:53
… consolidation

Replaces the pack abstraction with directory-backed teams. Teams are the
single organizational unit for grouping personas — importable from a local
directory (copy or symlink), syncable when the source changes, and removable
with cascade cleanup of owned personas.

Business logic: import_team_from_directory (copy/symlink, ID validation),
delete_team_with_cascade, sync_team_from_dir (add/remove/update personas),
runtime env var resolution via persona_team_dir/persona_name_in_team.
Migration moves existing pack data into the new team schema and cleans up
the packs directory (remove_dir, not remove_dir_all, to preserve external
symlinks). Migration tests extracted to a sibling file to stay under the
desktop file-size limit.

Frontend: sourcePack→sourceTeam rename, team context menus with
sync/reveal/delete for directory-backed teams, install-from-directory flow.
E2E mock bridge extended with team fixtures and screenshot specs for all
team UI states.
@wpfleger96 wpfleger96 force-pushed the wpfleger/wire-pack-management branch from c342be8 to 9fee5c8 Compare June 10, 2026 00:16
@wpfleger96 wpfleger96 merged commit ba2fdbf into main Jun 10, 2026
15 checks passed
@wpfleger96 wpfleger96 deleted the wpfleger/wire-pack-management branch June 10, 2026 03:22
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