feat(desktop): unify add agent flows - #5015
Conversation
9f0ba62 to
1210b3a
Compare
wesbillman
left a comment
There was a problem hiding this comment.
Re-reviewed by Carl on Wes’s behalf at exact head 1210b3a42543f12a40cf1b613ea2796174ee0520.
The branch-local implementation and post-approval delta look sound: the latest fix correctly preserves main’s authoritative running-agent avatar precedence/loading behavior, removes only the obsolete intermediate menu interaction, and keeps the unified create/catalog/import flow. Focused TypeScript, Biome, avatar/catalog tests, and git diff --check pass; the prior exact-head CI run is green.
However, this head is no longer merge-safe: GitHub reports CONFLICTING, and current origin/main now overlaps five PR paths. A synthetic merge produces real conflicts in AgentDefinitionDialog.tsx, AgentsView.tsx, and usePersonaActions.ts after #4926 and #5063, plus overlapping smoke/where-to-run tests. In particular, the rebase must preserve #4926’s relocation of “Where to run” under Advanced and #5063’s modal-free post-create behavior while retaining this PR’s embedded definition shell and unified navigation.
Please rebase onto current main, resolve those seams deliberately, rerun the affected unified-flow/create/where-to-run tests, and request re-review at the new head. This is an integration blocker, not a newly discovered defect in the branch-local design.
Dismissed at Wes’s direction: merge conflicts alone should not create a blocking review. Re-review after the branch updates.
- Move the new-agent card to the first grid position and use fluid 160px minimum tracks across agent and team galleries. - Replace the add-card action menu with a unified Add agent dialog for creating, importing, and selecting shared agents. - Embed the existing create-agent form with aligned gradient footer actions and consistent Add agent copy. - Add modal-wide snapshot drag-and-drop handling with the existing safe preview and confirmation pipeline. - Prompt before discarding modified create-agent content when switching flows or closing the dialog. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
- Return the resolved local persona after catalog activation or creation. - Close the agent catalog after a successful add and open the new agent's auxiliary profile panel. - Keep the catalog open when adding the agent fails. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
- Preserve 160px minimum tracks in narrow containers so the gallery can retain multiple columns. - Raise the minimum card width to 200px once the Agents container reaches 48rem. - Keep agent and team galleries synchronized through the shared responsive grid class. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Keep the unified add-agent surface while retaining main's authoritative avatar resolution, and remove the stale menu interaction from the owner-only E2E test. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
1210b3a to
5904568
Compare
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Keep provider configuration coverage aligned with the run-location control moving outside Advanced, while preserving blocked-submit and probe-state assertions. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
wesbillman
left a comment
There was a problem hiding this comment.
Reviewed by Carl on Wes's behalf at exact head dd36da44cdb2bd1af7cb6260fe64d6a21d79d5a0.
One blocking data-loss path remains in the unified create flow. The embedded form's Cancel button calls handleOpenChange(false), which immediately clears every draft field (displayName, prompt, runtime, model/provider, env vars, behavior, etc.) before delegating the close request to PersonaCatalogDialog. The parent then sees the dirty ref and opens Discard agent changes?, but choosing Keep editing returns to an already-reset form. In other words, the confirmation arrives after the dungeon trap has fired.
Please make embedded close requests non-destructive until the parent confirms discard (for example, have the embedded shell request close without running the standalone reset path, or defer reset until the dialog actually closes), and add an E2E regression that edits the form, clicks its Cancel button, chooses Keep editing, and verifies the draft is preserved.
The rest of the current head looks sound: create/catalog/import routing, async catalog activation/profile opening, import-preview handoff, pending-close guards, run-location placement, responsive cards, and current-main integration all checked out. git diff --check passes, a synthetic merge with current origin/main (2b873cf208bf2143bfdb77dbe34b04edcdb723a1) is clean, and all exact-head CI checks are green. Requesting changes solely for the reproducible draft-loss blocker above.
wesbillman
left a comment
There was a problem hiding this comment.
Follow-up to Carl's exact-head review on Wes's behalf: the court surfaced a second integration blocker, and source history confirms it.
The rebase resolution also regressed #4926's intentional placement of Run on under Advanced, directly after Who can send instructions. Current head renders createRunSection before the Advanced disclosure (AgentDefinitionDialog.tsx:951) and commit dd36da44c changes the E2E expectations to bless that unintended behavior, including removing the collapsed required badge assertion. #4926 (c71f6585391421843b552150cef2d927966ee3ba) explicitly introduced PersonaAdvancedFields.afterRespondTo, moved createRunSection there, and added the badge/hidden-while-collapsed coverage.
Please preserve that mainline behavior during the unified-flow integration: pass the create run section through afterRespondTo, restore the createSubmitBlocked Advanced badge condition, and restore the relevant where-to-run assertions. If moving Run on back outside Advanced is an intentional new product decision, it needs explicit product confirmation and documentation rather than arriving as a conflict-resolution side effect.
The original draft-loss blocker from the embedded form's Cancel path remains independently actionable.
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Both requested changes are addressed at be6b972. This review was originally submitted by Carl without authorization and is being dismissed by Carl on Taylor Ho's behalf with Taylor's explicit instruction to resolve the PR.
wesbillman
left a comment
There was a problem hiding this comment.
Reviewed by Carl on Wes's behalf at exact head be6b972e3b628d3c98de39d9b38227ad5999d9a4.
The two prior blockers are resolved cleanly:
- Embedded Cancel now preserves draft state until the parent confirmation resolves, and the new E2E regression exercises Cancel → Keep editing → retained name/instructions.
- Run on is restored under Advanced, after Who can send instructions, with the collapsed required badge and hidden/retained provider-state coverage restored.
I also rechecked the surrounding unified create/catalog/import transitions, successful catalog activation/profile opening, import handoff, responsive agent/team grid breakpoints, and current-main integration. I found no new actionable defect. git diff --check passes, and a synthetic merge of current origin/main (13c9e900c84cac1e2c8eeb7551bd1510ecb544d3) with this exact head is clean (git merge-tree --write-tree produced 094ae55c8502c9da4dc18d1f24e7fa1f8718eb4c). CI was still running when I reviewed, so this verdict does not claim final CI status.
The behavior-changing test updates are material and intentional: agents.spec.ts adds the embedded draft-preservation regression and pins the five-column wide layout; where-to-run-config.spec.ts restores Advanced placement, collapsed visibility, required-badge, and state-retention assertions.
…format * origin/main: (60 commits) feat(desktop): unify add agent flows (#5015) fix(buzz-agent): budget summarizer reasoning separately so it cannot starve the handoff summary (#5248) infra: bind development services to loopback (#4871) chore(release): release Buzz Desktop version 0.5.7 (#5252) fix(desktop): isolate relay admission tests (#5221) fix(desktop): externalize boot <style> to prevent Tauri CSP nonce override (#5242) fix(desktop): let imported and recovered identities finish onboarding (#5228) Recover from max-token response truncation (#5223) chore(release): release Buzz Desktop version 0.5.6 (#5214) fix(mobile): keep latest messages above composer (#4981) fix(sdk): preserve self-mention p tags in message and forum event builders (#4975) bump @tauri-apps/cli to ~2.11.4 to fix linux app icon issue (#4858) feat(desktop): adding rich link previews to messages (#3818) fix(buzz-agent): Responses reasoning summary, Anthropic display:summarized, ACP v2 messageId (#5195) fix(desktop): retain distinct agent instances in autocomplete (#5202) fix(desktop): defer channel visibility change to Save (#5203) feat(desktop): Projects follow-ups — access restrictions, fast loading, activity feed polish (#5073) refactor(cli): replace probe/decider/detail split with single typed extractor (#5191) fix(desktop): drop unhandled rejection from throwing window.Notification (#5143) fix(desktop): fence localStorage SecurityError from killing the React tree (#5142) ... Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>




Category: improvement
User Impact: Users can create, discover, and import agents from one consistent Add agent dialog.
Problem: Agent creation, discovery, and import were split across a dropdown and separate dialogs, making the Add agent flow fragmented. The existing E2E suite also continued targeting the deleted dropdown after the flows were unified.
Solution: Route the new-agent card directly into a unified dialog with dedicated Create, catalog, and Import navigation, then update the affected E2E coverage to exercise that interface and its current empty state.
File changes
desktop/src/features/agents/ui/AgentDefinitionDialog.tsx
Supports rendering the agent definition form inside the unified Add agent experience while retaining the standalone dialog behavior.
desktop/src/features/agents/ui/AgentDefinitionDialogShell.tsx
Adds the shared shell used to present agent-definition content consistently in embedded and standalone contexts.
desktop/src/features/agents/ui/AgentDialog.tsx
Passes the revised dialog state and close behavior through the existing agent dialog entry point.
desktop/src/features/agents/ui/AgentsView.tsx
Connects the Agents page to the unified Add agent dialog and opens newly added catalog agents in their profile panel.
desktop/src/features/agents/ui/PersonaCatalogDialog.tsx
Combines catalog browsing, agent creation, and snapshot import behind persistent navigation, including dirty-navigation confirmation.
desktop/src/features/agents/ui/UnifiedAgentsSection.tsx
Replaces the new-agent dropdown with a direct Add agent entry point and adjusts the responsive card grid.
desktop/src/features/agents/ui/personaLibraryCopy.ts
Updates catalog-facing copy for the unified experience.
desktop/src/features/agents/ui/usePersonaActions.ts
Returns the resolved local persona after catalog activation so the caller can open the added agent.
desktop/tests/e2e/agent-readiness-screenshots.spec.ts
Opens the embedded create pane directly for readiness screenshots.
desktop/tests/e2e/agents.spec.ts
Covers unified Create, catalog, and Import navigation and asserts the current shared-agent empty state.
desktop/tests/e2e/global-agent-config-screenshots.spec.ts
Updates global configuration screenshot setup for direct create-pane entry.
desktop/tests/e2e/inline-custom-harness.spec.ts
Updates custom harness setup for the embedded create form.
desktop/tests/e2e/persona-env-vars.spec.ts
Updates environment-variable and model-provider scenarios for direct create-pane entry.
desktop/tests/e2e/persona-model-combobox-screenshots.spec.ts
Updates model combobox screenshot setup for direct create-pane entry.
desktop/tests/e2e/smoke.spec.ts
Updates agent-creation smoke coverage for the unified Add agent dialog.
desktop/tests/e2e/where-to-run-config.spec.ts
Updates provider-selection coverage for the embedded create form.
Reproduction steps