Skip to content

vscode: setting to stop a builder-row click from expanding the row (codev.buildersClickExpands) #1743

Closed

Description

@amrmelsayed

Problem

In the Agents sidebar view, a single click on a builder row always expands the row's children (the changed-files list) as well as opening the builder terminal. There is no way to turn the expansion off. A user who only wants the terminal, and prefers to open file lists deliberately with the chevron, gets the row popped open on every click.

Origin: the builder row's click runs codev.openBuilderRow (apps/vscode/src/extension.ts, the handler registered around line 1164). It opens the terminal via openBuilderByRoleOrId and then unconditionally calls buildersView.reveal(item, { expand: true, select: false, focus: false }). The two nearby settings do not cover this:

  • codev.buildersAutoCollapse is the accordion (does expanding one builder collapse the others). It does not stop the clicked row from expanding.
  • codev.buildersAutoReveal syncs the tree selection to the active builder-diff editor. It has no effect on the click.

Requirement

Add a boolean setting codev.buildersClickExpands, default true (current behaviour unchanged).

  • When true: the row click opens the terminal and expands the row, exactly as today.
  • When false: the row click only opens the terminal. The row's expand state is left as it was. The chevron still toggles expand/collapse (VS Code routes the chevron independently of the row command; nothing to do there).
  • The setting is read at click time (no restart needed), the same way codev.buildersAutoReveal is read inside its handler.
  • The accordion (codev.buildersAutoCollapse) keeps working when the user expands via the chevron: it listens on onDidExpandElement, which the chevron fires, so no change is expected there. Confirm with a test rather than by assertion.

Placement

  • apps/vscode/package.json contributes.configuration, next to codev.buildersAutoCollapse / codev.buildersAutoReveal, with a description in the same voice as those two.
  • The codev.openBuilderRow handler in apps/vscode/src/extension.ts. Keep the change inside that handler; codev.openBuilderById (terminal-link clicks etc.) already does not expand and must stay as is.
  • Update the comment on the row's item.command assignment in apps/vscode/src/views/builders.ts (around line 667) so it no longer states the click always expands.

Out of scope

  • No title-bar toggle button for this setting (unlike the accordion and file-view toggles). Settings UI is enough.
  • No change to group/architect rows or to the chevron behaviour.

Acceptance

  • With the setting off, clicking a collapsed builder row opens its terminal and the row stays collapsed; clicking an expanded row leaves it expanded.
  • With the setting on (default), behaviour is byte-for-byte what it is today.
  • Unit test on the handler's decision (setting on / off) in the existing extension test style; existing accordion tests stay green.
  • apps/vscode/CHANGELOG.md entry under Unreleased is the architect's job post-merge; do not edit it in the lane.

Activity

  1. added
    area/vscode
    on Sep 28, 2026
  2. added 2 commits that reference this issue on Sep 28, 2026
  3. added 2 commits that reference this issue on Sep 28, 2026
  4. amrmelsayed commented on Sep 28, 2026

    @amrmelsayed
    CollaboratorAuthor

    Shipped. PR #1744 merged to main 2026-09-28T22:12:44Z as merge commit 095ce66 (owner admin-bypass merge, pr gate approved by the owner at 22:01Z).

    What landed: new codev.buildersClickExpands setting, default true (current behaviour unchanged). When off, a builder-row click opens the terminal only and leaves the row's expand state untouched; the chevron still toggles it. The setting is read at click time, no restart needed. The row-click handler now delegates to runBuilderRowClick in views/builders.ts, with a test covering the manifest declaration, both branches, terminal-first ordering, the swallowed expand error, and the accordion seam. Note: with the setting off, a row click also no longer collapses peer builders, because the accordion keys on the expand event the click no longer fires. Intended.

    Changelog: apps/vscode/CHANGELOG.md Unreleased and docs/releases/UNRELEASED.md Polish updated on docs/vscode-changelog (983e8f0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/vscode

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions