Problem
When working with a task, the task header is often collapsed to save screen space. However, as the task progresses, context pressure increases. Currently, users must expand the task header to see or click the compaction controls (the condense button and the linear context progress bar), which disrupts the vertical flow of the chat.
Context
This affects all users who keep their task headers collapsed while working but want to monitor or act on context window usage/pressure.
Desired behavior
Surface the context compaction controls (the ContextWindowProgress bar and the condense/compaction FoldVertical button) directly within the collapsed task header on the right-hand side. Clicking these controls should trigger context compaction immediately, without expanding the task header itself.
Proposed approach
In webview-ui/src/components/chat/TaskHeader.tsx, render a small container on the right side of the collapsed task header containing ContextWindowProgress and condenseButton. Wrap this container in a click handler that calls e.stopPropagation() to prevent toggling expansion of the header card.
Acceptance criteria
- When the task header is collapsed, the linear context progress bar and the condense button are visible on the right.
- Clicking the condense button triggers context compaction.
- Clicking the progress bar or condense button does NOT expand or collapse the task header.
- When buttons are disabled, the condense button in the collapsed state is also disabled.
Problem
When working with a task, the task header is often collapsed to save screen space. However, as the task progresses, context pressure increases. Currently, users must expand the task header to see or click the compaction controls (the condense button and the linear context progress bar), which disrupts the vertical flow of the chat.
Context
This affects all users who keep their task headers collapsed while working but want to monitor or act on context window usage/pressure.
Desired behavior
Surface the context compaction controls (the
ContextWindowProgressbar and the condense/compactionFoldVerticalbutton) directly within the collapsed task header on the right-hand side. Clicking these controls should trigger context compaction immediately, without expanding the task header itself.Proposed approach
In
webview-ui/src/components/chat/TaskHeader.tsx, render a small container on the right side of the collapsed task header containingContextWindowProgressandcondenseButton. Wrap this container in a click handler that callse.stopPropagation()to prevent toggling expansion of the header card.Acceptance criteria