Skip to content

fix(web): copy multi-output workflow results#34975

Open
officialasishkumar wants to merge 1 commit intolanggenius:mainfrom
officialasishkumar:fix/workflow-webapp-multi-output-copy
Open

fix(web): copy multi-output workflow results#34975
officialasishkumar wants to merge 1 commit intolanggenius:mainfrom
officialasishkumar:fix/workflow-webapp-multi-output-copy

Conversation

@officialasishkumar
Copy link
Copy Markdown

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Fixes #34632.

Published Workflow WebApp runs with multiple output fields serialize the full result into the Detail content while workflowProcessData.resultText remains empty. The action bar only showed copy for workflow Result-tab text, so multi-output workflow results had no usable main copy action.

This change exposes the workflow copy action on the Detail tab when serialized output exists, and makes workflow copy content fall back to that serialized output when resultText is empty. It keeps the existing single-string Result-tab behavior unchanged.

Screenshots

Before After
Multi-output workflow Detail output had no main copy action. Detail output exposes the copy action and copies the serialized JSON result.

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

Validation

  • PATH=/home/sarthak/.npm/_npx/54df5c7b67c3fbcf/node_modules/node/bin:$PATH ../node_modules/.bin/vp test app/components/app/text-generate/item/__tests__/action-groups.spec.tsx app/components/app/text-generate/item/__tests__/utils.spec.ts
  • PATH=/home/sarthak/.npm/_npx/54df5c7b67c3fbcf/node_modules/node/bin:$PATH ../node_modules/.bin/vp run lint:ci app/components/app/text-generate/item/action-groups.tsx app/components/app/text-generate/item/utils.ts app/components/app/text-generate/item/__tests__/action-groups.spec.tsx app/components/app/text-generate/item/__tests__/utils.spec.ts
  • PATH=/home/sarthak/.npm/_npx/54df5c7b67c3fbcf/node_modules/node/bin:$PATH NODE_OPTIONS=--max-old-space-size=8192 ../node_modules/.bin/vp run type-check
  • pre-commit hook completed: ESLint autofix, type-check:tsgo, and knip

Expose the copy action for workflow runs when the Detail tab contains serialized output but resultText is empty, which happens for multi-field Workflow WebApp outputs. Fall back to the serialized content in getCopyContent so users can copy the full result JSON from the action bar.

Fixes langgenius#34632
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 11, 2026
@github-actions github-actions bot added the web This relates to changes on the web. label Apr 11, 2026
@dosubot dosubot bot added the javascript Pull requests that update javascript code label Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code size:M This PR changes 30-99 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Published Workflow WebApp has no usable copy action for multi-output workflow results

1 participant