Skip to content

fix(designer-v2): show relative path parameters when running with a payload - #9704

Open
Mohammad Malik (mohammad-malik) wants to merge 3 commits into
Azure:mainfrom
mohammad-malik:cursor/fix-run-payload-relative-path-5214
Open

Mohammad Malik (mohammad-malik) wants to merge 3 commits into
Azure:mainfrom
mohammad-malik:cursor/fix-run-payload-relative-path-5214

Conversation

@mohammad-malik

Copy link
Copy Markdown

Fixes #8555

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 Run with payload popover in the new designer never showed relative path parameters for a Request trigger, so a path such as /subscription/{subscriptionId} had no subscriptionId input. The same popover also grew upward underneath the Workflow, Code, and Run history switcher.

The popover now renders one value field per relative path parameter and sends the resolved path on the run URL. Its height is limited to the space below the view switcher.

Impact of Change

  • Users: Published and draft runs of Request triggers with a relative path can supply those path parameters, and the run popover no longer covers the view switcher.
  • Developers: Run payload data can include relativePathParameters.
  • System: When every path parameter is filled, the resolved path is appended to the management run URL, or substituted into a callback URL that already contains the template.

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in: pnpm run test:lib (12/12 tasks, designer v2 3573 tests) and the Floating Run Button unit tests (67 passed). Biome is clean on the changed files.

Contributors

Screenshots/Videos

…ayload

Request triggers with a relative path such as /subscription/{subscriptionId}
did not collect those parameters in the run-with-payload popover, and the
popover grew up underneath the Workflow, Code, and Run history switcher.

Show one value field per path parameter and append the resolved path to the
run URL. Limit the popover height so it stays below the view switcher.
Copilot AI balanced review requested due to automatic review settings November 13, 2026 00:19
@github-actions

Copy link
Copy Markdown
Contributor

🔒 AI Validation Pending

This PR is from an external contributor. AI validation will be performed after manual review.

Maintainers: Add the external-approved label to enable AI validation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Required invocation-path segments can be omitted, and parameter names matching inherited Object properties can crash the popover before users enter values.

2 open issues
What changed in this PR

Addresses #8555 by adding Request-trigger relative path inputs to designer-v2’s Run with payload popover and limiting its height to avoid covering the view switcher.

Changes:

  • Collects path parameter values and applies them to published, draft, and callback run URLs.
  • Adds a scrollable popover with height calculated from the designer surface.
  • Adds localized labels and unit tests for parameter handling, run integration, and layout.
File Description
Localize/​lang/​strings.json Adds relative-path labels and translation context.
libs/​logic-apps-shared/​src/​intl/​src/​compiled-lang/​strings.json Adds compiled localized strings.
libs/​designer-v2/​src/​lib/​ui/​FloatingRunButton/​styles.tsx Styles parameter rows and scrollable popover content.
libs/​designer-v2/​src/​lib/​ui/​FloatingRunButton/​relativePath.ts Extracts parameter names, resolves values, and updates run URLs.
libs/​designer-v2/​src/​lib/​ui/​FloatingRunButton/​payloadPopoverLayout.ts Calculates available popover height.
libs/​designer-v2/​src/​lib/​ui/​FloatingRunButton/​payloadPopover.tsx Adds parameter inputs, validation, and height constraints.
libs/​designer-v2/​src/​lib/​ui/​FloatingRunButton/​index.tsx Connects trigger templates and entered values to run requests.
libs/​designer-v2/​src/​lib/​ui/​FloatingRunButton/​__tests__/​relativePath.spec.ts Tests template parsing, encoding, and URL substitution.
libs/​designer-v2/​src/​lib/​ui/​FloatingRunButton/​__tests__/​payloadPopoverLayout.spec.ts Tests height calculation and missing-anchor handling.
libs/​designer-v2/​src/​lib/​ui/​FloatingRunButton/​__tests__/​payloadPopover.spec.tsx Tests parameter rendering, required values, and submission.
libs/​designer-v2/​src/​lib/​ui/​FloatingRunButton/​__tests__/​floatingRunButton.spec.tsx Tests resolved path inclusion in published run requests.

Review effort: Balanced

}, [onSubmit, method, headersValue, queriesValue, bodyValue, relativePathParameterNames, relativePathValues, setOpen]);

const runDisabled = useMemo(() => !!bodyError || !method, [bodyError, method]);
const relativePathIncomplete = relativePathParameterNames.some((name) => !(relativePathValues[name] ?? '').trim());

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 492ee78. Values are now read through getRelativePathValue, which uses Object.hasOwn. Validation, the input value and the submitted map all go through it. Added tests for constructor, toString and __proto__.

*/
export function appendResolvedRelativePath(url: string, template: string | undefined, values: Record<string, string> | undefined): string {
const resolved = resolveRelativePath(template, values);
if (!resolved || !url || url.includes(resolved)) {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 492ee78. I removed the whole-URL check. Each run starts from a fresh callback URL, so there was no duplicate to guard against. Added a test where /{id} with subscriptions now resolves to /run/subscriptions.

…s append the path

Path parameter names such as constructor, toString or __proto__ read
inherited Object members, so the run popover crashed on .trim(). Read
values through Object.hasOwn in validation, input binding and the
submitted parameter map.

Drop the whole-URL substring guard in appendResolvedRelativePath. A value
like "subscriptions" already appears in every ARM run URL, so the guard
skipped a required path and the run went to /run.
@mohammad-malik

Copy link
Copy Markdown
Author

Both review threads are addressed in 492ee78. Could a maintainer add the external-approved label so validation can run?

This branch has not been deployed

No deployments
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.

[New Experiment] Relative Path field is missing in the Run With Payload blade and UI Overlap issue in Logic Apps workflow

2 participants