Files
buzz/desktop/tests
Taylor Ho 9c71264b4e feat(desktop): personas as catalog templates — unwind boot-time agent minting
Agents are now only ever minted explicitly through the Create Agent
wizard. Personas surface exclusively inside the New Agent catalog as
"saved templates" instead of rendering as cards on the Agents grid.

Remove the flatten/materialization migration:
- Delete managed_agents/flatten.rs and flatten_tests.rs — the boot-time
  migration minted a fresh keypair for every active persona with no
  linked agent, but keyed dedup on the persona_id link it erased itself,
  so relay persona echoes from other builds (dev vs release, d-tag
  drift) re-minted duplicate agents on every launch on both sides
- Remove the flatten_personas_into_agents boot hookup in lib.rs
- Remove materialize_pack_agents_locked from team pack install/sync in
  commands/teams.rs — installing a pack now lands its personas in the
  catalog without minting agents

Catalog = built-ins + saved templates:
- list_agent_templates merges static built-ins with active persona
  records (store lock held, spawn_blocking), skipping records that
  shadow a built-in id and sorting saved entries by display name
- AgentTemplate gains provider and source ("builtin" | "saved") on both
  the Rust struct and the TS type; templateAgentDraft carries provider
  through to the create form prefill
- CreateAgentStartDialog renders saved templates under a "Saved"
  sidebar group; detail pane labels the type accordingly

"Save as template" on minted agents:
- New save_agent_as_template Tauri command maps an agent's pinned
  config (name, instructions, avatar, runtime, model, provider — never
  env_vars) onto a persona record; re-saving the same name updates the
  existing template instead of duplicating; retained as kind:30175
  pending relay sync so templates reach other devices
- AgentActionsMenu gains a "Save as template" entry wired through
  UnifiedAgentsSection/AgentsView with success toast and
  agent-templates/personas query invalidation

Tests:
- e2eBridge mocks the merged template list and save_agent_as_template
- agents.spec.ts covers the new menu entry and the save-as-template →
  Saved group → detail pane flow
- Stale flatten references in persona/teams test comments cleaned up

873 Tauri unit tests, 69 Playwright tests, and the full just ci gate
pass.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
2026-07-03 01:36:09 -07:00
..
2026-07-02 16:26:31 -07:00