Skip to content

fix(designer-v2): Fix Agent Activity tab disabled for MCP-only agent (v5.961)#9198

Merged
rllyy97 merged 1 commit into
hotfix/v5.961from
riley/fix/agent-activity-tab-disabled-hotfix
May 20, 2026
Merged

fix(designer-v2): Fix Agent Activity tab disabled for MCP-only agent (v5.961)#9198
rllyy97 merged 1 commit into
hotfix/v5.961from
riley/fix/agent-activity-tab-disabled-hotfix

Conversation

@rllyy97
Copy link
Copy Markdown
Contributor

@rllyy97 rllyy97 commented May 20, 2026

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

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).

useWorkflowHasAgentLoop checked state.workflow.nodesMetadata for nodes with subgraphType === SUBGRAPH_TYPES.AGENT_CONDITION. However, during deserialization, MCP client tools are assigned SUBGRAPH_TYPES.MCP_CLIENT — not AGENT_CONDITION. Workflows whose Agent actions have only MCP tools never produce an AGENT_CONDITION node, so the selector always returned false.

Changed the selector to check state.workflow.operations for any operation with type === 'agent', matching the v1 designer's existing implementation.

Also added a flag to force save on the v2 run button.

Fixes #9174

Impact of Change

  • Users: Agent Activity tab now correctly appears for all agent workflows, including those with only MCP client tools
  • Developers: No API changes
  • System: No performance or architecture impact — single selector change

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in: Traced through customer's workflow definition (Agent action with single McpClientTool) confirming old selector returns false and new selector returns true. Verified v1 designer already uses this approach.

Contributors

Screenshots/Videos

…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
@rllyy97 rllyy97 added the risk:low Low risk change with minimal impact label May 20, 2026
@rllyy97 rllyy97 enabled auto-merge (squash) May 20, 2026 16:26
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

PR Title

  • Current: fix(designer-v2): Fix Agent Activity tab disabled for MCP-only agent (v5.961)
  • Issue: None — title is clear, scoped to designer-v2, describes the problem and includes the hotfix version.
  • Recommendation: (Optional) You can keep as-is. If you prefer, include the issue number in the title (e.g., ... (fixes #9174)) but it's not required.

Commit Type

  • Properly selected (fix).
  • Only one option selected, which is correct for this change.

Risk Level

  • The PR is labeled risk:low and the body selects Low.
  • Assessment: Matches the code diff (2 lines changed, small selector change). Advising risk: risk:low.

What & Why

  • Current: The body explains the bug (Agent Activity tab disabled when workflows only contain MCP client tools) and describes the fix (change selector to check operations for type 'agent' and add flag to force save on v2 run button).
  • Issue: None — the explanation is clear and concise.
  • Recommendation: None.

⚠️ Impact of Change

  • Impact section is present and sensible: users, developers, system impacts listed.
  • Recommendation: Consider adding a brief note about which internal modules/files are affected (you partly do in the description — referencing designer-v2 run history panel and selector change is good). Example quick addition: Affected file: libs/designer-v2/src/lib/core/state/designerView/designerViewSelectors.ts.
    • Users: Agent Activity tab now appears for agent workflows that only use MCP client tools.
    • Developers: No API changes; small selector change in designer-v2 state selectors.
    • System: No performance/architecture impact.

⚠️ Test Plan

  • Assessment: Manual testing completed and an explanation is provided (traced through customer's workflow, matched v1 behavior). This is acceptable for a small selector fix.
  • Recommendation: Add a focused unit test asserting the selector behavior (e.g., state with operations where operation.type === 'agent' should return true; state with only MCP_CLIENT nodes but no operation.type 'agent' should be handled). A unit test will prevent regressions and make the change higher confidence in CI.
    • If adding a unit test is not possible for the hotfix branch, include a short justification in the Test Plan explaining why (time constraints, backport policy, etc.).

⚠️ Contributors

  • Assessment: Blank.
  • Recommendation: If others (PMs, designers, reviewers) contributed, add them to the Contributors section. If there are none, you can add a short note No additional contributors.

Screenshots/Videos

  • Assessment: Not applicable for this non-visual fix.
  • Recommendation: None.

Summary Table

Section Status Recommendation
Title Keep as-is (optional: include issue number)
Commit Type None needed
Risk Level None needed
What & Why None needed
Impact of Change ⚠️ Add affected file path for clarity
Test Plan ⚠️ Add a unit test for the selector or justify omission
Contributors ⚠️ Add contributors or explicitly state none
Screenshots/Videos None needed

Summary: The PR title and body mostly comply with the template and provide a clear explanation of the bug and fix. The risk level assigned (low) matches the small, focused change in the diff. The primary recommendation is to add a unit test for the selector change (or document why no unit test is present) and optionally list the affected file in Impact of Change and contributors in Contributors.

Please update the PR description with the suggested small additions (unit test or justification, affected file path, contributors) where applicable, then re-submit. Thank you for the clear description and targeted fix!


Last updated: Wed, 20 May 2026 17:03:45 GMT

@github-actions
Copy link
Copy Markdown
Contributor

📊 Coverage Check

The following changed files need attention:

⚠️ libs/designer-v2/src/lib/core/state/designerView/designerViewSelectors.ts - 61% covered (needs improvement)

Please add tests for the uncovered files before merging.

@rllyy97 rllyy97 merged commit 7d3b748 into hotfix/v5.961 May 20, 2026
14 of 15 checks passed
@rllyy97 rllyy97 deleted the riley/fix/agent-activity-tab-disabled-hotfix branch May 20, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:low Low risk change with minimal impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants