[PR #4939] [CLOSED] Fix pending chat indicator rerendering when typing in input #4833

Closed
opened 2026-02-22 18:36:37 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4939
Author: @shatfield4
Created: 1/29/2026
Status: Closed

Base: masterHead: 4938-bug-pending-chat-rerendering-ui-bug


📝 Commits (1)

  • 74cfe18 fix pending chat indicator rerendering when typing in input

📊 Changes

3 files changed (+7 additions, -26 deletions)

View changed files

📝 frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx (+0 -4)
📝 frontend/src/components/WorkspaceChat/ChatContainer/index.jsx (+6 -14)
📝 frontend/src/hooks/usePromptInputStorage.js (+1 -8)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #4938

  • Fixes the pending chat indicator (3 dot animation) rerendering/flickering when typing in the input while waiting for a
    response
  • message state in ChatContainer was updating on every keystroke, causing unnecessary rerenders of the entire chat history including the pending indicator (pending indicator was the only visible bug but the entire history was actually rerendering)
  • Removed redundant message state sync since PromptInput already maintains its own local state and now reads from DOM on submit instead

What is in this change?

Additional Information

  • Sent regular chat and no longer rerenders 3 dot animation while message is pending
  • Test STT in both auto submit and append mode
  • Localstorage draft messages store properly
  • Slash commands pops up on / typed into chat input
  • Agent meny pops up on @ typed into chat input
  • Pasted text pastes properly
  • Undo/redo works properly
  • Enter to submit chat, shift + enter creates new line

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/4939 **Author:** [@shatfield4](https://github.com/shatfield4) **Created:** 1/29/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `4938-bug-pending-chat-rerendering-ui-bug` --- ### 📝 Commits (1) - [`74cfe18`](https://github.com/Mintplex-Labs/anything-llm/commit/74cfe182cbba2d314afa762f8debe61b124cf39e) fix pending chat indicator rerendering when typing in input ### 📊 Changes **3 files changed** (+7 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx` (+0 -4) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/index.jsx` (+6 -14) 📝 `frontend/src/hooks/usePromptInputStorage.js` (+1 -8) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [x] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #4938 - Fixes the pending chat indicator (3 dot animation) rerendering/flickering when typing in the input while waiting for a response - `message` state in ChatContainer was updating on every keystroke, causing unnecessary rerenders of the _entire chat history_ including the pending indicator (pending indicator was the only visible bug but the entire history was actually rerendering) - Removed redundant `message` state sync since PromptInput already maintains its own local state and now reads from DOM on submit instead ### What is in this change? <!-- Describe the changes in this PR that are impactful to the repo. --> ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> - [x] Sent regular chat and no longer rerenders 3 dot animation while message is pending - [x] Test STT in both auto submit and append mode - [x] Localstorage draft messages store properly - [x] Slash commands pops up on `/` typed into chat input - [x] Agent meny pops up on `@` typed into chat input - [x] Pasted text pastes properly - [x] Undo/redo works properly - [x] Enter to submit chat, shift + enter creates new line ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:36:37 -05:00
yindo closed this issue 2026-02-22 18:36:37 -05:00
yindo changed title from [PR #4939] Fix pending chat indicator rerendering when typing in input to [PR #4939] [CLOSED] Fix pending chat indicator rerendering when typing in input 2026-06-05 15:20:37 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4833