Skip to content

Background - validate upstream branch before creating the worktree#308953

Merged
lszomoru merged 2 commits intomainfrom
lszomoru/contemporary-fly
Apr 10, 2026
Merged

Background - validate upstream branch before creating the worktree#308953
lszomoru merged 2 commits intomainfrom
lszomoru/contemporary-fly

Conversation

@lszomoru
Copy link
Copy Markdown
Member

@lszomoru lszomoru commented Apr 10, 2026

Fixes #308848

Copilot AI review requested due to automatic review settings April 10, 2026 05:57
@lszomoru lszomoru enabled auto-merge (squash) April 10, 2026 05:57
@lszomoru lszomoru self-assigned this Apr 10, 2026
@lszomoru lszomoru added the copilot-cli-agent Background Agent related features/bugs label Apr 10, 2026
@lszomoru lszomoru added this to the 1.116.0 milestone Apr 10, 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 updates the Copilot chat session worktree creation flow to validate that a base branch’s upstream ref actually resolves before using it as the worktree’s commitish, improving robustness when upstream tracking info is stale or missing.

Changes:

  • When a provided baseBranch has an upstream configured, compute the upstream ref name and attempt to resolve it before using it as the worktree base.
  • Add a warning log when the upstream branch cannot be resolved, falling back to the original base branch.
Show a summary per file
File Description
extensions/copilot/src/extension/chatSessions/vscode-node/chatSessionWorktreeServiceImpl.ts Adds upstream-branch resolution/validation logic prior to selecting the worktree base branch.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

@github-actions
Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 05d42a27 Current: b6435d90

Changed (2)

agentSessionsViewer/WithMarkdownBadge/Dark
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Light
Before After
before after

@lszomoru lszomoru merged commit eb62869 into main Apr 10, 2026
26 checks passed
@lszomoru lszomoru deleted the lszomoru/contemporary-fly branch April 10, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot-cli-agent Background Agent related features/bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agents: After running a CLI session, I now no longer see CLI sessions in the Agents app

3 participants