Skip to content

Replace automation dialog isolation picker with checkbox - #325887

Draft
benvillalobos wants to merge 1 commit into
bv/git-branch-picker-modelfrom
bv/automations-checkbox
Draft

Replace automation dialog isolation picker with checkbox#325887
benvillalobos wants to merge 1 commit into
bv/git-branch-picker-modelfrom
bv/automations-checkbox

Conversation

@benvillalobos

@benvillalobos benvillalobos commented Jul 15, 2026

Copy link
Copy Markdown
Member

Part 3 (final part) in a wave of PRs to make BranchPicker reusable across surfaces without requiring a session object.

#325712 decouples the branch picker from requiring a session to exist

#325886 creates a general class that implements the branch picking / loading / switching behavior implemented in CopilotChatSessionsProvider

This PR brings in the GitBranchPickerModel introduced in #325886, which allows the AutomationDialog to reuse the shared branch picker between the NewChatWidget and other consumers.

Recording.2026-07-14.172924.mp4

Replaces the isolation mode dropdown with a checkbox + branch picker,
matching the new-session IsolationPicker/PickerActionViewItem pattern:
- Skip super.render() to avoid container-level mousedown/focus handlers
- Suppress outline on container (matching PickerActionViewItem)
- Use .sessions-chat-picker-slot.sessions-chat-isolation-checkbox with
  .action-label row, Gesture+Tap handlers, and disabled guard
- Checkbox size 14 with defaultCheckboxStyles
- Disable checkbox until git repo is loaded (branches available)
- Add pointer-events: none to .sessions-chat-picker-slot.disabled in CSS
- Remove dead isolation chip CSS
- Label: 'New Worktree'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reuses the shared branch picker in the Automation dialog and replaces the isolation-mode picker with a worktree checkbox.

Changes:

  • Adds checkbox-based isolation selection.
  • Uses GitBranchPickerModel and BranchPicker.
  • Updates disabled and compact toolbar styling.
Show a summary per file
File Description
aiCustomizationManagement.css Updates automation picker layout and divider styling.
chatWidget.css Disables pointer interaction for disabled picker slots.
automationDialog.ts Integrates the shared branch picker and worktree checkbox.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • Review effort level: Medium

}

const branchPickerModelObs = constObservable(branchPickerModel);
const branchPicker = this.renderDisposables.add(this.instantiationService.createInstance(BranchPicker, branchPickerModelObs));
Comment on lines +2897 to +2898
margin-left: 4px;
box-shadow: -4px 0 0 -3px var(--vscode-editorWidget-border);
Comment on lines +2893 to +2895
/* Mirror the new-session `|` divider between the checkbox and branch picker:
* `box-shadow: -5px 0 0 -4px var(--vscode-editorWidget-border)` paints
* a 1px-wide bar in the gap to the chip's left. */
* a 1px-wide bar in the gap to the slot's left. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants