Skip to content

fix: multi repo issue about #43#44

Open
Chzxxuanzheng wants to merge 2 commits intoasispts:mainfrom
Chzxxuanzheng:scm-button-fix
Open

fix: multi repo issue about #43#44
Chzxxuanzheng wants to merge 2 commits intoasispts:mainfrom
Chzxxuanzheng:scm-button-fix

Conversation

@Chzxxuanzheng
Copy link
Copy Markdown
Contributor

Q A
Type bugfix
Issue Fix #43
  • record currentBridge at neo-git-graph.view to communicate with webview
  • when run neo-git-graph.view, it will auto switch the currentRepo
  • loadRepos now can update currentRepo to the lastActiveRepo
  • webview panel now can set initial repo

@Chzxxuanzheng Chzxxuanzheng requested a review from asispts as a code owner April 10, 2026 03:30
Copilot AI review requested due to automatic review settings April 10, 2026 03:30
Copy link
Copy Markdown

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

Fixes multi-repo behavior by allowing neo-git-graph.view to open/switch the graph for the repo associated with the SCM context, and synchronizing the selected repo between the extension and the webview.

Changes:

  • Extend neo-git-graph.view to accept an SCM/resource argument, switch the backend repo, and notify an existing webview to switch repos.
  • Add support for setting an initial repo when creating the webview panel (via initialRepo / lastActiveRepo).
  • Update the webview’s loadRepos logic to switch currentRepo to lastActiveRepo when appropriate; add SCM title menu contribution and command icon metadata.

Reviewed changes

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

File Description
src/webview/main.ts Webview repo-switching logic updated to honor lastActiveRepo and reformat several payloads.
src/extension/webviewPanel.ts Adds initialRepo option and persists it as lastActiveRepo before building webview HTML.
src/extension.ts Enhances neo-git-graph.view to parse SCM context, switch repo, and coordinate with an already-open webview via currentBridge.
package.json Adds command icon metadata and contributes the view command to the SCM title menu.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/webview/main.ts
Comment thread src/extension.ts
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