Repository navigation
Fix drag-handle crash on launch from stale foreign-window events - #620
Conversation
Add window-identity check to windowDragHandleShouldCaptureHit so stale leftMouseDown events from other apps (Finder, Dock) during launch don't trigger the SwiftUI hierarchy walk while initial layout is mutating. Add NSLock to breadcrumb limiter for thread safety. Update existing tests to pass eventWindow for window-attached drag handles.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe changes add thread safety to drag-handle event processing via NSLock and refactor hit-test logic to be window-aware. A method is renamed to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 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 unit tests (beta)
Comment |
Greptile SummaryFixes crash during app launch when mouse hovers over window area. The core issue was stale Key changes:
The fix is narrowly scoped and preserves existing behavior for legitimate same-window events while safely rejecting stale cross-app events during launch. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 03fb930 |
…aflow-ai#490) (manaflow-ai#620) Add window-identity check to windowDragHandleShouldCaptureHit so stale leftMouseDown events from other apps (Finder, Dock) during launch don't trigger the SwiftUI hierarchy walk while initial layout is mutating. Add NSLock to breadcrumb limiter for thread safety. Update existing tests to pass eventWindow for window-attached drag handles.
Summary
windowDragHandleShouldCaptureHitso staleleftMouseDownevents from other apps (Finder, Dock) during launch don't trigger the SwiftUI hierarchy walk while initial layout is mutating (exclusive-access violation)NSLocktoWindowDragHandleBreadcrumbLimiterfor thread safetyshouldApplyImmediateHostedStateUpdatetest call sites (removed stalehostWindowAttached:param)Closes #490
Test plan
xcodebuild test -only-testing:cmuxTestsSummary by CodeRabbit
Bug Fixes
Tests