From 0d9da5d9f08a30d26adea1c606af9ce673e08b33 Mon Sep 17 00:00:00 2001 From: Jeon Suyeol Date: Mon, 9 Mar 2026 11:09:54 +0900 Subject: [PATCH 1/2] Move worktree selector to the left of branch selector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorder toolbar from Repository → Branch → Worktree → Fetch to Repository → Worktree → Branch → Fetch, matching Git's conceptual hierarchy where worktrees are a higher-level abstraction than branches. Closes pol-rivero/github-desktop-plus#80 --- app/src/ui/app.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/ui/app.tsx b/app/src/ui/app.tsx index afe29c3935..fed49d04d0 100644 --- a/app/src/ui/app.tsx +++ b/app/src/ui/app.tsx @@ -3561,8 +3561,8 @@ export class App extends React.Component {
{this.renderRepositoryToolbarButton()}
- {this.renderBranchToolbarButton()} {this.renderWorktreeToolbarButton()} + {this.renderBranchToolbarButton()} {this.renderPushPullToolbarButton()} ) From 5f593a028069e8c7176ff705a92da58c42bddca8 Mon Sep 17 00:00:00 2001 From: Jeon Suyeol Date: Tue, 10 Mar 2026 13:28:32 +0900 Subject: [PATCH 2/2] Update resize allocation priority to match new toolbar order --- app/src/lib/stores/app-store.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/src/lib/stores/app-store.ts b/app/src/lib/stores/app-store.ts index 1b2715b2bb..b19bc9f822 100644 --- a/app/src/lib/stores/app-store.ts +++ b/app/src/lib/stores/app-store.ts @@ -2679,12 +2679,24 @@ export class AppStore extends TypedBaseStore { this.commitSummaryWidth = constrain(this.commitSummaryWidth, 100, filesMax) this.stashedFilesWidth = constrain(this.stashedFilesWidth, 100, filesMax) - // Allocate branch first (highest priority), then worktree, then + // Allocate worktree first (highest priority), then branch, then // push-pull. Each subsequent allocation uses the clamped value of the // previous to prevent the total from exceeding the available space. + const worktreeDropdownMax = + available - defaultBranchDropdownWidth - defaultPushPullButtonWidth + const minimumWorktreeDropdownWidth = + defaultWorktreeDropdownWidth > available / numButtons + ? available / numButtons - 10 + : defaultWorktreeDropdownWidth + this.worktreeDropdownWidth = constrain( + this.worktreeDropdownWidth, + minimumWorktreeDropdownWidth, + worktreeDropdownMax + ) + const branchDropdownMax = available - - (this.showWorktrees ? defaultWorktreeDropdownWidth : 0) - + (this.showWorktrees ? clamp(this.worktreeDropdownWidth) : 0) - defaultPushPullButtonWidth const minimumBranchDropdownWidth = defaultBranchDropdownWidth > available / numButtons @@ -2696,22 +2708,10 @@ export class AppStore extends TypedBaseStore { branchDropdownMax ) - const worktreeDropdownMax = - available - clamp(this.branchDropdownWidth) - defaultPushPullButtonWidth - const minimumWorktreeDropdownWidth = - defaultWorktreeDropdownWidth > available / numButtons - ? available / numButtons - 10 - : defaultWorktreeDropdownWidth - this.worktreeDropdownWidth = constrain( - this.worktreeDropdownWidth, - minimumWorktreeDropdownWidth, - worktreeDropdownMax - ) - const pushPullButtonMaxWidth = available - - clamp(this.branchDropdownWidth) - - (this.showWorktrees ? clamp(this.worktreeDropdownWidth) : 0) + (this.showWorktrees ? clamp(this.worktreeDropdownWidth) : 0) - + clamp(this.branchDropdownWidth) const minimumPushPullToolBarWidth = defaultPushPullButtonWidth > available / numButtons ? available / numButtons - 10