Draw sizing chrome lines in the split divider color

Merged
LA
2mo ago
+235-45

cmux's shared-terminal sizing bounds drew the grid border and hatch with a contrast palette (lines forced to 3:1, a 14% fill), so on dark themes the area outside the grid read lighter than the split divider next to it. This adds BonsplitSizingChromePalette (border and chip outline = the split divider color composited over the terminal background, hatch = that at 60%, chip fill = the terminal background, chip text keeps 4.5:1) and exposes the divider color as BonsplitConfiguration.Appearance.splitDividerColor.

Testing: swift test ran BonsplitSizingChromePaletteTests (red on e48d6ba, green on be5e793) and BonsplitContrastPaletteTests. The full suite has one failure, TabBarDropHandlerTests.testTranslatedDestinationHitTestsInSuperviewCoordinates, which also fails (crashes) on the base 83857fa. Theme proofs regenerated with BONSPLIT_THEME_PROOF_DIR.

Used by the cmux PR that bumps this submodule.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Draws the shared-terminal sizing chrome (grid border, hatch, and chip outline) in the split divider's own color, so the area outside the grid no longer reads lighter than the divider next to it on dark themes.

  • Adds BonsplitSizingChromePalette: lines use the divider color, the hatch is that color at 60% over the terminal background, the chip fill is the terminal background, and chip text keeps a 4.5:1 contrast floor.
  • Exposes the divider color as BonsplitConfiguration.Appearance.splitDividerColor; theme proofs now draw a neighboring pane and divider for comparison.
  • The pre-existing TabBarDropHandlerTests.testTranslatedDestinationHitTestsInSuperviewCoordinates failure also crashes on main.

Summary by CodeRabbit

  • Visual Improvements
    • Pane-sizing controls now use terminal-background chip fills, divider-colored outlines, and patterned hatching coordinated with the split divider.
    • Chip text maintains a minimum contrast ratio of 4.5:1 against its background across supported themes.
    • Split-divider colors are resolved consistently with the active appearance, including when no custom divider color is specified.