Skip to content

Compact tool UI: move setting to UI section + add negative tests #455

Description

@edelauna

Follow-up from PR #327 review.

1. Move compactToolUI toggle to UISettings

compactToolUI is a display preference (how chat rows render), but it's currently in the Context Management settings section alongside settings that control model context (maxOpenTabsContext, maxWorkspaceFiles).

It belongs in UISettings.tsx, next to reasoningBlockCollapsed (collapse thinking blocks) and enterBehavior.

Files to update:

  • webview-ui/src/components/settings/ContextManagementSettings.tsx — remove compactToolUI prop + checkbox
  • webview-ui/src/components/settings/UISettings.tsx — add compactToolUI prop + checkbox
  • webview-ui/src/components/settings/SettingsView.tsx — pass compactToolUI to UISettings instead of ContextManagementSettings

2. Add negative-path regression tests

ChatRow.compact-tool.spec.tsx only tests the happy path (compactToolUI=true, isExpanded=false). Two negative cases are missing:

  • isExpanded=true → compact row must NOT render
  • compactToolUI=false → compact row must NOT render

These guard against accidentally removing either condition from if (compactToolUI && !isExpanded).


Ref: #327

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions