Skip to content

fix: open saved agent after creation - #137

Merged
tulsi-builder merged 1 commit into
mainfrom
tulsi/fix-agent-save-detail-navigation
Aug 19, 2026
Merged

tulsi-builder merged 1 commit into
mainfrom
tulsi/fix-agent-save-detail-navigation

Conversation

@tulsi-builder

Copy link
Copy Markdown
Contributor

Category: fix
User Impact: Saving a newly created agent now opens its profile immediately, and the profile shows a readable Description label.

Problem: Finishing the agent creation flow left users in the builder instead of taking them to the agent they had just saved. The profile could also expose the internal view.description translation key rather than a user-facing label.

Solution: Route successful agent promotions directly to the saved agent profile and seed the promoted source into the agent store before navigation, so the destination remains available even when the follow-up disk refresh is delayed or fails. Add a readable fallback for the description label and regression coverage across the completion callback chain.

File changes

src/app/AppShell.navigation.test.tsx
Covers the app-level transition from an active agent builder to the saved agent detail route.

src/app/AppShell.tsx
Handles agent builder completion by navigating directly to the saved agent profile.

src/app/ui/AppShellContent.tsx
Carries the completion callback from the app shell into the chat surface that hosts the builder.

src/features/agents/capabilities/AgentBuilderCapability.tsx
Seeds the promoted agent into the store, signals completion immediately, and leaves disk refresh as background reconciliation so navigation stays reliable.

src/features/agents/ui/AgentDetailPage.tsx
Adds a readable fallback for the Description metadata label.

src/features/agents/ui/tests/AgentsView.entry.test.tsx
Verifies the readable Description label and its conditional visibility.

src/features/chat/ui/ChatRightRail.tsx
Forwards builder completion from the agent capability toward app navigation.

src/features/chat/ui/ChatView.tsx
Connects the chat-hosted builder completion callback to the app shell.

src/features/chat/ui/tests/ChatRightRail.test.tsx
Covers promotion, immediate store seeding, navigation signaling, successful reconciliation, and refresh failure behavior.

src/features/chat/ui/tests/ChatView.mcpApp.test.tsx
Verifies the completion callback is preserved through the ChatView boundary.

src/shared/api/agents.ts
Exports and reuses the canonical agent-source-to-persona mapping for immediate store seeding.

Reproduction steps

  1. Open Agents and start creating a new agent.
  2. Complete the required fields and click Save changes.
  3. Confirm Berd opens the newly saved agent's detail page automatically.
  4. Confirm the metadata rail shows Description, not view.description.
  5. Optionally simulate a failed persona refresh and confirm the saved agent profile still opens from the promoted source.

@tulsi-builder
tulsi-builder requested a review from a team August 19, 2026 23:07
@kalvinnchau kalvinnchau changed the title open saved agent after creation fix: open saved agent after creation Aug 19, 2026
@tulsi-builder
tulsi-builder merged commit 908beb2 into main Aug 19, 2026
9 checks passed
@tulsi-builder
tulsi-builder deleted the tulsi/fix-agent-save-detail-navigation branch August 19, 2026 23:20
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.

2 participants