fix: restore drag-to-reorder for sidebar sections
Re-add useSortable listeners that were removed in the realignment refactor. The entire section header row is now the drag target (no visible handle icon needed). PointerSensor's distance:5 constraint ensures clicks for collapse/expand don't conflict with drag. Also suppress pre-existing undici WebSocket ERR_INVALID_ARG_TYPE in test setup (jsdom Event ≠ Node Event incompatibility). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,12 @@ import '@testing-library/jest-dom/vitest'
|
||||
import { vi } from 'vitest'
|
||||
import { createElement, type ReactNode, type ComponentType } from 'react'
|
||||
|
||||
// Suppress undici WebSocket ERR_INVALID_ARG_TYPE in jsdom (jsdom Event ≠ Node Event)
|
||||
process.on('uncaughtException', (err: NodeJS.ErrnoException) => {
|
||||
if (err.code === 'ERR_INVALID_ARG_TYPE' && err.message?.includes('Event')) return
|
||||
throw err
|
||||
})
|
||||
|
||||
// Mock scrollIntoView for jsdom (not implemented)
|
||||
Element.prototype.scrollIntoView = vi.fn()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user