Skip to content

Per-workspace repository trees, multi-selection on the Welcome page, and zoom-aware popups - #2883

Open
N0og wants to merge 3 commits into
sourcegit-org:masterfrom
N0og:feature/workspace-repositories
Open

N0og wants to merge 3 commits into
sourcegit-org:masterfrom
N0og:feature/workspace-repositories

Conversation

@N0og

@N0og N0og commented Nov 11, 2026

Copy link
Copy Markdown

Summary

Per-workspace repository trees

  • Each workspace now owns its repositories and groups; a repository belongs to a single workspace.
  • The Welcome page, its search, the group pickers of "Clone" and "Open Local Repository", the "Move to Another Group" dialog and the repository palette only show the active workspace.
  • Everything that used to go to the tree root (add, clone, init, trust, scan, open from command line, create group, drop on empty area) now goes to the active workspace. A repository that already belongs to another workspace is opened but not moved.
  • Deleting a workspace moves its tree into the active workspace.
  • Automatic migration on first load: a group with the same name as a workspace becomes that workspace's tree (exact casing wins on ties); everything else goes to the "Default" workspace.

Multi-selection on the Welcome page

  • Ctrl+click, Shift+click and rubber-band selection started from any empty space of the page.
  • Drag the whole selection onto a group, or use "Move N Items to Another Group" from the context menu.
  • Drag detection moved to the list itself, since the pressed item may capture the pointer. This also fixes dragging on Linux.

Zoom

  • Context menus, sub-menus, flyouts, tooltips and drop-downs now scale with the window zoom.

Technical notes

  • Each workspace's tree lives in a hidden top-level group in RepositoryNodes, referenced by Workspace.RootGroupId. This avoids rewriting every lookup that searches the global tree and guarantees a repository belongs to only one workspace.
  • Preferences.GetScopeRoot() centralizes the "root = active workspace" rule in AddNode, MoveNode, FindOrAddNodeByRepositoryPath and FindOrCreateGroupRecursive.
  • Specs and design are in openspec/specs/ and openspec/changes/archive/2026-11-10-workspace-repo-groups/.

Compatibility

  • Existing preference.json files are migrated without data loss. An older SourceGit build opening a migrated file shows each workspace as a top-level group with the same name.

Testing

  • Debug and Release builds with no warnings; dotnet format --verify-no-changes passes.
  • Manual testing on Linux with a real preference.json: migration, switching workspaces, search, clone/open local, create/delete/rename workspace, Ctrl/Shift/rubber-band selection, dragging several items, and restarting the app.
  • Not tested on Windows or macOS.

🤖 Generated with Claude Code

N0og and others added 3 commits November 10, 2026 23:52
Popups (context menus, sub-menus, flyouts, tooltips, drop-downs) are
separate top-levels, so they did not inherit the zoom applied by the
window template and stayed tiny when zoomed in. Apply the same zoom in
the PopupRoot template, and drop InheritsTransform from the branch
selector popup so it is not scaled twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… several repositories at once

Workspaces:
- Each workspace now owns its repositories and groups. The tree lives in
  a hidden top-level group referenced by `Workspace.RootGroupId`, so a
  repository belongs to a single workspace.
- The Welcome page, its search, the group pickers of Clone and Open
  Local Repository, the Move dialog and the repository palette only
  show the active workspace.
- Everything that used to go to the tree root (add, clone, init, trust,
  scan, open from command line, create group, drop on empty area) goes
  to the active workspace. A repository already in another workspace is
  opened but not moved.
- On first load the global tree is migrated: a group with the same name
  as a workspace becomes its tree (exact casing wins on ties) and
  everything else goes to the "Default" workspace.
- Deleting a workspace moves its tree into the active workspace.

Repository tree selection:
- Multiple selection with Ctrl/Shift and rubber-band selection started
  from any empty space of the Welcome page.
- Drag the whole selection onto a group, or use "Move N Items to Another
  Group" from the context menu.
- Drag detection moved to the list itself, since the pressed item may
  capture the pointer; this also fixes dragging on Linux.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 02:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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