Skip to content

[codex] Expose equalize splits as a keyboard shortcut - #3200

Closed
simpsonkorea wants to merge 2 commits into
manaflow-ai:mainfrom
simpsonkorea:codex/equalize-splits-shortcut
Closed

simpsonkorea wants to merge 2 commits into
manaflow-ai:mainfrom
simpsonkorea:codex/equalize-splits-shortcut

Conversation

@simpsonkorea

@simpsonkorea simpsonkorea commented Apr 28, 2026 •

Copy link
Copy Markdown

Summary

  • add a cmux-owned Equalize Splits shortcut action with the Ghostty-compatible default Cmd+Ctrl+=
  • route the shortcut and View menu item to the existing TabManager.equalizeSplits implementation
  • show the shortcut in command palette hints, settings.json schema, and keyboard shortcut docs
  • add a shortcut-routing regression test that seeds uneven split dividers and verifies the shortcut restores them to 0.5

Why

Ghostty already has equalize_splits, but cmux users cannot reliably discover or use an app-level shortcut for restoring split pane balance. This addresses #2482 by exposing the behavior through cmux's shortcut system instead of relying on the RPC workaround.

Validation

  • git diff --check
  • JSON.parse for web/data/cmux-settings.schema.json and Resources/Localizable.xcstrings

Not tested

  • Full Xcode app build: blocked locally because Zig is not installed and GhosttyKit.xcframework is absent. After submodule init, xcodebuild reached project build planning and failed on the missing GhosttyKit.xcframework.
  • reload.sh: blocked locally because Zig is not installed.

Fixes #2482


Summary by cubic

Adds an app-level Equalize Splits shortcut to balance pane dividers. Default is Cmd+Ctrl+=, and it’s configurable via settings. Fixes #2482.

  • New Features
    • Added equalizeSplits in KeyboardShortcutSettings with a localized label and default Cmd+Ctrl+=.
    • Routed keyboard shortcut, command palette, and View menu to TabManager.equalizeSplits with a beep fallback when no workspace is active.
    • Updated web/data/cmux-settings.schema.json and web/data/cmux-shortcuts.ts for schema, hints, and docs; added a regression test that seeds uneven splits and verifies they reset to 0.5 via the shortcut.

Written for commit 29ee116. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • New Features

    • Equalize split panes: quickly resize all splits to equal sizes via a new keyboard shortcut (Cmd+Control+=), the command palette, or the Tab navigation menu.
  • Configuration

    • Settings schema and shortcuts UI updated to include the new action and default binding.
  • Tests

    • Added shortcut routing tests to verify reliable behavior and equalized divider positions.

Ghostty already has an equalize_splits action, but cmux did not expose an editable app-level shortcut for restoring split pane divider balance. Route Cmd+Ctrl+= through the cmux shortcut layer to the existing TabManager equalize implementation, show that shortcut in the command palette/menu/docs, and allow settings.json overrides via the existing shortcut registry.

Constraint: New cmux-owned shortcuts must be in KeyboardShortcutSettings, settings.json schema, and docs.

Rejected: Rely on the existing RPC workaround | not discoverable for keyboard-driven pane workflows

Confidence: medium

Scope-risk: narrow

Directive: Keep equalize_splits wired to the existing TabManager.equalizeSplits path unless split layout ownership changes.

Tested: git diff --check; JSON parse for web/data/cmux-settings.schema.json and Resources/Localizable.xcstrings

Not-tested: Full Xcode app build blocked locally because Zig is not installed and GhosttyKit.xcframework is absent
@vercel

vercel Bot commented Apr 28, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Manaflow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Apr 28, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 04801dd4-3abc-4003-980d-08264ceee941

📥 Commits

Reviewing files that changed from the base of the PR and between e2f4d36 and 29ee116.

📒 Files selected for processing (1)
  • Sources/KeyboardShortcutSettings.swift

📝 Walkthrough

Walkthrough

Adds a new keyboard shortcut action equalizeSplits (default ⌘+⌃+=) and wires it through shortcut settings, command palette, AppDelegate routing, a UI command, web shortcut metadata, JSON schema, and tests to equalize split-pane sizes in the current workspace.

Changes

