Skip to content

Open in new tab - #2832

Open
jbm wants to merge 3 commits into
git-up:masterfrom
jbm:open-in-new-tab
Open

jbm wants to merge 3 commits into
git-up:masterfrom
jbm:open-in-new-tab

Conversation

@jbm

@jbm jbm commented Oct 9, 2026 •

Copy link
Copy Markdown

When the Option key is held down and there is a repo window open, File > Open turns into Open in New Tab. When selected, it opens the new repo into a new tab in the existing window, rather than opening in a new window.

The reason for this is I always operate in a single, full-screen window for visibility and to ensure I see vertical side by side diffs. This streamlines the workflow so I don't have to repeatedly open in a window, zoom the window, then merge all windows. Hopefully done in a way that is minimally invasive and affects nobody if you don't look for it.

This also revealed a potential bug for other future UI changes where the "viewing 'repo branch'" toast was not relative to the content, and so got shown "under" the tab bar.

I AGREE TO THE GITUP CONTRIBUTOR LICENSE AGREEMENT

As noted in the commit comments, these changes were assisted by Claude Opus 5.5, including app tests that I kept local since there doesn't seem to be an overarching automated test scheme. No offense intended if I missed commentary forbidding AI assisted submissions, and none taken if rejected for same.

jbm and others added 3 commits October 9, 2026 10:21
Holding Option in the File menu now turns "Open…" into "Open in New Tab…" (⌥⌘O) when a repository window is already open, and the selected repositories are opened as tabs of that window, using the same code path as `gitup -t`.

When no repository window is open the alternate is hidden so Option keeps showing "Open…", and if the last repository window is closed while the open panel is up, the repositories are opened in new windows instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The overlay banner shown by GIWindowController was given a fixed frame computed from the window content layout rect at the moment it appeared. When the window gained a tab bar afterwards (for example when another repository is added as a tab, or when the window itself is merged into a tab group), the banner stayed in place and ended up hidden underneath the tab bar.

The overlay is now positioned with Auto Layout and pinned to the top of the content view safe area, the same way the help banner in the repository window is, so it follows the titlebar as the tab bar appears or disappears.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Open in New Tab…" was hidden from -validateMenuItem: when no repository window was open, but AppKit had already swapped in the alternate by then, and it swaps in hidden alternates anyway. With only the welcome window open, pressing Option therefore still turned "Open…" into "Open in New Tab…".

The item is now updated whenever the number of open documents changes: without a repository window it is hidden and no longer an alternate, so pressing Option keeps showing "Open…". It is restored as the visible Option alternate as soon as a repository window opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds an Option-key alternate for opening repositories in tabs and moves notifications below the window’s top safe area.

  • Holding Option lets you open another repository in a GitUp tab.
  • Toast messages follow the content area as the tab bar changes.

No actionable issues were found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["Option + File > Open"] --> B["Choose repository folders"]
  B --> C{"Any documents still open?"}
  C -->|Yes| D["Use existing tab-opening helper"]
  C -->|No| E["Open in a window"]
  D --> F{"Repository already open?"}
  F -->|Yes| G["Show existing repository"]
  F -->|No| H["Create window with tabbing preferred"]
Loading

Reviews (1) · Last reviewed commit: "Keep "Open…" when pressing Option withou..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant