Skip to content

show parent folder name on tabs for repositories with duplicate names - #2669

Open
flowprog wants to merge 1 commit into
sourcegit-scm:developfrom
flowprog:samename-parentdir
Open

show parent folder name on tabs for repositories with duplicate names#2669
flowprog wants to merge 1 commit into
sourcegit-scm:developfrom
flowprog:samename-parentdir

Conversation

@flowprog

@flowprog flowprog commented Sep 1, 2026

Copy link
Copy Markdown

Description

When multiple repositories with the same name are opened at the same time, their tabs are indistinguishable — you can only tell them apart by switching through them one by one.

This PR makes the tab bar disambiguate duplicate names by appending the parent folder name:

  • unique name: repo
  • duplicated name: repo (parent-folder)

Implementation

  • Add a DisplayName property to LauncherPage (initialized to the node name) and bind the tab text to it instead of Node.Name.
  • Add Launcher.RefreshTabDisplayNames(), which counts repository tab names and appends the parent folder (from the repository path) only when a name is used by more than one open tab.
  • Refresh display names whenever the tab set can change: opening a repository/sub-repository, closing a tab / other tabs / tabs on the right, and renaming a repository node in preferences.

No behavior change for uniquely-named tabs.

@love-linger

Copy link
Copy Markdown
Collaborator

I do not think this is the right way to distinguish two repository with the same name.

  • SourceGit allows user to create custom groups to manage repositories. So is it better to use group name instead of the parent folder name in disk?
  • SourceGit allows user to give a friendly name for repository (not the folder name, just a label in tab. For example, you can rename two repositories with REPO (fork), REPO (github)
  • SourceGit allows user to set different bookmark for repositories with the same name.

@love-linger love-linger self-assigned this Sep 2, 2026
@flowprog

flowprog commented Sep 2, 2026

Copy link
Copy Markdown
Author

You're referring to a workspace when you say "group," right? Often, duplicate names happen because they come from the same project—a server-side project, a client-side project, or a front-end project—and they're usually placed in the same workspace.

Being able to fully customize names is great, but users need to manually modify them. If the goal is to minimize extra modifications and increase the burden while still providing intuitive differentiation, then automatic naming is also an option. Frankly, I wouldn't have noticed the option to modify it until you mentioned it.

Of course, this is just my opinion.

@love-linger

Copy link
Copy Markdown
Collaborator

No, this is group:

image

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