Skip to content

chore: bring bonsplit in-tree and fix top bar window dragging#121

Open
lsoengas wants to merge 2 commits into
mainfrom
chore/bonsplit-in-tree
Open

chore: bring bonsplit in-tree and fix top bar window dragging#121
lsoengas wants to merge 2 commits into
mainfrom
chore/bonsplit-in-tree

Conversation

@lsoengas

Copy link
Copy Markdown

What this does

Two things, in order:

  1. Moves bonsplit (the tabs and split panes library) from a git submodule into the repo as regular source. The submodule pointed at manaflow-ai's repo where we have no push access, so we literally could not land fixes to it. Now bonsplit changes are normal commits and PRs, and this PR includes the first one:
  2. You can now drag the window from the top tab bar's empty space in every mode, not just Minimal Mode. Together with fix: drag the window from the sidebar's empty area #119 (sidebar drag) this fixes the window only being movable from the tiny strip next to the traffic lights.

Per Franco's call: bonsplit comes in-tree, ghostty stays a submodule fork since programa is still a ghostty wrapper.

Summary

Commit 1 - vendoring:

  • vendor/bonsplit files committed verbatim from manaflow-ai/bonsplit @ b2788b1e, omitting the Example app, the www site, and upstream CI config
  • Submodule entry removed from .gitmodules (ghostty untouched); no Xcode changes needed since bonsplit was already consumed as a local path package (XCLocalSwiftPackageReference)
  • CLAUDE.md submodule rule, /pull and /sync-branch commands, and THIRD_PARTY_LICENSES.md updated (MIT license, provenance recorded)

Commit 2 - top bar drag fix (vendor/bonsplit/.../TabBarView.swift):

  • The tab bar's empty-space drag zones were gated to workspacePresentationMode == "minimal"; the gate is removed so they work in every mode
  • The 114pt gutter reserved for the split-action icons was bare SwiftUI padding with no view behind it, so clicks there were silently swallowed by the scroll view; it is now a real transparent drag-capture view using the same mechanism as the existing 30pt zone after the last tab
  • Clicks on tabs, drag-to-reorder, hover tracking, and minimal mode's double-click zoom are unchanged

Test Plan

  • Manual: window drags from the whole empty top-bar strip in standard mode
  • Manual: tab selection, drag-to-reorder, splits, and divider dragging unaffected
  • Local build green (xcodebuild Debug, fresh derived data)
  • Fresh checkout has bonsplit files with no submodule init needed
  • CI

No automated regression test: AppKit hit-testing behavior our unit environment cannot exercise end-to-end, per the repo test quality policy.

lsoengas added 2 commits July 10, 2026 13:11
vendor/bonsplit was a git submodule pointing at manaflow-ai/bonsplit,
where we have no push access, so we could not land fixes to it. Per
team decision, bring the library into the repo as regular source (MIT
license permits this) so bonsplit changes become normal commits and
PRs. ghostty stays a submodule fork.

Vendored verbatim from manaflow-ai/bonsplit at
b2788b1, omitting the Example app,
the www site, and upstream CI config. Xcode already consumes it as a
local path package (XCLocalSwiftPackageReference), so no build-system
changes are needed. Docs and slash commands updated to drop bonsplit
from submodule workflows.
The tab bar's empty-space drag zones only moved the window in minimal
presentation mode, and the 114pt gutter reserved for the split-action
icons was bare SwiftUI padding with no view behind it, so clicks there
were swallowed by the scroll view and did nothing.

Un-gate the drag zones so the empty strip drags the window in every
presentation mode, and replace the dead trailing padding with a real
transparent drag-capture view using the same mechanism as the existing
30pt zone after the last tab. Clicks on tabs, drag-to-reorder, hover
tracking, and minimal mode's double-click zoom are unchanged.
@lsoengas lsoengas requested a review from arzafran July 10, 2026 18:56
@lsoengas lsoengas marked this pull request as ready for review July 10, 2026 18:56
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