Fix splitter hitbox overlap and terminal scrollbar width resync#1950
Fix splitter hitbox overlap and terminal scrollbar width resync#1950austinywang merged 4 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe diff makes sidebar-resizer hit regions asymmetric (separate sidebar/content-side widths) across host and panel views, updates ContentView resizer geometry to match, and adds a scroller-style change observer in GhosttySurfaceScrollView to force immediate terminal surface/width recalculation. Tests adjusted/added accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant OS as macOS
participant NSScroller as NSScroller
participant NC as NotificationCenter
participant GhosttySV as GhosttySurfaceScrollView
participant NSScroll as NSScrollView
participant TerminalCore as Ghostty Terminal Core
OS->>NSScroller: input device change (trackpad ↔ mouse)
NSScroller->>NC: post preferredScrollerStyleDidChangeNotification
NC->>GhosttySV: notification received
activate GhosttySV
GhosttySV->>GhosttySV: handlePreferredScrollerStyleChange() (ensure main thread)
GhosttySV->>NSScroll: tile()
activate NSScroll
NSScroll->>NSScroll: recalc layout (account for scrollbar width)
deactivate NSScroll
GhosttySV->>TerminalCore: synchronizeCoreSurface()
activate TerminalCore
TerminalCore->>TerminalCore: recalc grid columns / pendingSurfaceSize
deactivate TerminalCore
deactivate GhosttySV
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR fixes two related UX regressions from issue #1632: (1) the shared sidebar divider's hit-box was eating too far into terminal/browser content (6 px on each side symmetrically), which broke column-0 text selection; it is now asymmetric — 6 px on the sidebar side, 2 px on the content side. (2) When the macOS scrollbar style preference changed from overlay to legacy (or back), the terminal grid width was not recalculated, leaving a gap where the scrollbar gutter had been; a new Key changes:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["System posts\nNSScroller.preferredScrollerStyleDidChangeNotification"] --> B{"Is main thread?"}
B -- No --> C["DispatchQueue.main.async\n(handlePreferredScrollerStyleChange)"]
C --> D["scrollView.tile()"]
B -- Yes --> D
D --> E["synchronizeCoreSurface()"]
E --> F["scrollView.contentSize.width"]
F --> G["surfaceView.pushTargetSurfaceSize(...)"]
G --> H["Terminal grid redrawn\nwith correct column count"]
subgraph "Sidebar Hit-Test Region (after fix)"
I["◀ sidebarSideHitWidth = 6 px ▶|divider|◀ contentSideHitWidth = 2 px ▶"]
J["Sidebar drag target (generous)"]
K["Terminal/Browser content (text selection wins)"]
end
Reviews (1): Last reviewed commit: "fix: narrow sidebar overlap and resync t..." | Re-trigger Greptile |
| surfaceView.debugSimulateFileDrop(paths: paths) | ||
| } | ||
|
|
||
| func debugPendingSurfaceSize() -> CGSize? { |
There was a problem hiding this comment.
#if DEBUG guard missing on public wrapper
GhosttySurfaceScrollView.debugPendingSurfaceSize() calls surfaceView.debugPendingSurfaceSize(), which is defined only inside a #if DEBUG block on GhosttyNSView. In a release build, the GhosttyNSView method is stripped, so this wrapper will fail to compile with "Value of type 'GhosttyNSView' has no member 'debugPendingSurfaceSize'".
| surfaceView.debugSimulateFileDrop(paths: paths) | |
| } | |
| func debugPendingSurfaceSize() -> CGSize? { | |
| #if DEBUG | |
| func debugPendingSurfaceSize() -> CGSize? { | |
| surfaceView.debugPendingSurfaceSize() | |
| } | |
| #endif |
| } | ||
|
|
||
| func testHostViewStopsSidebarPassThroughJustInsideTerminalContent() { | ||
| let terminalSideOverlapWidth: CGFloat = 2 |
There was a problem hiding this comment.
Hardcoded magic constant should reference
SidebarResizeInteraction
terminalSideOverlapWidth is a local CGFloat literal 2 that duplicates SidebarResizeInteraction.contentSideHitWidth. If the constant ever changes the test will silently diverge from production behaviour. The same pattern appears at lines 10549 and 10904 where the assertion threshold is also hardcoded as 2.
| let terminalSideOverlapWidth: CGFloat = 2 | |
| let terminalSideOverlapWidth = SidebarResizeInteraction.contentSideHitWidth |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
cmuxTests/CmuxWebViewKeyEquivalentTests.swift (1)
10903-10912:⚠️ Potential issue | 🟡 MinorMake the edge-distance assertion bidirectional.
This currently passes for any point that lands left of
slot.frame.minX, so it can miss a bad coordinate conversion on the browser side. Use an absolute delta, or assert both lower and upper bounds.💡 Possible fix
- XCTAssertLessThanOrEqual(dividerPointInHost.x - slot.frame.minX, 2) + XCTAssertLessThanOrEqual(abs(dividerPointInHost.x - slot.frame.minX), 2)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cmuxTests/CmuxWebViewKeyEquivalentTests.swift` around lines 10903 - 10912, The assertion comparing dividerPointInHost.x to slot.frame.minX is one-sided and can miss points left of the slot; change the check on dividerPointInHost.x - slot.frame.minX (currently using XCTAssertLessThanOrEqual) to a bidirectional check so the absolute difference is within tolerance (e.g. use the absolute delta of dividerPointInHost.x and slot.frame.minX) or assert both lower and upper bounds; update the assertion around dividerPointInHost, slot.frame.minX and the current tolerance (2) to ensure fabs(dividerPointInHost.x - slot.frame.minX) <= 2 (or equivalent XCTAssertGreaterThanOrEqual/ XCTAssertLessThanOrEqual pair).
🤖 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/CmuxWebViewKeyEquivalentTests.swift`:
- Around line 12747-12778: Set a known .overlay baseline before measuring to
avoid flaky results: before calling hostedView.debugPendingSurfaceSize() and
reading scrollView.contentSize.width, force scrollView.scrollerStyle = .overlay,
post NSScroller.preferredScrollerStyleDidChangeNotification (or otherwise
trigger the scroller-style observer) and run the runloop to let the UI settle;
then capture initialSurfaceSize and initialContentWidth. This ensures the
initial measurements come from the overlay (max-width) state so subsequent
switch-to-legacy checks on scrollView.scrollerStyle,
hostedView.debugPendingSurfaceSize(), and legacyContentWidth behave
deterministically.
---
Outside diff comments:
In `@cmuxTests/CmuxWebViewKeyEquivalentTests.swift`:
- Around line 10903-10912: The assertion comparing dividerPointInHost.x to
slot.frame.minX is one-sided and can miss points left of the slot; change the
check on dividerPointInHost.x - slot.frame.minX (currently using
XCTAssertLessThanOrEqual) to a bidirectional check so the absolute difference is
within tolerance (e.g. use the absolute delta of dividerPointInHost.x and
slot.frame.minX) or assert both lower and upper bounds; update the assertion
around dividerPointInHost, slot.frame.minX and the current tolerance (2) to
ensure fabs(dividerPointInHost.x - slot.frame.minX) <= 2 (or equivalent
XCTAssertGreaterThanOrEqual/ XCTAssertLessThanOrEqual pair).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 40ba91f0-151e-4456-ba3a-21c5f2e80ca7
📒 Files selected for processing (6)
Sources/BrowserWindowPortal.swiftSources/ContentView.swiftSources/GhosttyTerminalView.swiftSources/Panels/BrowserPanelView.swiftSources/TerminalWindowPortal.swiftcmuxTests/CmuxWebViewKeyEquivalentTests.swift
| guard let initialSurfaceSize = hostedView.debugPendingSurfaceSize() else { | ||
| XCTFail("Expected an initial terminal surface size") | ||
| return | ||
| } | ||
|
|
||
| let initialContentWidth = scrollView.contentSize.width | ||
| XCTAssertEqual(initialSurfaceSize.width, initialContentWidth, accuracy: 0.5) | ||
|
|
||
| scrollView.scrollerStyle = .legacy | ||
| scrollView.layoutSubtreeIfNeeded() | ||
| let legacyContentWidth = scrollView.contentSize.width | ||
| XCTAssertLessThan( | ||
| legacyContentWidth, | ||
| initialContentWidth, | ||
| "Legacy scrollbars should reserve width in the scroll view content area" | ||
| ) | ||
| XCTAssertEqual( | ||
| hostedView.debugPendingSurfaceSize()?.width, | ||
| initialSurfaceSize.width, | ||
| accuracy: 0.5, | ||
| "Changing the scroll view style alone should leave the terminal grid stale until the scroller-style observer runs" | ||
| ) | ||
|
|
||
| NotificationCenter.default.post(name: NSScroller.preferredScrollerStyleDidChangeNotification, object: nil) | ||
| RunLoop.current.run(until: Date().addingTimeInterval(0.05)) | ||
|
|
||
| XCTAssertEqual(scrollView.scrollerStyle, .legacy) | ||
| XCTAssertEqual( | ||
| hostedView.debugPendingSurfaceSize()?.width, | ||
| legacyContentWidth, | ||
| accuracy: 0.5, | ||
| "Preferred scroller style changes should recalculate the terminal grid width immediately" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# First, locate the test file
find . -name "CmuxWebViewKeyEquivalentTests.swift" -type fRepository: manaflow-ai/cmux
Length of output: 107
🏁 Script executed:
#!/bin/bash
# Read the specific lines from the test file
sed -n '12747,12778p' ./cmuxTests/CmuxWebViewKeyEquivalentTests.swiftRepository: manaflow-ai/cmux
Length of output: 1489
🏁 Script executed:
#!/bin/bash
# Read broader context around these lines to understand test setup
sed -n '12700,12800p' ./cmuxTests/CmuxWebViewKeyEquivalentTests.swiftRepository: manaflow-ai/cmux
Length of output: 4053
Seed the test from a known .overlay baseline to avoid false failures.
The test captures initialContentWidth without explicitly setting a scroller style first. If the test host process boots with .legacy scroller style already active, initialContentWidth will already reflect the narrowed legacy width. When the test then switches to .legacy and measures legacyContentWidth, the two will be equal, causing XCTAssertLessThan to fail even when the notification-resync logic is correct.
Force .overlay style and trigger the notification sync before capturing initial sizes to establish a known maximum-width baseline.
Suggested fix
+ scrollView.scrollerStyle = .overlay
+ scrollView.layoutSubtreeIfNeeded()
+ NotificationCenter.default.post(name: NSScroller.preferredScrollerStyleDidChangeNotification, object: nil)
+ RunLoop.current.run(until: Date().addingTimeInterval(0.05))
+
guard let initialSurfaceSize = hostedView.debugPendingSurfaceSize() else {
XCTFail("Expected an initial terminal surface size")
return
}
let initialContentWidth = scrollView.contentSize.width
+ XCTAssertEqual(scrollView.scrollerStyle, .overlay)
XCTAssertEqual(initialSurfaceSize.width, initialContentWidth, accuracy: 0.5)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cmuxTests/CmuxWebViewKeyEquivalentTests.swift` around lines 12747 - 12778,
Set a known .overlay baseline before measuring to avoid flaky results: before
calling hostedView.debugPendingSurfaceSize() and reading
scrollView.contentSize.width, force scrollView.scrollerStyle = .overlay, post
NSScroller.preferredScrollerStyleDidChangeNotification (or otherwise trigger the
scroller-style observer) and run the runloop to let the UI settle; then capture
initialSurfaceSize and initialContentWidth. This ensures the initial
measurements come from the overlay (max-width) state so subsequent
switch-to-legacy checks on scrollView.scrollerStyle,
hostedView.debugPendingSurfaceSize(), and legacyContentWidth behave
deterministically.
fe8ae0f to
1073aad
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cmuxTests/BrowserPanelTests.swift (1)
550-550: Prefer referencingSidebarResizeInteraction.contentSideHitWidthover hardcoding2.Both assertions use a hardcoded
2that corresponds to the production constantSidebarResizeInteraction.contentSideHitWidth. Referencing the constant directly keeps the tests in sync if the hit-zone width ever changes.♻️ Suggested fix
Line 550:
XCTAssertTrue( - abs(dividerPointInHost.x - slot.frame.minX) <= 2, + abs(dividerPointInHost.x - slot.frame.minX) <= SidebarResizeInteraction.contentSideHitWidth, "Expected collapsed hosted divider to overlap the browser slot leading-edge resizer zone" )Line 908:
-XCTAssertLessThanOrEqual(dividerPointInHost.x - slot.frame.minX, 2) +XCTAssertLessThanOrEqual(dividerPointInHost.x - slot.frame.minX, SidebarResizeInteraction.contentSideHitWidth)Also applies to: 908-908
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cmuxTests/BrowserPanelTests.swift` at line 550, Replace the hardcoded numeric hit-width 2 in the test assertions with the production constant SidebarResizeInteraction.contentSideHitWidth so the assertions use SidebarResizeInteraction.contentSideHitWidth instead of 2 (e.g. update the expression comparing abs(dividerPointInHost.x - slot.frame.minX) <= 2 and the similar assertion at the other location to use SidebarResizeInteraction.contentSideHitWidth); this keeps the tests in sync if the hit-zone width changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@cmuxTests/BrowserPanelTests.swift`:
- Line 550: Replace the hardcoded numeric hit-width 2 in the test assertions
with the production constant SidebarResizeInteraction.contentSideHitWidth so the
assertions use SidebarResizeInteraction.contentSideHitWidth instead of 2 (e.g.
update the expression comparing abs(dividerPointInHost.x - slot.frame.minX) <= 2
and the similar assertion at the other location to use
SidebarResizeInteraction.contentSideHitWidth); this keeps the tests in sync if
the hit-zone width changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 10a6c814-e01d-4955-8819-44c56e366e08
📒 Files selected for processing (7)
Sources/BrowserWindowPortal.swiftSources/ContentView.swiftSources/GhosttyTerminalView.swiftSources/Panels/BrowserPanelView.swiftSources/TerminalWindowPortal.swiftcmuxTests/BrowserPanelTests.swiftcmuxTests/TerminalAndGhosttyTests.swift
✅ Files skipped from review due to trivial changes (2)
- Sources/BrowserWindowPortal.swift
- Sources/Panels/BrowserPanelView.swift
🚧 Files skipped from review as they are similar to previous changes (1)
- Sources/TerminalWindowPortal.swift
There was a problem hiding this comment.
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 `@Sources/Panels/BrowserPanelView.swift`:
- Around line 5138-5152: The divider hit path in hitTest(_:) currently always
returns self causing right/other mouse events to be handled by
HostContainerView; change the end of that branch to inspect the current NSEvent
(via NSApp.currentEvent) and only accept the hosted-inspector divider hit
(return self) when the event type is a left-button event (e.g. .leftMouseDown,
.leftMouseDragged, .leftMouseUp); for any other event types, return nativeHit so
the event continues to WebKit/Inspector. Ensure this check is applied just
before the debugLogHitTest/return self block and use the existing variables
hostedInspectorHit and nativeHit to decide the fallback.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4228d4fc-6392-4f3e-be25-9cdb5c7774ad
📒 Files selected for processing (2)
Sources/Panels/BrowserPanelView.swiftcmuxTests/TerminalAndGhosttyTests.swift
✅ Files skipped from review due to trivial changes (1)
- cmuxTests/TerminalAndGhosttyTests.swift
| if nativeHit !== hostedInspectorHit.inspectorView && | ||
| !hostedInspectorHit.inspectorView.isDescendant(of: nativeHit) { | ||
| return nativeHit | ||
| } | ||
| } | ||
| #if DEBUG | ||
| debugLogHitTest( | ||
| stage: isSideDockHit ? "hitTest.hostedInspectorManual" : "hitTest.hostedInspectorFallback", | ||
| stage: "hitTest.hostedInspectorManual", | ||
| point: point, | ||
| passThrough: false, | ||
| hitView: hostedInspectorHit.inspectorView | ||
| hitView: self | ||
| ) | ||
| #endif | ||
| return isSideDockHit ? self : hostedInspectorHit.inspectorView | ||
| return self | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
In AppKit, when NSView.hitTest(_:)returns a container view instead of the underlying descendant, arerightMouseDown(with:)andotherMouseDown(with:) dispatched to that container?
💡 Result:
Yes, when NSView.hitTest(_:) returns a container view instead of a descendant view, the rightMouseDown(with:) and otherMouseDown(with:) events are dispatched to that container view.
Citations:
- 1: https://developer.apple.com/documentation/appkit/nsview/hittest(_:)?language=objc
- 2: https://developer.apple.com/documentation/appkit/nsview/hittest(_:)
- 3: https://stackoverflow.com/questions/7504917/getting-mouse-down-event-on-superview
- 4: https://stackoverflow.com/questions/7133245/nsview-receiving-click-events-thru-a-nstextview
- 5: https://developer.apple.com/documentation/appkit/nsview
🏁 Script executed:
# First, verify the file exists and examine the code around lines 5138-5152
wc -l Sources/Panels/BrowserPanelView.swiftRepository: manaflow-ai/cmux
Length of output: 102
🏁 Script executed:
# Read the specific section mentioned in the review
sed -n '5130,5160p' Sources/Panels/BrowserPanelView.swiftRepository: manaflow-ai/cmux
Length of output: 1177
🏁 Script executed:
# Find HostContainerView class to check mouse event handlers
rg -A 20 "class HostContainerView" Sources/Panels/Repository: manaflow-ai/cmux
Length of output: 1697
🏁 Script executed:
# Get the full HostContainerView class implementation with all methods
rg -A 200 "^\s*final class HostContainerView: NSView" Sources/Panels/BrowserPanelView.swift | head -300Repository: manaflow-ai/cmux
Length of output: 10329
🏁 Script executed:
# More specific search for mouse event handlers in HostContainerView
rg "(mouseDown|rightMouseDown|otherMouseDown|mouseMoved)" Sources/Panels/BrowserPanelView.swift | grep -A 2 -B 2 "HostContainerView\|func.*[mM]ouse"Repository: manaflow-ai/cmux
Length of output: 511
🏁 Script executed:
# Search for all methods in HostContainerView to understand its structure
ast-grep --pattern 'final class HostContainerView {
$$$
}' | head -100Repository: manaflow-ai/cmux
Length of output: 42
🏁 Script executed:
# Search for mouse event handlers specifically in HostContainerView
rg -n "override func (mouseDown|rightMouseDown|otherMouseDown|mouseMoved)" Sources/Panels/BrowserPanelView.swiftRepository: manaflow-ai/cmux
Length of output: 236
🏁 Script executed:
# Get the full HostContainerView class boundaries to understand its scope
rg -n "^\s*final class HostContainerView|^ }" Sources/Panels/BrowserPanelView.swift | head -20Repository: manaflow-ai/cmux
Length of output: 255
🏁 Script executed:
# Find the exact line where HostContainerView is defined and where it ends
rg -n "final class HostContainerView" Sources/Panels/BrowserPanelView.swiftRepository: manaflow-ai/cmux
Length of output: 108
🏁 Script executed:
# Now find the closing brace of HostContainerView class by searching for its extent
sed -n '4705,4750p' Sources/Panels/BrowserPanelView.swiftRepository: manaflow-ai/cmux
Length of output: 2276
🏁 Script executed:
# Get a better view - search for where HostContainerView class definition starts
grep -n "final class HostContainerView" Sources/Panels/BrowserPanelView.swiftRepository: manaflow-ai/cmux
Length of output: 108
🏁 Script executed:
# Now that we know HostContainerView likely starts around line 4705+, let's find mouse handlers around that area
sed -n '5150,5180p' Sources/Panels/BrowserPanelView.swiftRepository: manaflow-ai/cmux
Length of output: 1354
🏁 Script executed:
# Search for rightMouseDown and otherMouseDown in entire HostContainerView class
# We know it starts at line 4287, so let's search after that line
rg -n "override func (rightMouseDown|otherMouseDown)" Sources/Panels/BrowserPanelView.swiftRepository: manaflow-ai/cmux
Length of output: 42
🏁 Script executed:
# Verify the mouseMoved handler around line 5115 is in HostContainerView
sed -n '5110,5125p' Sources/Panels/BrowserPanelView.swiftRepository: manaflow-ai/cmux
Length of output: 699
🏁 Script executed:
# Get a complete picture - show all override methods in HostContainerView starting from line 4287
sed -n '4287,6392p' Sources/Panels/BrowserPanelView.swift | grep -n "override func" | head -20Repository: manaflow-ai/cmux
Length of output: 922
🏁 Script executed:
# Final confirmation - view the exact hitTest logic one more time to ensure understanding
sed -n '5115,5160p' Sources/Panels/BrowserPanelView.swiftRepository: manaflow-ai/cmux
Length of output: 1923
Gate divider hits to left-button events only.
hitTest(_:) unconditionally returns self for hosted-inspector divider hits, but HostContainerView only implements mouseDown, mouseDragged, and mouseUp handlers—not rightMouseDown or otherMouseDown. Secondary-button clicks in the divider band will dispatch to the host container instead of reaching WebKit/Inspector.
Add an event-type check before accepting the divider hit:
Suggested adjustment
- if let hostedInspectorHit {
- if let nativeHit = nativeHostedInspectorHit(at: point, hostedInspectorHit: hostedInspectorHit) {
+ if let hostedInspectorHit {
+ let nativeHit = nativeHostedInspectorHit(at: point, hostedInspectorHit: hostedInspectorHit)
+ if let nativeHit {
`#if` DEBUG
debugLogHitTest(stage: "hitTest.hostedInspectorNative", point: point, passThrough: false, hitView: nativeHit)
`#endif`
if nativeHit !== hostedInspectorHit.inspectorView &&
!hostedInspectorHit.inspectorView.isDescendant(of: nativeHit) {
return nativeHit
}
}
+ let shouldUseManualDividerHit: Bool = {
+ switch NSApp.currentEvent?.type {
+ case .leftMouseDown, .leftMouseDragged, .leftMouseUp:
+ return true
+ default:
+ return false
+ }
+ }()
+ guard shouldUseManualDividerHit else {
+ return nativeHit ?? super.hitTest(point)
+ }
`#if` DEBUG
debugLogHitTest(
stage: "hitTest.hostedInspectorManual",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Sources/Panels/BrowserPanelView.swift` around lines 5138 - 5152, The divider
hit path in hitTest(_:) currently always returns self causing right/other mouse
events to be handled by HostContainerView; change the end of that branch to
inspect the current NSEvent (via NSApp.currentEvent) and only accept the
hosted-inspector divider hit (return self) when the event type is a left-button
event (e.g. .leftMouseDown, .leftMouseDragged, .leftMouseUp); for any other
event types, return nativeHit so the event continues to WebKit/Inspector. Ensure
this check is applied just before the debugLogHitTest/return self block and use
the existing variables hostedInspectorHit and nativeHit to decide the fallback.
…flow-ai#1950) * test: add splitter and scrollbar regressions * fix: narrow sidebar overlap and resync terminal width * test: unwrap pending surface width in scrollbar regression * fix: restore hosted inspector divider drag path
Fixes #1632
Summary
Testing
./scripts/reload.sh --tag issue-1632-reviewCommit Structure
2b38c76efailing regressionsfe8ae0fffixSummary by cubic
Fixes splitter hitbox overlap into terminal/browser content and resyncs terminal surface width when scrollbar style changes, keeping selection precise and the right grid edge visible.
WKWebViewpass-through band; set the overlay handle to the combined 8 px width; restore hosted inspector divider drag and reapply the stored width when available.NSScroller.preferredScrollerStyleDidChangeNotification, retile only the scroll view, and immediately resync the core surface width for legacy vs. overlay scrollbars; add a debug-only surface size accessor and regressions for the reduced overlap and scroller-style recalculation.Written for commit d77ae21. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes
Tests