Cohort / File(s) Summary
Shortcut Settings
Sources/KeyboardShortcutSettings.swift
Adds Action.equalizeSplits, localized label, default ⌘+⌃+= binding, and a static accessor equalizeSplitsShortcut().
Shortcut Routing / Handlers
Sources/AppDelegate.swift, Sources/ContentView.swift
AppDelegate: handles .equalizeSplits by calling tabManager.equalizeSplits(tabId:) (beeps on missing/failure) and consumes the event. ContentView maps "palette.equalizeSplits" to the new action.
App UI Commands
Sources/cmuxApp.swift
Adds a "Equalize split sizes" command in the Tab navigation group that invokes equalize logic for the selected workspace and beeps on failure or missing workspace.
Web metadata & schema
web/data/cmux-shortcuts.ts, web/data/cmux-settings.schema.json
Adds equalizeSplits entry to web shortcut categories (EN/JA descriptions, default combo) and includes "equalizeSplits" in the JSON schema shortcuts.bindings.propertyNames enum.
Tests
cmuxTests/AppDelegateShortcutRoutingTests.swift
Adds tests that build a nested split layout, offset split dividers, trigger the Cmd+Ctrl+= shortcut via AppDelegate, and assert dividers become equal (0.5) without changing split count.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AppDelegate
  participant TabManager
  participant Workspace
  participant SystemAudio

  User->>AppDelegate: Press ⌘+⌃+= (equalizeSplits)
  AppDelegate->>TabManager: equalizeSplits(tabId: selectedWorkspaceId)
  TabManager->>Workspace: applyEqualSizes()
  Workspace-->>TabManager: success / failure
  alt success
    TabManager-->>AppDelegate: true
    AppDelegate-->>User: consume event (no further handling)
  else failure or missing workspace
    TabManager-->>AppDelegate: false
    AppDelegate->>SystemAudio: NSSound.beep()
    AppDelegate-->>User: consume event
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A rabbit's ode to equal splits
Panes were scattered, sides askew,
Cmd+Ctrl+= hopped into view.
Dividers nudged to center lines,
Balanced widths — how sweet it shines! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: exposing an equalize splits feature as a keyboard shortcut, which matches the primary objective of adding keyboard-driven split-pane improvements.
Description check ✅ Passed The description provides a clear summary of changes, explains the motivation (fixing #2482), documents what was tested and what wasn't, and follows most template sections. The Testing and Demo sections are partially addressed through validation notes.
Linked Issues check ✅ Passed The PR implements the equalize splits requirement from #2482 by adding keyboard shortcut routing, menu integration, and tests. The cyclic pane switching feature from #2482 is not addressed, but only equalize splits was the explicit scope of this PR.
Out of Scope Changes check ✅ Passed All changes are within scope: keyboard shortcut setup, command palette/menu integration, schema updates, localization, and regression tests directly support the equalize splits objective. No unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@simpsonkorea
simpsonkorea marked this pull request as ready for review April 29, 2026 05:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cmuxTests/AppDelegateShortcutRoutingTests.swift`:
- Around line 719-747: Before invoking debugHandleCustomShortcut, assert the
seeded layout is actually uneven by checking the divider positions returned from
shortcutRoutingSplitNodes(in: workspace.bonsplitController.treeSnapshot()) (or
by querying each split's dividerPosition after calling
bonsplitController.setDividerPosition) and failing the test if all splits are
0.5; this ensures setDividerPosition (used in the loop over seededSplits and its
targetPosition) actually changed at least one split away from 0.5 before you
call appDelegate.debugHandleCustomShortcut(event:) and verify equalization.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d79ddbc3-06c4-4fc1-92e6-a6750b22e8fe

📥 Commits

Reviewing files that changed from the base of the PR and between fac0ccc and e2f4d36.

📒 Files selected for processing (7)
  • Sources/AppDelegate.swift
  • Sources/ContentView.swift
  • Sources/KeyboardShortcutSettings.swift
  • Sources/cmuxApp.swift
  • cmuxTests/AppDelegateShortcutRoutingTests.swift
  • web/data/cmux-settings.schema.json
  • web/data/cmux-shortcuts.ts

Comment on lines +719 to +747
for (index, split) in seededSplits.enumerated() {
guard let splitId = UUID(uuidString: split.id) else {
XCTFail("Expected split ID to be a UUID")
return
}
let targetPosition: CGFloat = index.isMultiple(of: 2) ? 0.2 : 0.8
XCTAssertTrue(workspace.bonsplitController.setDividerPosition(targetPosition, forSplit: splitId))
}

guard let event = makeKeyDownEvent(
key: "=",
modifiers: [.command, .control],
keyCode: 24,
windowNumber: window.windowNumber
) else {
XCTFail("Failed to construct Cmd+Ctrl+= event")
return
}

#if DEBUG
XCTAssertTrue(appDelegate.debugHandleCustomShortcut(event: event))
#else
XCTFail("debugHandleCustomShortcut is only available in DEBUG")
#endif

let equalizedSplits = shortcutRoutingSplitNodes(in: workspace.bonsplitController.treeSnapshot())
XCTAssertEqual(equalizedSplits.count, seededSplits.count)
for split in equalizedSplits {
XCTAssertEqual(split.dividerPosition, 0.5, accuracy: 0.000_1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Assert seeded layout is actually uneven before invoking equalize.

setDividerPosition(...) == true alone doesn’t guarantee the layout moved away from 0.5. Without a precondition check, this test can false-pass if seeding becomes a no-op.

Suggested patch
         for (index, split) in seededSplits.enumerated() {
             guard let splitId = UUID(uuidString: split.id) else {
                 XCTFail("Expected split ID to be a UUID")
                 return
             }
             let targetPosition: CGFloat = index.isMultiple(of: 2) ? 0.2 : 0.8
             XCTAssertTrue(workspace.bonsplitController.setDividerPosition(targetPosition, forSplit: splitId))
         }
+
+        let postSeedSplits = shortcutRoutingSplitNodes(in: workspace.bonsplitController.treeSnapshot())
+        XCTAssertTrue(
+            postSeedSplits.contains(where: { abs($0.dividerPosition - 0.5) > 0.000_1 }),
+            "Precondition failed: expected at least one non-equal divider before triggering equalize shortcut"
+        )
 
         guard let event = makeKeyDownEvent(
             key: "=",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cmuxTests/AppDelegateShortcutRoutingTests.swift` around lines 719 - 747,
Before invoking debugHandleCustomShortcut, assert the seeded layout is actually
uneven by checking the divider positions returned from
shortcutRoutingSplitNodes(in: workspace.bonsplitController.treeSnapshot()) (or
by querying each split's dividerPosition after calling
bonsplitController.setDividerPosition) and failing the test if all splits are
0.5; this ensures setDividerPosition (used in the loop over seededSplits and its
targetPosition) actually changed at least one split away from 0.5 before you
call appDelegate.debugHandleCustomShortcut(event:) and verify equalization.

@greptile-apps

greptile-apps Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR exposes TabManager.equalizeSplits as a first-class cmux shortcut (default Cmd+Ctrl+=), wires it through the keyboard handler, View menu, and command palette, and adds a regression test. The integration is clean across KeyboardShortcutSettings, ContentView, schema, and docs.

  • Both the keyboard handler (AppDelegate.swift) and the View menu item (cmuxApp.swift) call NSSound.beep() when equalizeSplits(tabId:) returns false. Because the underlying implementation also returns false when there are no splits at all (foundSplit stays false), any user with a single unsplit pane will hear an audible error simply by pressing the shortcut or clicking the menu item — a surprising and unhelpful UX response to a no-op.

Confidence Score: 3/5

Not safe to merge as-is; the beep-on-no-op bug will affect any user who invokes the shortcut without active splits.

Two P1 findings (AppDelegate and cmuxApp both beep when workspace has no splits) lower the score below the P1 ceiling of 4. The core equalization logic itself is correct — the issue is solely in how callers interpret the return value.

Sources/AppDelegate.swift and Sources/cmuxApp.swift — both need the beep guard updated to treat a no-split workspace as a silent no-op.

Important Files Changed

Filename Overview
Sources/AppDelegate.swift Adds equalizeSplits shortcut handler; beeps unexpectedly when workspace has no splits (foundSplit=false path)
Sources/cmuxApp.swift Adds View menu item for Equalize Splits; same beep-on-no-op issue when workspace is unsplit
Sources/KeyboardShortcutSettings.swift Adds equalizeSplits action, default shortcut (Cmd+Ctrl+=), and convenience accessor; label key departs from shortcut.*.label convention
Sources/ContentView.swift Routes palette.equalizeSplits command ID to the .equalizeSplits action and registers its execution handler; correct and consistent with existing palette wiring
cmuxTests/AppDelegateShortcutRoutingTests.swift Adds regression test that seeds uneven dividers and verifies they normalize to 0.5 after shortcut; test is DEBUG-only and correctly asserts seeding success via XCTAssertTrue
web/data/cmux-settings.schema.json Adds equalizeSplits to the shortcut action enum in the JSON schema; no issues
web/data/cmux-shortcuts.ts Adds equalizeSplits entry with Ctrl+Cmd+= combo and English/Japanese descriptions to the docs shortcut list; no issues

Sequence Diagram

sequenceDiagram
    participant User
    participant AppDelegate
    participant cmuxApp as cmuxApp (View Menu)
    participant ContentView as ContentView (Palette)
    participant TabManager

    User->>AppDelegate: Cmd+Ctrl+= key event
    AppDelegate->>AppDelegate: matchConfiguredShortcut(.equalizeSplits)
    AppDelegate->>TabManager: equalizeSplits(tabId: workspace.id)
    TabManager-->>AppDelegate: Bool (false if no splits)
    alt false (no splits or error)
        AppDelegate->>User: NSSound.beep() ⚠️
    else true
        AppDelegate->>User: (silent success)
    end

    User->>cmuxApp: View → Equalize Splits
    cmuxApp->>TabManager: equalizeSplits(tabId: workspace.id)
    TabManager-->>cmuxApp: Bool (false if no splits)
    alt false (no splits or error)
        cmuxApp->>User: NSSound.beep() ⚠️
    else true
        cmuxApp->>User: (silent success)
    end

    User->>ContentView: Command Palette → palette.equalizeSplits
    ContentView->>TabManager: equalizeSplits(tabId: workspace.id)
    TabManager-->>ContentView: Bool
    alt false
        ContentView->>User: NSSound.beep()
    else true
        ContentView->>User: (silent success)
    end
Loading

Reviews (1): Last reviewed commit: "Expose equalize splits as a cmux shortcu..." | Re-trigger Greptile

Comment thread Sources/AppDelegate.swift
Comment on lines +10612 to +10619
if matchConfiguredShortcut(event: event, action: .equalizeSplits) {
guard let workspace = tabManager?.selectedWorkspace,
tabManager?.equalizeSplits(tabId: workspace.id) == true else {
NSSound.beep()
return true
}
return true
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Beep fired when no splits exist

equalizeSplits(tabId:) returns false in two distinct cases: the tab wasn't found, and the workspace has no splits at all (foundSplit stays false → false && allSucceeded). The current guard treats both as failures and fires NSSound.beep(), so a user with a single unsplit pane gets an audible error every time they press Cmd+Ctrl+=.

The parallel toggleSplitZoom handler immediately above discards its return value (_ = tabManager?.toggleFocusedSplitZoom()) and never beeps on a no-op. Aligning with that pattern—or at least guarding only on a nil tabManager/workspace rather than on the action's Boolean result—would avoid the unexpected beep.

if matchConfiguredShortcut(event: event, action: .equalizeSplits) {
    if let workspace = tabManager?.selectedWorkspace {
        _ = tabManager?.equalizeSplits(tabId: workspace.id)
    }
    return true
}

Comment thread Sources/cmuxApp.swift
Comment on lines +696 to +702
splitCommandButton(title: String(localized: "command.equalizeSplits.title", defaultValue: "Equalize Splits"), shortcut: menuShortcut(for: .equalizeSplits)) {
guard let workspace = activeTabManager.selectedWorkspace,
activeTabManager.equalizeSplits(tabId: workspace.id) else {
NSSound.beep()
return
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Same spurious beep on single-pane workspaces

This menu-item action shares the same beep-on-no-op problem as the keyboard handler: equalizeSplits(tabId:) returns false for an unsplit workspace, triggering NSSound.beep(). A user choosing "Equalize Splits" from the menu with only one pane open will hear an error sound with no visual explanation.

splitCommandButton(title: String(localized: "command.equalizeSplits.title", defaultValue: "Equalize Splits"), shortcut: menuShortcut(for: .equalizeSplits)) {
    if let workspace = activeTabManager.selectedWorkspace {
        _ = activeTabManager.equalizeSplits(tabId: workspace.id)
    }
}

Comment thread Sources/KeyboardShortcutSettings.swift Outdated
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
austinywang added a commit that referenced this pull request Apr 29, 2026
Follow-up to community PR #3200. The shortcut was exposed, but review and manual verification found three rough edges: the regression did not prove the seeded layout was uneven, no-op single-pane invocations beeped, and a single programmatic equalize pass let parent split resizing leave nested split views stale until a later interaction.

This keeps the shortcut configurable through KeyboardShortcutSettings and settings.json, gives its Settings label a dedicated localization key, treats single-pane equalize as a silent no-op, and reasserts equalized divider positions on deferred main-queue follow-up passes so nested horizontal and vertical splits settle from one shortcut invocation.

Constraint: Follow-up to community PR #3200; push only to manaflow-ai/cmux

Rejected: Treat equalize false as user-facing error | single-pane workspaces are a valid no-op

Rejected: Only refresh terminal geometry cache | manual verification showed the nested NSSplitView itself still needed a deferred divider reassertion

Confidence: high

Scope-risk: narrow

Tested: git diff --check

Tested: JSON parse for Resources/Localizable.xcstrings and web/data/cmux-settings.schema.json

Tested: ./scripts/reload.sh --tag codex-equalize-splits-shortcut-followup --launch

Tested: Manual tagged build verification with uneven nested horizontal+vertical splits; one Cmd+Ctrl+= changed root 925/405 to 665/665 and nested 298/618 to 458/458 without another click or keypress

Not-tested: Local unit tests because repo runner invokes xcodebuild directly
austinywang added a commit that referenced this pull request May 4, 2026
* Expose equalize splits as a cmux shortcut

Ghostty already has an equalize_splits action, but cmux did not expose an editable app-level shortcut for restoring split pane divider balance. Route Cmd+Ctrl+= through the cmux shortcut layer to the existing TabManager equalize implementation, show that shortcut in the command palette/menu/docs, and allow settings.json overrides via the existing shortcut registry.

Constraint: New cmux-owned shortcuts must be in KeyboardShortcutSettings, settings.json schema, and docs.

Rejected: Rely on the existing RPC workaround | not discoverable for keyboard-driven pane workflows

Confidence: medium

Scope-risk: narrow

Directive: Keep equalize_splits wired to the existing TabManager.equalizeSplits path unless split layout ownership changes.

Tested: git diff --check; JSON parse for web/data/cmux-settings.schema.json and Resources/Localizable.xcstrings

Not-tested: Full Xcode app build blocked locally because Zig is not installed and GhosttyKit.xcframework is absent

* Make equalize splits shortcut merge-ready

Follow-up to community PR #3200. The shortcut was exposed, but review and manual verification found three rough edges: the regression did not prove the seeded layout was uneven, no-op single-pane invocations beeped, and a single programmatic equalize pass let parent split resizing leave nested split views stale until a later interaction.

This keeps the shortcut configurable through KeyboardShortcutSettings and settings.json, gives its Settings label a dedicated localization key, treats single-pane equalize as a silent no-op, and reasserts equalized divider positions on deferred main-queue follow-up passes so nested horizontal and vertical splits settle from one shortcut invocation.

Constraint: Follow-up to community PR #3200; push only to manaflow-ai/cmux

Rejected: Treat equalize false as user-facing error | single-pane workspaces are a valid no-op

Rejected: Only refresh terminal geometry cache | manual verification showed the nested NSSplitView itself still needed a deferred divider reassertion

Confidence: high

Scope-risk: narrow

Tested: git diff --check

Tested: JSON parse for Resources/Localizable.xcstrings and web/data/cmux-settings.schema.json

Tested: ./scripts/reload.sh --tag codex-equalize-splits-shortcut-followup --launch

Tested: Manual tagged build verification with uneven nested horizontal+vertical splits; one Cmd+Ctrl+= changed root 925/405 to 665/665 and nested 298/618 to 458/458 without another click or keypress

Not-tested: Local unit tests because repo runner invokes xcodebuild directly

* Allow extracted equalize split support to refresh workspace layout snapshots

The helper now lives outside Workspace.swift to satisfy the file-length budget, so the cached tmux layout snapshot needs a module-internal setter for same-module Workspace extensions.

Constraint: Workspace.swift must remain within the existing file-length budget.\nRejected: Put didProgrammaticallyChangeSplitGeometry back in Workspace.swift | would regress the budget fix.\nConfidence: high\nScope-risk: narrow\nTested: git diff --check; swift_file_length_budget.py; conflict-marker scan.\nNot-tested: Local unit/UI test suites, per repo policy.

* Make tagged reload app names filesystem-safe

Branch-style tags can contain slashes. reload.sh already derives a filesystem-safe tag slug for paths, sockets, and DerivedData; use that same slug for the default copied app bundle name so the mandatory branch-name tag can build and launch.

Constraint: The user-required reload command passes a branch name containing '/'.\nRejected: Require a different --tag value | task requires the branch name exactly.\nConfidence: high\nScope-risk: narrow\nTested: bash -n scripts/reload.sh; git diff --check scripts/reload.sh.\nNot-tested: Local test suites, per repo policy.

* Avoid recursive shortcut store initialization during config parsing

Settings-file parsing should normalize action-specific shortcut shapes without consulting the shared settings store that is currently being constructed. Using the existing conflict-ignoring normalization path prevents the launch-time dispatch_once recursion crash while keeping numbered and system-wide shortcut validation.

Constraint: KeyboardShortcutSettingsFileStore.swift is at its file-length budget.\nRejected: Use full normalizedRecordedShortcut during config load | it consults KeyboardShortcutSettings.settingsFileStore and recursively initializes the store.\nConfidence: high\nScope-risk: narrow\nTested: git diff --check; swift_file_length_budget.py.\nNot-tested: Local unit/UI test suites, per repo policy.

* Keep equalize split geometry state coherent

Review feedback showed the equalize shortcut could mutate some divider positions while skipping snapshot refresh, terminal reconciliation, or follow-up passes when another divider failed. The handler now uses the same transient terminal-focus guard as split creation, records DEBUG routing traces, and debug-logs failed no-op paths without surfacing single-pane workspaces to users. Equalize traversal now keeps recursing after malformed split IDs, uses Bonsplit's external-change path, and refreshes workspace geometry whenever a split node was visited. Shortcut config parsing also avoids live system-wide conflict checks while loading settings files so it cannot recurse through the shared store during initialization.

Constraint: Single-pane equalize remains a silent no-op for users.

Rejected: Surface an alert on false equalize results | The PR behavior explicitly keeps single-pane workspaces silent; DEBUG logging gives diagnostics without changing UX.

Confidence: high

Scope-risk: moderate

Directive: Keep programmatic split geometry changes on the same Workspace splitTabBar(didChangeGeometry:) path so layout snapshot, terminal geometry, and focus reconciliation stay coupled.

Tested: git diff --check; ./scripts/reload.sh --tag pr3309-comments

Not-tested: Local unit tests; project policy says tests run in CI/prefer CI.

* Respect shortcut parsing file length budget

The conflict-bypass fix for settings-file parsing was behaviorally correct, but formatting alone pushed two already-budgeted Swift files over the CI line-count guard. Collapse the added parsing arguments back into the existing compact style without changing the recursion fix.

Constraint: workflow-guard-tests enforces existing Swift file length budgets.

Rejected: Refresh the budget | This PR can stay inside the current budget without accepting new debt.

Confidence: high

Scope-risk: narrow

Tested: git diff --check; python3 scripts/swift_file_length_budget.py --budget .github/swift-file-length-budget.tsv; ./scripts/reload.sh --tag pr3309-comments

Not-tested: Local unit tests; project policy says tests run in CI/prefer CI.

---------

Co-authored-by: Gyusup Sim <simpson.sim@retn.kr>
@teamleaderleo

Copy link
Copy Markdown
Collaborator

Equalize splits is on main via commit e2f4d36. Thank you for the shortcut implementation :)

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.

Feature Request: Add cyclic pane switching shortcuts and equalize_splits support

2 participants