Skip to content

Isolate the Folder Option stuff to be replaced with the bigger worktree/folder/branch picker that copilot cli uses#311098

Draft
TylerLeonhardt wants to merge 1 commit intomainfrom
tyler/rubber-bovid
Draft

Isolate the Folder Option stuff to be replaced with the bigger worktree/folder/branch picker that copilot cli uses#311098
TylerLeonhardt wants to merge 1 commit intomainfrom
tyler/rubber-bovid

Conversation

@TylerLeonhardt
Copy link
Copy Markdown
Member

Functionally no change, just refactoring.

…ee/folder/branch picker that copilot cli uses

Functionally no change, just refactoring.
Copilot AI review requested due to automatic review settings April 17, 2026 21:05
@TylerLeonhardt TylerLeonhardt self-assigned this Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors Claude chat-session “folder option” group logic into a dedicated builder to better align with the larger worktree/folder/branch picker pattern used by the Copilot CLI, while keeping behavior the same.

Changes:

  • Extract folder option-group building/mutation into a new ClaudeFolderOptionBuilder, and update ClaudeSessionOptionBuilder to orchestrate permission mode + delegated folder groups via a proxy input-state pattern.
  • Move folder-related unit tests out of claudeSessionOptionBuilder.spec.ts into a new claudeFolderOptionBuilder.spec.ts.
  • Extend fork-handler tests to assert session state (permission mode + folder info) is copied to the forked session.
Show a summary per file
File Description
extensions/copilot/src/extension/chatSessions/vscode-node/test/claudeSessionOptionBuilder.spec.ts Removes folder-related tests now covered by the new folder builder test suite.
extensions/copilot/src/extension/chatSessions/vscode-node/test/claudeFolderOptionBuilder.spec.ts New test suite covering folder option group building, input-state rebuild/lock, and default folder resolution.
extensions/copilot/src/extension/chatSessions/vscode-node/test/claudeChatSessionContentProvider.spec.ts Strengthens fork tests to verify session state is propagated to the forked session.
extensions/copilot/src/extension/chatSessions/vscode-node/claudeSessionOptionBuilder.ts Refactors to delegate folder groups to ClaudeFolderOptionBuilder and manages permission mode group directly.
extensions/copilot/src/extension/chatSessions/vscode-node/claudeFolderOptionBuilder.ts New extracted implementation for folder option group construction and state mutation helpers.
extensions/copilot/src/extension/chatSessions/vscode-node/claudeChatSessionContentProvider.ts Updates imports to reference FOLDER_OPTION_ID from the new folder builder module.

Copilot's findings

  • Files reviewed: 6/6 changed files
  • Comments generated: 0

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