Skip to content

Respect split-preserve-zoom config when cycling splits#241

Merged
sbertix merged 1 commit intosupabitapp:mainfrom
Whoaa512:fix/zoom-cycle-splits
Apr 15, 2026
Merged

Respect split-preserve-zoom config when cycling splits#241
sbertix merged 1 commit intosupabitapp:mainfrom
Whoaa512:fix/zoom-cycle-splits

Conversation

@Whoaa512
Copy link
Copy Markdown
Contributor

Supacode reimplements split management in WorktreeTerminalState rather than using Ghostty's BaseTerminalController. This means the upstream split-preserve-zoom config option (added in Ghostty v1.3.0) was never read — cycling splits while zoomed always unzoomed.

This PR adds support for split-preserve-zoom = navigation so that goto_split:next/goto_split:previous transfers the zoom to the target pane instead of unzooming, matching upstream Ghostty's behavior in BaseTerminalController.

Changes

  • GhosttyRuntime.swift — read split-preserve-zoom from ghostty config (bit 0 = navigation)
  • WorktreeTerminalState.swiftgotoSplit checks config: preserves zoom when enabled, unzooms when not
  • SplitTreeTests.swift — test covering zoom transfer on focus cycling

Reference

Upstream implementation: BaseTerminalController.swift L645-L651

Comment thread supacode/Features/Terminal/Models/WorktreeTerminalState.swift Outdated
Comment thread supacode/Infrastructure/Ghostty/GhosttyRuntime.swift
@Whoaa512
Copy link
Copy Markdown
Contributor Author

Whoaa512 commented Apr 15, 2026

Addressed review feedback in 1710303:

  • added performSplitAction(.gotoSplit) coverage for preserve vs clear zoom config paths
  • added bitset note + Ghostty source permalink for split-preserve-zoom

Validation: scoped swiftlint passed. Local xcodebuild/make build-app currently fail in swift-composable-architecture under my local Xcode/toolchain so relying on CI here

Upstream Ghostty (v1.3.0+) has split-preserve-zoom = navigation to
keep zoom state when navigating between splits. Supacode's split
management bypasses BaseTerminalController so this config was never
read. Now GhosttyRuntime reads the setting and gotoSplit honors it:
zoom transfers to the next pane when enabled, unzooms when not.
@Whoaa512 Whoaa512 force-pushed the fix/zoom-cycle-splits branch from 8f7c2b6 to 1710303 Compare April 15, 2026 18:00
@sbertix sbertix enabled auto-merge (squash) April 15, 2026 19:17
@sbertix sbertix merged commit bfcd2f0 into supabitapp:main Apr 15, 2026
2 checks passed
Whoaa512 added a commit to Whoaa512/supacode that referenced this pull request Apr 16, 2026
* fix/unfocused-split-opacity: (24 commits)
  add xcbeautify to mise.toml so local builds work without separate install
  install dev build as supacode-dev.app to coexist with homebrew install
  ignore legacy Ghostty build outputs
  work around Xcode 26.4 local builds
  Respect unfocused-split-opacity from Ghostty config
  Add multiple user-defined scripts per repository (supabitapp#246)
  Respect ghostty split-preserve-zoom config when cycling splits (supabitapp#241)
  Improve open worktree UX and rename openFinder to openWorktree (supabitapp#247)
  Add RubyMine editor support (supabitapp#248)
  fix(ci): skip tuist auth on fork pull requests
  stuff
  Align trailing comma tooling
  cache
  Split dependency inspection CI
  Switch Tuist CI auth to OIDC
  simplify build output formatting
  simplify app tuist dependencies
  simplify tuist package linkage
  restore required tuist package overrides
  remove package framework search paths
  ...

# Conflicts:
#	supacode/Features/Repositories/Views/WorktreeRow.swift
#	supacode/Features/Repositories/Views/WorktreeRowsView.swift
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.

2 participants