fix(DesignerV2): Fix Agent Activity tab disabled for MCP-only agent#9197
Merged
Conversation
…workflows useWorkflowHasAgentLoop checked nodesMetadata for AGENT_CONDITION subgraph types, but MCP client tools (McpClientTool) get MCP_CLIENT subgraph type instead. Workflows with only MCP tools (no regular agent conditions) would never produce an AGENT_CONDITION node, leaving the Agent Activity tab permanently disabled. Changed the selector to check operations for type 'agent', matching the v1 designer's existing implementation. Fixes #9174
lambrianmsft
approved these changes
May 20, 2026
Contributor
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | None |
| Commit Type | ✅ | None |
| Risk Level | ✅ | None |
| What & Why | ✅ | None |
| Impact of Change | ✅ | None |
| Test Plan | Add a small unit test for the selector; update checkboxes once added | |
| Contributors | Optional: add any contributors for credit | |
| Screenshots/Videos | Not required for this change |
Final Message
Thanks — this PR is well-written and follows the template. The risk label matches the actual change in the code (low). The only actionable suggestion is to add a small unit test for the updated selector (useWorkflowHasAgentLoop) to prevent regressions and to update the Test Plan checkboxes in the PR body. Optionally, fill out the Contributors section if others assisted. Once you add the unit test (or leave a short rationale why a unit test is not applicable), this PR can be considered fully documented and well-covered. Thank you!
Last updated: Wed, 20 May 2026 18:55:31 GMT
Contributor
📊 Coverage CheckThe following changed files need attention:
Please add tests for the uncovered files before merging. |
This was referenced May 23, 2026
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.
Commit Type
Risk Level
What & Why
The Agent Activity tab in the designer-v2 run history panel is permanently disabled for workflows where Agent actions only contain MCP client tools (e.g.,
McpClientTool).useWorkflowHasAgentLoopcheckedstate.workflow.nodesMetadatafor nodes withsubgraphType === SUBGRAPH_TYPES.AGENT_CONDITION. However, during deserialization, MCP client tools are assignedSUBGRAPH_TYPES.MCP_CLIENT— notAGENT_CONDITION. Workflows whose Agent actions have only MCP tools never produce anAGENT_CONDITIONnode, so the selector always returnedfalse.Changed the selector to check
state.workflow.operationsfor any operation withtype === 'agent', matching the v1 designer's existing implementation.Fixes #9174
Impact of Change
Test Plan
falseand new selector returnstrue. Verified v1 designer already uses this approach.Contributors
Screenshots/Videos