Skip to content

Optionally extract Worktrees into a separate side window and make Status window optional#5326

Open
armanarutiunov wants to merge 6 commits intojesseduffield:masterfrom
armanarutiunov:worktrees-in-separate-group
Open

Optionally extract Worktrees into a separate side window and make Status window optional#5326
armanarutiunov wants to merge 6 commits intojesseduffield:masterfrom
armanarutiunov:worktrees-in-separate-group

Conversation

@armanarutiunov
Copy link
Copy Markdown

@armanarutiunov armanarutiunov commented Feb 26, 2026

PR Description

Disclaimer: this PR is completely clauded and as I don't have experience with go, I can't really guarantee code quality, so apologies in advance.

Motivation

I'm a heavy worktree user and one thing I wanted improved in the app is visibility of all the worktrees and the currently selected one. Right now the worktree menu is buried in the second window group as a separate tab. What I always wanted is to have a dedicated worktree window group.

While thinking about it I realised if I was to add a separate group, the total group count would be 6 which can be a bit too tight on smaller screens. Plus not everybody is using worktrees and for some it would be a useless change that occupies precious terminal real estate.

So, I decided to add 2 config flags, one for showing the worktree group as a separate group, second one is for hiding the very first status group to free up some space in case user doesn't care about that group. Both are false by default.

Implementation (claude generated)

Two new independent gui config options:

  • worktreesInSeparateGroup (bool, default false) — moves Worktrees out of the Files tab group into its own side panel window, positioned between Status and Files
  • hideStatusPanel (bool, default false) — hides the Status panel entirely from the side panel

When both are enabled, the layout becomes: Worktrees[1] → Files[2] → Branches[3] → Commits[4] → Stash[5] — preserving the default 5-key jump binding.

When worktreesInSeparateGroup is enabled without hiding status, there are 6 windows. The jump-to-block controller auto-extends keybindings (adding key "6") so no manual config change is needed.

Key changes:

  • SideWindows() dynamically builds the window list based on config
  • sidePanelChildren() conditionally includes/excludes status and worktrees boxes across all layout modes (full/half screen, normal, squashed)
  • Worktrees context switches its WindowName from "files" to "worktrees" when separated
  • viewTabMap() removes the Worktrees tab from the Files group when separated
  • Panel jump labels are assigned dynamically based on the actual window list

Screenshots

With status section Screenshot 2026-02-26 at 16 13 56
Without Section Screenshot 2026-02-26 at 17 01 12

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@armanarutiunov armanarutiunov changed the title Worktrees in separate group Worktrees in a separate window group Feb 26, 2026
@armanarutiunov armanarutiunov changed the title Worktrees in a separate window group Optionally extract Worktrees into a separate side window and make Status window optional Feb 26, 2026
armanarutiunov and others added 6 commits April 14, 2026 10:25
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@armanarutiunov armanarutiunov force-pushed the worktrees-in-separate-group branch from 7a7e6a9 to c424430 Compare April 14, 2026 09:26
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 2 duplication

Metric Results
Complexity 0
Duplication 2

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

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.

1 participant