feat(webview): surface condense button and context progress bar in collapsed task header#680
Conversation
…llapsed task header
…ineDashed, bump lucide-react to ^1.18.0
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR adds ChangesCollapsed header controls and icon refresh
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.changeset/add-condense-button-to-collapsed-task-header.md (1)
1-6:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRemove this changeset file from the PR.
This repo’s review policy says agents should not generate
.changesetentries during normal development.As per coding guidelines, ".changeset/**: Do NOT create
.changesetfiles for each commit or code change. Changesets are managed separately by maintainers and should not be generated by agents during normal development."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.changeset/add-condense-button-to-collapsed-task-header.md around lines 1 - 6, The file `.changeset/add-condense-button-to-collapsed-task-header.md` should not be included in this PR according to the repository's review policy. Agents should not generate `.changeset` entries during normal development as changesets are managed separately by maintainers. Remove this entire changeset file from the PR.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@webview-ui/src/components/chat/__tests__/TaskHeader.spec.tsx`:
- Around line 136-143: In the test "should render the condense context button in
the collapsed state", update the SVG selector in the find method that currently
looks for "svg.lucide-fold-vertical" to instead look for the correct lucide
class corresponding to the ListChevronsDownUp icon that the component now
renders. Replace the selector string to match the actual class name generated by
the ListChevronsDownUp icon from lucide-react.
---
Outside diff comments:
In @.changeset/add-condense-button-to-collapsed-task-header.md:
- Around line 1-6: The file
`.changeset/add-condense-button-to-collapsed-task-header.md` should not be
included in this PR according to the repository's review policy. Agents should
not generate `.changeset` entries during normal development as changesets are
managed separately by maintainers. Remove this entire changeset file from the
PR.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 4d51dfe2-a513-4c80-b2ce-f0275d6c3442
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
.changeset/add-condense-button-to-collapsed-task-header.mdwebview-ui/package.jsonwebview-ui/src/components/chat/TaskHeader.tsxwebview-ui/src/components/chat/__tests__/TaskHeader.spec.tsxwebview-ui/src/components/chat/context-management/CondensationResultRow.tsxwebview-ui/src/components/chat/context-management/TruncationResultRow.tsxwebview-ui/src/components/settings/ContextManagementSettings.tsx
context-compress-icon-compressed.mov |
|
Demonstration of the new ScissorsLineDashed icon replacing "FoldVertical" to represent Context Truncation: context-truncated.mov |
…st-chevrons-down-up
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Related GitHub Issue
Closes: #606
Description
Surfaces the context compaction button and linear context window progress bar in the collapsed task header, so users don't need to expand the header to monitor or act on context pressure.
Implementation:
TaskHeader.tsx, renders a small right-side container within the collapsed header containingContextWindowProgressand the condense button, wrapped in astopPropagationclick handler so interacting with these controls does not toggle header expansion.FoldVertical(removed in lucide-react 1.x) withListChevronsDownUpfor all condense-related UI: the collapsed header button,CondensationResultRow, and the condensing threshold section inContextManagementSettings.FoldVerticalwithScissorsLineDashedinTruncationResultRowto visually distinguish truncation events from condensation events.lucide-reactfrom^0.518.0to^1.18.0(resolved to 1.21.0) to gain access to the new icons.Test Procedure
ListChevronsDownUpfor condensation,ScissorsLineDashedfor truncation).ListChevronsDownUpicon.Pre-Submission Checklist
Screenshots / Videos
See comments.
Documentation Updates
Additional Notes
The
FoldVerticalicon was removed in lucide-react 1.x. The version bump is required to accessListChevronsDownUpandScissorsLineDashed. Thepnpm-lock.yamlupdate is a side effect of the version bump.Get in Touch
aws
Summary by CodeRabbit
New Features
Dependencies
lucide-reactto a newer version.Style
Tests