Skip to content

Fix json escape issue run with payload#9303

Open
Anzure wants to merge 1 commit into
Azure:mainfrom
Anzure:anzure/runWithPayloadJsonFix
Open

Fix json escape issue run with payload#9303
Anzure wants to merge 1 commit into
Azure:mainfrom
Anzure:anzure/runWithPayloadJsonFix

Conversation

@Anzure

@Anzure Anzure commented Jun 22, 2026

Copy link
Copy Markdown

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

Impact of Change

  • Users: Users editing Logic App flow
  • Developers:
  • System: Logic App Desginer new experience

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in:

Contributors

@Anzure

Screenshots/Videos

Copilot AI review requested due to automatic review settings June 22, 2026 07:44
@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 by a maintainer.

Maintainers: Add the external-approved label to this PR after reviewing the changes to enable AI validation.

1 similar comment
@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 by a maintainer.

Maintainers: Add the external-approved label to this PR after reviewing the changes 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.

Pull request overview

This PR targets the “run with payload” flow in designer-v2 to prevent JSON payloads from being double-escaped when triggering a workflow run.

Changes:

  • Adds JSON body parsing before submitting the payload from the popover.
  • Widens the PayloadData.body type from string to unknown to allow non-string bodies to be passed through.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
libs/designer-v2/src/lib/ui/FloatingRunButton/payloadPopover.tsx Attempts to parse JSON strings into objects/arrays before calling onSubmit to avoid double-escaping.
libs/designer-v2/src/lib/ui/FloatingRunButton/index.tsx Updates the payload type to allow non-string body values.

Comment on lines 110 to +114
const onRunClick = useCallback(() => {
// Parse a JSON object/array body so the HTTP client serializes it exactly once.
// Sending the raw string would let the client JSON.stringify it again, double-escaping the payload.
let body: unknown = bodyValue;
if (typeof bodyValue === 'string') {
Comment on lines 47 to 52
export type PayloadData = {
method?: string;
headers?: Record<string, string>;
queries?: Record<string, string>;
body?: string;
body?: unknown;
};
@Anzure

Anzure commented Jun 22, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

2 participants