Repository navigation
[Air #1743] feat: add codev.buildersClickExpands setting - #1744
Merged
Merged
Conversation
Add a boolean setting codev.buildersClickExpands (default true, behavior unchanged) gating whether a single click on a builder row expands the row in addition to opening its terminal. When off, the click only opens the terminal and leaves the row's expand state untouched; the chevron still toggles expand/collapse. - package.json: new setting next to buildersAutoCollapse / buildersAutoReveal. - extension.ts: codev.openBuilderRow reads the setting at click time and delegates to runBuilderRowClick. - views/builders.ts: extract runBuilderRowClick decision core next to AccordionGate; update the row item.command comment. - test: on/off branch, terminal-first order, benign expand-error swallow, and accordion orthogonality (chevron path unaffected).
…gonality test non-tautological Address CMAP (codex REQUEST_CHANGES, claude nits) on PR #1744: - Add a manifest invariant test asserting codev.buildersClickExpands is a declared boolean with default true, so a key typo can't leave the setting silently inert (precedent: contributes-review-queue.test.ts). - Replace the tautological AccordionGate-in-isolation orthogonality tests with the one seam this feature owns: a disabled row click never calls expandRow (no reveal -> no onDidExpandElement), an enabled click does. AccordionGate's own coverage stays in builders-accordion.test.ts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a boolean setting
codev.buildersClickExpands(defaulttrue, behavior unchanged) that controls whether a single click on a builder row in the Agents view expands the row (the changed-files list) in addition to opening the builder terminal. When off, the click only opens the terminal and leaves the row's expand state untouched; the chevron still toggles expand/collapse.Closes #1743
What Changed
apps/vscode/package.json: newcodev.buildersClickExpandsboolean setting (defaulttrue), placed next tocodev.buildersAutoCollapse/codev.buildersAutoReveal, with a description in the same voice.apps/vscode/src/extension.ts: thecodev.openBuilderRowhandler now reads the setting at click time (likebuildersAutoReveal, so no restart is needed) and delegates to the extracted decision core.codev.openBuilderById(terminal-link clicks) is untouched — it never expanded.apps/vscode/src/views/builders.ts: addedrunBuilderRowClick(clickExpands, effects)next toAccordionGate— the pure decision core (always open the terminal; expand only when the setting is on; swallow a benign reveal error when the row is gone mid-cleanup). Also updated the rowitem.commandcomment so it no longer claims the click always expands.apps/vscode/src/__tests__/builders-click-expands.test.ts: new unit tests.Key Decisions
runBuilderRowClickrather than testing the inlineactivate()closure — the same pattern the codebase already uses for click-behavior decisions (AccordionGate) and routing decisions (decideApprovalRelay). This makes the on/off branch unit-testable without activating the extension; the inline handler stays a thin wrapper that reads the config and injects the real effects.() => unknown/() => PromiseLike<unknown>becauseopenBuilderByRoleOrIdreturnsPromise<string | undefined>andrevealreturnsThenable<void>;runBuilderRowClickonly awaits them.Test Plan
builders-click-expands.test.ts): terminal always opens; row expands only when the setting is on; terminal-first order; benign expand-error swallow; and accordion orthogonality (the chevron →onDidExpandElement→AccordionGatepath is independent of the click setting, confirmed by test rather than assertion).pnpm build,pnpm check-types,pnpm lint— all clean).Review Notes
package.json, thecodev.openBuilderRowhandler inextension.ts, andviews/builders.ts— none of the pir-1566-fenced files.codev.buildersAutoCollapse) needed no change: it listens ononDidExpandElement, which the chevron fires independently of the row command. This is pinned by a test rather than asserted.