fix(timeline): clear multi-select on drag start and lock in SSE edge-case coverage
- useTimelineDrag: onProjectBarMouseDown and single-alloc drag path now reset multiSelectRef + multiSelectState before starting a new drag, so the FloatingActionBar is dismissed immediately when an unrelated drag begins - FloatingActionBar.test.tsx: 4 regression tests for the null-render guard (count=0) and all three label variants - useTimelineSSE.test.ts: 2 new tests — tab hides during pending reconnect timer (clears timer, resyncs on next open) and first-ever connection fails before any open (retry open still resyncs correctly) - assistant-tools-user-admin-inventory-read.test.ts: add isActive to expected findMany select shape (already in production, test was stale) Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -496,6 +496,8 @@ export function useTimelineDrag({
|
||||
},
|
||||
) => {
|
||||
if (e.button !== 0) return;
|
||||
multiSelectRef.current = INITIAL_MULTI_SELECT;
|
||||
setMultiSelectState(INITIAL_MULTI_SELECT);
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const state = createProjectDragState<DragState>({
|
||||
@@ -610,6 +612,8 @@ export function useTimelineDrag({
|
||||
|
||||
// ── Single allocation drag ────────────────────────────────────────────
|
||||
|
||||
multiSelectRef.current = INITIAL_MULTI_SELECT;
|
||||
setMultiSelectState(INITIAL_MULTI_SELECT);
|
||||
const initial = createAllocationDragState<AllocDragState, AllocDragMode, AllocDragScope>({
|
||||
mode: opts.mode,
|
||||
scope: opts.scope,
|
||||
|
||||
Reference in New Issue
Block a user