Skip to content

ui: rebuild the window chrome — custom headers, no toolbar - #104

Merged
vaayne merged 8 commits into
mainfrom
titlebar-polish
Jul 24, 2026
Merged

vaayne merged 8 commits into
mainfrom
titlebar-polish

Conversation

@vaayne

@vaayne vaayne commented Jul 24, 2026

Copy link
Copy Markdown
Owner

What

Rebuilds the main window chrome as a clean three-column layout with fully custom headers. The titlebar NSToolbar is gone; the window is now hidden-titlebar + fullSizeContentView, and each column carries its own slim 38pt header band:

  • Center: terminal tabs (220pt cap, truncating titles, quiet idle tabs, hover close) · drag gap · companion-pane toggle
  • Right (companion): Files/Git tab bar replacing the old title strip — clicking a tab selects/switches tools in place; ⌘E/⌘G keep their toggle semantics
  • Left (sidebar): drag strip under the traffic lights; footer gains Open Project · Agent Dashboard · Settings

Empty header area drags the window; double-click honors the System Settings title-bar action.

Why

On macOS 26 the system wraps every toolbar item in Liquid Glass capsules (not opt-out), which clashed with the themed chrome; the toolbar's tab-strip sizing (cached anchor geometry, » overflow) was also chronically fragile. Nine titlebar buttons competed with terminal tabs for one strip. All of that is replaced by ordinary views the theme pipeline already knows how to paint.

Functionality safety net

Every retired toolbar button remains reachable: menu items and shortcuts unchanged, Command Palette gains its missing menu item (Window ▸ Command Palette…, ⇧⌘P), and the palette adds Toggle Sidebar / Open Files Pane / Open Git Pane / Split Right / Split Down. The ⌘-hold hint pills died with the buttons they annotated.

Commits

  • 673a7b0 titlebar: cap tab width, quiet idle tabs, recover from » overflow (pre-rewrite fix, superseded in part by the rewrite)
  • bcff23d chrome: replace the titlebar toolbar with a custom 38pt header
  • 5c407eb companion: replace the pane's title header with a Files/Git tab bar
  • 5bf396b sidebar: app-level footer actions + palette entries for chrome commands
  • d1b8dcd docs: sync architecture and changelogs with the chrome rewrite

Verification

  • mise run test — all suites green (incl. MoriUI 34 assertions, MoriTmux 259)
  • swift build -c release for both Mori and mori — exit 0
  • CI=1 bash scripts/bundle.sh — bundle built
  • Manual (V): Phase 1 & most Phase 2/3 chrome behavior verified on macOS 26.5 — drag/double-click, shortcuts, fullscreen, sidebar collapse insets, theme reload

vaayne added 8 commits July 24, 2026 12:06
A lone tab used to stretch across the whole titlebar (deliberate
Safari-style fill) and read as a giant band; tabs are now capped at
220pt with truncating titles, idle tabs drop their fill, and hover
highlights the tab and reveals its close button.

The strip width math also deadlocked the trailing toolbar group in the
» overflow menu: once the Files anchor overflowed, its cached inset
could never refresh, so the strip kept the width that caused the
overflow. When the anchor is unmeasurable we now reserve enough room
for the whole trailing group so the toolbar can bring it back.
The main window drops NSToolbar entirely and becomes fullSizeContentView:
on macOS 26 toolbar items are wrapped in system glass capsules that clash
with the themed chrome, and the toolbar's geometry games (tab strip sizing
against cached anchor positions, » overflow) were fragile at any width.

The center column now carries a 38pt header — terminal tabs leading, a
window-drag gap, one companion-pane toggle trailing, hairline below —
and the flanking columns reserve a matching drag strip under the hidden
titlebar. Empty chrome drags the window; double-click performs the
System Settings title-bar action. All nine former toolbar buttons keep
their menu items and shortcuts; Command Palette gains the menu item it
was missing (⇧⌘P). The ⌘-hold hint pills die with the buttons they
annotated.
The right column's 28pt title strip becomes a 38pt tab bar aligned with
the center header, so the two read as one chrome band under the hidden
titlebar (the bare drag strip Phase 1 left above the pane is gone).
Clicking a tab selects that tool — opens the pane, switches from the
other tool, or focuses the active one — while ⌘E/⌘G keep their toggle
semantics (close when the same tool is visible and focused). The pane
carries no close button by design; dismissal lives in the center
header's toggle and the shortcuts.
The footer becomes the home for persistent app-level actions now that
the titlebar buttons are gone: Open Project leading, Agent Dashboard and
Settings trailing, quiet icons that brighten on hover with shortcut
tooltips. The command palette gains Toggle Sidebar, Open Files Pane,
Open Git Pane, Split Right, and Split Down so every retired button stays
discoverable by search as well as by menu and shortcut.
Also drops UpdateAccessoryView.swift, an unreferenced titlebar-accessory
implementation superseded by the overlay pill.
The sidebar lost its only mouse affordance when the toolbar went away
(⌘B and the menu item remained). A sidebar.left button now leads the
center header, ahead of the tabs; the collapsed-sidebar inset moves
with it so it clears the traffic lights.
Fully transparent idle tabs read as plain text next to the selected
pill; a 5.5% fill (8% on hover, 11% selected) keeps them recognizably
clickable without reintroducing the heavy band.
The update pill floats over the header band (no titlebar to badge), and
the ThemedSurface examples in AGENTS.md now lead with HeaderBarView.
@vaayne
vaayne merged commit b19b3ef into main Jul 24, 2026
5 checks passed
@vaayne
vaayne deleted the titlebar-polish branch July 24, 2026 06:04
vaayne added a commit that referenced this pull request Jul 24, 2026
The custom three-column layout (#104) handled divider drags on the
root view controller's responder chain, but the flanking views
(SwiftUI sidebar, terminal surface) consume mouse events, leaving
only the literal 1px divider line hittable — resizing was effectively
impossible. Each divider now has a dedicated topmost 8pt drag handle
that owns its own mouse events and cursor, and shows an accent-colored
highlight on hover/drag. Sidebar max width raised 260 -> 400pt.
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