[PR #30442] fix(web): stop thinking timer when user clicks stop button #32817

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

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

State: closed
Merged: Yes


Summary

  • Fix the issue where the thinking timer continues to run after user clicks stop button
  • The timer now properly stops when isResponding is explicitly set to false

Changes

  • Modified the condition to check for isResponding === false instead of !isResponding
  • This distinguishes between explicit stop (false) and undefined context (when component is used outside ChatContextProvider)
  • Added comprehensive tests for the ThinkBlock component

Test plan

  • New unit tests for ThinkBlock component pass
  • Type check passes (pnpm type-check:tsgo)
  • Lint check passes (pnpm lint:fix)

fixes #20679

**Original Pull Request:** https://github.com/langgenius/dify/pull/30442 **State:** closed **Merged:** Yes --- ## Summary - Fix the issue where the thinking timer continues to run after user clicks stop button - The timer now properly stops when `isResponding` is explicitly set to `false` ## Changes - Modified the condition to check for `isResponding === false` instead of `!isResponding` - This distinguishes between explicit stop (`false`) and undefined context (when component is used outside `ChatContextProvider`) - Added comprehensive tests for the `ThinkBlock` component ## Test plan - [x] New unit tests for ThinkBlock component pass - [x] Type check passes (`pnpm type-check:tsgo`) - [x] Lint check passes (`pnpm lint:fix`) fixes #20679
yindo added the pull-request label 2026-02-21 20:52:08 -05:00
yindo closed this issue 2026-02-21 20:52:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32817