[PR #2007] fix: chat log wont show up #23371

Closed
opened 2026-02-21 20:20:57 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/2007

State: closed
Merged: Yes


This bug was introduced by the upgrade to Next.

For reasons unknown, the chat/log/index.tsx component is executed twice, which also results in two instances of PromptLogModal being triggered.

When a user activates the onClick event in chat/log/index.tsx, the first PromptLogModal is successfully rendered. However, the second PromptLogModal inadvertently triggers the onCancel of the first modal through the

useClickAway(() => {
    if (mounted)
      onCancel()
  }, ref)

Consequently, the entire PromptLogModal is prematurely dismissed.

The current solution involves stopping the event propagation in chat/log/index.tsx to prevent the double triggering of PromptLogModal. This approach is both controlled and effectively resolves the issue.

**Original Pull Request:** https://github.com/langgenius/dify/pull/2007 **State:** closed **Merged:** Yes --- This bug was introduced by the upgrade to `Next`. For reasons unknown, the `chat/log/index.tsx` component is executed twice, which also results in two instances of `PromptLogModal` being triggered. When a user activates the `onClick` event in `chat/log/index.tsx`, the first `PromptLogModal` is successfully rendered. However, the second `PromptLogModal` inadvertently triggers the `onCancel` of the first modal through the ``` useClickAway(() => { if (mounted) onCancel() }, ref) ``` Consequently, the entire `PromptLogModal` is prematurely dismissed. The current solution involves stopping the event propagation in `chat/log/index.tsx` to prevent the double triggering of `PromptLogModal`. This approach is both controlled and effectively resolves the issue.
yindo added the pull-request label 2026-02-21 20:20:57 -05:00
yindo closed this issue 2026-02-21 20:20:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#23371