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:
Test
2026-03-04 11:07:56 +01:00
parent 55a2509658
commit 008f067bf7
3 changed files with 14 additions and 3 deletions

View File

@@ -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()