Repository navigation
Fix tab switching after missed drag cleanup - #6392
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 4a489327fbce475fee63ed79c5765b606b884cf3 and b8a67e9. 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe tab-drag hook now adds global 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
Co-authored-by: Orca <[email protected]>
4a48932 to
b8a67e9
Compare
Co-authored-by: Orca <[email protected]>
Summary
Why
A missed dnd-kit cleanup can leave
tabDragActiveRef.currentstucktrue. Once stuck, later tab clicks look like drag releases and tab activation is suppressed, which matches the “worked initially, then stopped switching tabs” failure mode.Test Plan
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/tab-group/useTabDragSplit.test.ts src/renderer/src/components/tab-bar/tab-strip-pointer-activation.test.tsx(16 passed)pnpm exec playwright test tests/e2e/tabs.spec.ts --config tests/playwright.config.ts --project electron-headless --grep "clicking tabs still switches after a tab drag gesture releases" --workers=1(1 passed)pnpm run typecheck:webpnpm exec oxlint src/renderer/src/components/tab-group/useTabDragSplit.ts src/renderer/src/components/tab-group/useTabDragSplit.test.ts tests/e2e/tabs.spec.tsReview Notes
onDragStartbefore returning control to the event loop.pointerup,pointercancel,blur, and a normal drag end while the fallback timer is pending.