Skip to content

[ENHANCEMENT] Show context compaction controls in collapsed task header #606

@awschmeder

Description

@awschmeder

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

  1. When the task header is collapsed, the linear context progress bar and the condense button are visible on the right.
  2. Clicking the condense button triggers context compaction.
  3. Clicking the progress bar or condense button does NOT expand or collapse the task header.
  4. When buttons are disabled, the condense button in the collapsed state is also disabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions