-
Notifications
You must be signed in to change notification settings - Fork 20.3k
Open
Labels
🐞 bugSomething isn't workingSomething isn't working
Description
Self Checks
- This is only for bug reports. For questions, please head to Discussions.
- I have searched for existing issues. No duplicate found.
- I have provided all relevant information.
Describe the bug
When a Workflow app uses Human Input nodes, the copy button in the Webapp result screen remains disabled (greyed out) after the workflow completes. Users cannot copy the final output text.
Root Cause Analysis
In web/app/components/share/text-generation/result/index.tsx:
tempMessageIdis assignedworkflow_run_idinonWorkflowStarted(~line 299)messageIdstate is set fromtempMessageIdinonWorkflowFinished(~line 494)- When the workflow pauses at a Human Input node,
onWorkflowPausedreconnects SSE viasseGet(~line 554). However,tempMessageIdis a local variable scoped to the originalhandleRunclosure — it is not preserved across the new SSE connection's callbacks - As a result, when
onWorkflowFinishedfires after resume,tempMessageIdisundefined, somessageIdremainsnull - The copy button has
disabled={isError || !messageId}, which staystrue
Suggested fix
In onWorkflowPaused, before reconnecting SSE, capture and restore tempMessageId from the paused workflow's workflow_run_id:
onWorkflowPaused: () => {
// ... existing code ...
// Preserve tempMessageId for the resumed SSE connection
const pausedRunId = workflowProcessData.id
// When reconnecting:
tempMessageId = pausedRunId // ensure it's available in the new closure
}Steps to Reproduce
- Create a Workflow app containing at least one Human Input node
- Publish the app as a Webapp
- Run the workflow — it pauses at the Human Input node
- Submit the form (approve/revise/reject)
- Workflow finishes successfully
- Observe the copy button in the result area — it is disabled
Expected Behavior
The copy button should be active after the workflow completes, allowing users to copy the output text.
Actual Behavior
The copy button remains disabled/greyed out. The only workaround is manual text selection or viewing the output in the workflow tracing/log panel.
Environment
- Dify version: 1.13.0 (self-hosted, Docker)
- Browser: Chrome (also reproducible in other browsers)
- OS: macOS / Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🐞 bugSomething isn't workingSomething isn't working