Skip to content

feat: add sync indicator for branch changes in chat widget#297933

Merged
benibenj merged 1 commit intomainfrom
benibenj/copilot-worktree-2026-02-26T08-13-19
Feb 26, 2026
Merged

feat: add sync indicator for branch changes in chat widget#297933
benibenj merged 1 commit intomainfrom
benibenj/copilot-worktree-2026-02-26T08-13-19

Conversation

@benibenj
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 26, 2026 10:09
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 26, 2026
Copy link
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 adds a synchronization indicator to the chat widget that displays the number of changes to pull and push for the current Git branch. The indicator appears next to the branch picker and is only visible when working with a local target and when the selected branch has changes to sync with its upstream.

Changes:

  • Introduces a new SyncIndicator class that monitors Git repository state and displays ahead/behind counts
  • Integrates the sync indicator into the chat widget alongside the existing branch picker
  • Adds CSS styling for the sync indicator component

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/vs/sessions/contrib/chat/browser/syncIndicator.ts New component that renders a sync button with ahead/behind counts and executes git sync command
src/vs/sessions/contrib/chat/browser/newChatViewPane.ts Integrates sync indicator into chat widget, managing its visibility and repository state
src/vs/sessions/contrib/chat/browser/media/chatWelcomePart.css Adds styling for sync indicator layout and spacing


private _repository: IGitRepository | undefined;
private _selectedBranch: string | undefined;
private _visible = true;
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The initial visibility should be false rather than true. The sync indicator is set to visible only when the target is local (line 177 in newChatViewPane.ts), but this initialization assumes it should be visible by default, which could cause it to briefly appear before being hidden when the default target is not local.

Suggested change
private _visible = true;
private _visible = false;

Copilot uses AI. Check for mistakes.
@benibenj benibenj merged commit c159d7a into main Feb 26, 2026
24 checks passed
@benibenj benibenj deleted the benibenj/copilot-worktree-2026-02-26T08-13-19 branch February 26, 2026 10:30
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.

3 participants