Make ThemedSplitView non-draggable for minimal mode#92
Conversation
NSSplitView's default mouseDownCanMoveWindow can promote back to true even with isOpaque=false when nested in a non-titlebar window. In presentationMode "minimal" (no titlebar drag region), AppKit was treating mouseDowns inside the LEFT pane of a horizontal split as window drag intents and consuming the mouseUp before SwiftUI's tap gesture could fire on tab items. Override to false to keep the entire pane hosting chain non-draggable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ 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 SummaryAdds Confidence Score: 5/5Safe to merge — minimal, focused fix with no side-effects A single one-line override following an established pattern already used throughout the codebase. No P0/P1 issues found; the change is correct, well-commented, and completes an existing defensive chain. No files require special attention Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User Click
participant TSV as ThemedSplitView
participant SACV as SplitArrangedContainerView
participant NDHV as NonDraggableHostingView
participant SG as SwiftUI Tap Gesture
participant AK as AppKit Window Drag
Note over TSV: BEFORE FIX: mouseDownCanMoveWindow=true (default)
U->>TSV: mouseDown
TSV->>AK: promotes to window drag intent
AK--xSG: consumes mouseUp — tap never fires
Note over TSV: AFTER FIX: mouseDownCanMoveWindow=false
U->>TSV: mouseDown (false)
TSV->>SACV: propagates (false)
SACV->>NDHV: propagates (false)
NDHV->>SG: delivers mouseUp
SG-->>U: tab click fires ✓
Reviews (1): Last reviewed commit: "Make ThemedSplitView non-draggable for m..." | Re-trigger Greptile |
Summary
NSSplitView's default
mouseDownCanMoveWindowcan promote back totrueeven withisOpaque=falsewhen nested in a non-titlebar window. InpresentationMode "minimal"(no titlebar drag region), AppKit was treating mouseDowns inside the LEFT pane of a horizontal split as window drag intents and consuming the mouseUp before SwiftUI's tap gesture could fire on tab items. Override tofalseto keep the entire pane hosting chain non-draggable.Test plan
🤖 Generated with Claude Code
Summary by cubic
Prevented accidental window dragging in minimal mode so tab clicks in the left pane register every time. We now force the split view to be non-draggable.
mouseDownCanMoveWindowtofalseinThemedSplitView.Written for commit 0e5c7f9. Summary will update on new commits.
Summary by CodeRabbit