Skip to content

fix(tool-input): restore workflow input mapper visibility#3438

Merged
waleedlatif1 merged 1 commit intostagingfrom
fix/start-inp
Mar 6, 2026
Merged

fix(tool-input): restore workflow input mapper visibility#3438
waleedlatif1 merged 1 commit intostagingfrom
fix/start-inp

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Fix workflow start inputs not showing when a workflow is used as a tool in Agent
  • coveredParamIds was changed from displaySubBlocks to allBlockSubBlocks in feat(credentials): multiple credentials per provider #3211, which caused excluded subBlock types (like input-mapping) to still count as "covered", preventing inputMapping from rendering as an uncovered param

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Mar 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Mar 6, 2026 1:46pm

Request Review

@cursor
Copy link

cursor bot commented Mar 6, 2026

PR Summary

Low Risk
Small UI logic change in ToolInput to compute uncovered parameters from the actually-rendered sub-blocks; low risk but could affect which tool params show up as “uncovered” in the editor.

Overview
Fixes a regression where workflow start inputs (e.g., inputMapping) could be incorrectly treated as already covered and therefore not rendered.

coveredParamIds is now derived from displaySubBlocks (the sub-blocks actually being shown) rather than all block sub-block definitions, restoring correct “uncovered param” detection and visibility.

Written by Cursor Bugbot for commit 077a595. Configure here.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 6, 2026

Greptile Summary

This is a minimal, targeted bug fix that restores the visibility of workflow start input fields when a workflow is used as a tool inside an Agent block. The root cause was that coveredParamIds was built from allBlockSubBlocks (all subblocks, including types excluded from display like input-mapping), which caused the inputMapping parameter to be marked as "covered" even though its corresponding sub-block was never actually rendered. By switching to displaySubBlocks — the already-filtered list that getSubBlocksForToolInput returns — only sub-blocks that are genuinely rendered count as covered, allowing inputMapping to fall through to the ParameterWithLabel render path as intended.

Key observations:

  • Root cause verified: EXCLUDED_SUBBLOCK_TYPES in params.ts explicitly lists 'input-mapping', confirming getSubBlocksForToolInput never includes that sub-block in displaySubBlocks.
  • Fix is consistent with surrounding logic: displaySubBlocks is already used for the renderSubBlock() loop, so using it for coverage computation keeps the two sets perfectly in sync.
  • No new imports or structural changes: The fix simply removes an unused variable and updates one reference.

Confidence Score: 5/5

  • This PR is safe to merge; it is a one-line targeted fix with no side effects on other rendering paths.
  • The change is minimal (removes one unused variable and replaces its reference with an already-computed, correctly-filtered list). The logic is sound: displaySubBlocks and coveredParamIds now share the same source of truth, eliminating the mismatch that hid workflow start inputs. No new imports, no structural changes, and the surrounding rendering loop was already using displaySubBlocks correctly. The fix is both necessary and safe.
  • No files require special attention.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["getSubBlocksForToolInput()"] -->|"filters out EXCLUDED_SUBBLOCK_TYPES\n(including 'input-mapping')"| B["displaySubBlocks\n(filtered list)"]
    C["toolBlock?.subBlocks\n(all subblocks, unfiltered)"] -->|"OLD: used for coveredParamIds"| D_old["coveredParamIds\n(includes 'inputMapping' ID)"]
    B -->|"NEW: used for coveredParamIds"| D_new["coveredParamIds\n(does NOT include 'inputMapping' ID)"]
    B --> E["renderSubBlock() loop\n(only displaySubBlocks rendered)"]
    D_old --> F_old["uncoveredParams\n(inputMapping EXCLUDED ❌)"]
    D_new --> F_new["uncoveredParams\n(inputMapping INCLUDED ✅)"]
    F_new --> G["ParameterWithLabel renders\ninputMapping / workflow start inputs"]
    F_old --> H["inputMapping never rendered\n(bug from #3211)"]
Loading

Last reviewed commit: 077a595

@waleedlatif1 waleedlatif1 merged commit 06c8844 into staging Mar 6, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/start-inp branch March 6, 2026 13:51
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.

1 participant