fix(ai-builder): Unify post-build credential setup into single setup-workflow flow#28273
Merged
fix(ai-builder): Unify post-build credential setup into single setup-workflow flow#28273
Conversation
…-workflow flow (no-changelog) Remove credential finalization from builder sub-agent and consolidate into a single orchestrator-driven setup-workflow call. Previously the builder called setup-credentials (finalize) + apply-workflow-credentials, and then the orchestrator could call setup-workflow again — producing duplicate setup prompts with different UIs. Now the builder only builds and verifies. The orchestrator exclusively calls setup-workflow post-build, which handles credentials, parameters, and triggers in one unified UI. Deferral guidance prevents retrying with a different setup tool.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
No issues found across 4 files
Architecture diagram
sequenceDiagram
participant Agent as AI Orchestrator
participant Builder as Builder Sub-Agent
participant Tools as Tools API
participant UI as Frontend UI
Note over Agent,UI: Post-Build Workflow Flow
Agent->>Builder: Start build task
Builder->>Tools: verify-built-workflow()
Tools-->>Builder: Success (with mocked credentials)
Builder-->>Agent: Task Complete (workflowId, mocks found)
Note over Agent,Tools: CHANGED: Unified Setup Flow
Agent->>Tools: NEW: setup-workflow(workflowId)
Tools->>UI: Open Setup Panel (Credentials + Params)
alt User configures now
UI-->>Tools: Configuration completed
Tools-->>Agent: success: true
Agent->>UI: "Workflow ready. Would you like to test it?"
else User clicks "Later"
UI-->>Tools: User deferred setup
Tools-->>Agent: NEW: deferred: true
Note right of Agent: NEW: Guardrail prevents retrying <br/>with setup-credentials
Agent->>UI: "No problem. You can set it up later. <br/>Ready to test?"
end
Note over Agent,UI: Standalone Credential Flow (Outside Workflow)
UI->>Agent: "Create a Slack credential"
Agent->>Tools: CHANGED: setup-credentials(stage: "create")
Tools->>UI: Open Credential Modal
UI-->>Agent: Credential created/selected
Contributor
what :D |
Cadiac
approved these changes
Apr 10, 2026
Contributor
Cadiac
left a comment
There was a problem hiding this comment.
Seems like this makes sense, but didn't test locally
Contributor
|
Got released with |
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.
Summary
setup-credentials+apply-workflow-credentials) from the builder sub-agent — the builder now only builds and verifiessetup-workflowinstead of the oldsetup-credentials→apply-workflow-credentialschainsetup-workflowreturnsdeferred: true, do not retry with a different setup toolsetup-credentialsis only for standalone credential creation outside workflow contextFixes duplicate setup prompts where users saw first a credential picker (
setup-credentials), then the full setup panel (setup-workflow) after building a workflow.