fix(scm): avoid setting both folderUri and workspace in ResolveConfiguration#456
Merged
NikolaRHristov merged 1 commit intoJun 4, 2026
Merged
Conversation
…uration Setting both causes the workbench to register the same git repo twice, producing duplicate SCM group rows (Staged Changes, Changes, etc.). In Tauri/desktop context (Mountain), only workspace is read by DesktopMain. In browser context, only folderUri is read. Mutually exclude them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The SCM Source Control view renders duplicate group rows (Staged Changes, Untracked Changes, Merge Changes, Changes appear twice each) when opening a folder in Mountain.
Root cause:
ResolveConfigurationwas setting bothfolderUriandworkspaceto the same folder path. The workbench has two independent workspace resolution paths:folderUriis read by the browser workbenchworkspace(ISingleFolderWorkspaceIdentifier) is read byDesktopMain.reviveIdentifier()With both set, the Git extension calls
registerSCMProvidertwice for the same repository, producing 8 group rows instead of 4 in the SCM tree.Fix
Mutually exclude
folderUriandworkspacebased on runtime context:__TAURI_INTERNALS__present): passworkspaceonly, setfolderUri: undefinedfolderUrionly, setworkspace: undefinedChanged file
Source/Function/Install/Function/ResolveConfiguration.ts