#14562

macos: optional vertical tab sidebar

OpenPriyans-huwants to merge intofrom

Adds a vertical-tabs value for macos-titlebar-style that lists tabs in a sidebar instead of the native tab bar:

macos-titlebar-style = vertical-tabs

It's the transparent titlebar plus the sidebar. Tabs are still native window tabs, so tab keybinds and Show All Tabs behave the same. Right-clicking a sidebar tab gives the native tab menu, and the sidebar can be resized or collapsed to a rail. Like the other titlebar styles, it applies to new windows.

I know #2549 was closed for now since vertical tabs need custom tab bars. This version keeps the native tab model and is mostly one new file, so I'm putting it up in case it's useful. Happy to move it to a discussion if you'd rather.

The sidebar started in @Somnathumapathi's fork, and his commits keep him as the author. I added the titlebar style and stopped the sidebar from keeping closed windows registered with their tab group.

AI disclosure: written with Claude Code. I directed it, reviewed the changes, and tested them myself.

Tested on macOS 26.5 (Apple silicon): the vertical-tabs and tabs titlebar styles, switching between them with a config reload, and opening and closing tabs and windows.

Activity

13
bo2themaxreviewed24d ago
bo2themax24d ago

Haven't reviewed the changes yet, but why not just add another value instead of introducing a new option.

Priyans-hu24d ago

Yeah, we can do that too. I'll switch it to a macos-titlebar-style value (something like vertical-tabs) and push that in a bit.

Priyans-hu22d ago

@bo2themax done, it's now macos-titlebar-style = vertical-tabs and the separate option is gone.

bocan21d ago

Is "Rename tab" on the right-click menu working for you in vertical mode? I can't get the name to change. Double clicking doesn't work either.

bocan21d ago

@Priyans-hu : Note, I'm not vouched here - just passing through as I'd LOVE a vertical menu... I fixed the renaming on my local copy.

One more thing I'd add if it were my PR is an XCUITest. Use GhosttyTitlebarTabsUITests.swift as the pattern. it sets macos-titlebar-style = tabs through GhosttyCustomConfigCase and inspects the window.

You just need 1 UI test file, something like GhosttyVerticalTabsUITests.swift, with macos-titlebar-style = vertical-tabs and maybe five cases:

  1. Right click the selected row, choose the "Rename Tab..." option, type a name, press Return then Assert app.windows.firstMatch.title is the new name.
  2. Double-click the selected row, type a name, press Return. Assert app.windows.firstMatch.title is the new name.
  3. Double-click, type, press Escape. Assert the title is unchanged.
  4. Double-click, delete all text, press Return. Assert the title returns to the default.
  5. Maybe check two tabs: right-click the unselected row and choose Rename. That is the most complex path in my code.

Hope that helps. Best of luck as I've just read #2549. oof.