-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: reset condensing state when switching tasks #6922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reset condensing state when switching tasks #6922
Conversation
Previously, when users initiated context condensing and switched to another task before completion, the 'condensing context' indicator would persist on the new task. This fix ensures the condensing state is properly reset in the task switching effect, preventing the indicator from appearing incorrectly on different tasks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! This is a clean, targeted fix that properly addresses the bug described in issue #6919. The implementation is correct and follows the existing patterns in the codebase. I have one suggestion for improvement regarding test coverage.
| setExpandedRows({}) | ||
| everVisibleMessagesTsRef.current.clear() // Clear for new task | ||
| setCurrentFollowUpTs(null) // Clear follow-up answered state for new task | ||
| setIsCondensing(false) // Reset condensing state when switching tasks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good fix! The placement here with other UI state resets is logical and maintains consistency. However, would you consider adding a test case to verify that is properly reset when switching tasks? This would help prevent regression of this bug in the future.
You could add a test in one of the existing ChatView test files that:
- Sets up a task with set to true
- Switches to a different task
- Verifies that is reset to false
daniel-lxs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @f14XuanLv for your contribution!
* main: (70 commits) fix: use native Ollama API instead of OpenAI compatibility layer (RooCodeInc#7137) feat: add support for OpenAI gpt-5-chat-latest model (RooCodeInc#7058) Make enhance with task history default to true (RooCodeInc#7140) Bump cloud version to 0.16.0 (RooCodeInc#7135) Release: v1.51.0 (RooCodeInc#7130) Add an API for resuming tasks by ID (RooCodeInc#7122) Add support for task page event population (RooCodeInc#7117) fix: add type check before calling .match() on diffItem.content (RooCodeInc#6905) (RooCodeInc#6906) Fix: Enable save button for provider dropdown and checkbox changes (RooCodeInc#7113) fix: Use cline.cwd as primary source for workspace path in codebaseSearchTool (RooCodeInc#6902) Hotfix multiple folder workspace checkpoint (RooCodeInc#6903) fix: prevent XML entity decoding in diff tools (RooCodeInc#7107) (RooCodeInc#7108) Refactor task execution system: improve call stack management (RooCodeInc#7035) Changeset version bump (RooCodeInc#7104) feat(web): fill missing SEO-related values (RooCodeInc#7096) Update contributors list (RooCodeInc#6883) Release v3.25.15 (RooCodeInc#7103) fix: add /evals page to sitemap generation (RooCodeInc#7102) feat: implement sitemap generation in TypeScript and remove XML file (RooCodeInc#6206) fix: reset condensing state when switching tasks (RooCodeInc#6922) ...
Related GitHub Issue
Closes: #6919
Roo Code Task Context (Optional)
N/A
Description
This PR fixes a UI state management issue where the context condensing indicator persists incorrectly when switching between tasks.
The fix adds
setIsCondensing(false)to the task switching effect inChatView.tsx, ensuring the condensing state is properly reset when users switch tasks. The change is minimal and focused - just one line of code with appropriate comments.Test Procedure
Pre-Submission Checklist
Screenshots / Videos
N/A - This is a state management fix with no visual UI changes, only behavioral correction.
Documentation Updates
Additional Notes
webview-ui/src/components/chat/ChatView.tsx(line 440)sendingDisabledGet in Touch
N/A - Available via GitHub @f14XuanLv
Important
Fixes UI state issue in
ChatView.tsxby resettingisCondensingwhen switching tasks to prevent indicator persistence.ChatView.tsxby resettingisCondensingtofalsewhen switching tasks.setIsCondensing(false)in the task switchinguseEffectinChatView.tsx.sendingDisabledis not reset.This description was created by
for 872bf4a. You can customize this summary. It will automatically update as commits are pushed.