feat(desktop): unify add agent flows - #5015
Draft
tellaho wants to merge 3 commits into
Draft
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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