From fd89201ccb3e2d7c3edf556d2e6cd066ce9c95a6 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 10 Nov 2026 10:20:51 -0700 Subject: [PATCH] Measure a new column drag after the last one's columns are home A drag started while the last one's columns slid home read their edges mid-slide, and dropped against them. The list now ends that slide first. Co-Authored-By: Claude Opus 5.5 --- apps/yaak-proxy/components/FlowListHeader.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/yaak-proxy/components/FlowListHeader.tsx b/apps/yaak-proxy/components/FlowListHeader.tsx index 7eccf9856..869cc7805 100644 --- a/apps/yaak-proxy/components/FlowListHeader.tsx +++ b/apps/yaak-proxy/components/FlowListHeader.tsx @@ -411,6 +411,11 @@ function useColumnDrag({ const grid = gridRef.current; const from = latest.current.columns.findIndex((c) => c.id === e.active.id); if (grid == null || from === -1) return; + const id = e.active.id as ColumnId; + const x = pointer.current; + // First, as it ends the last drag's columns sliding home, so the edges read below are where + // the columns are laid out, not where they were sliding + latest.current.onColumnDrag({ type: "start", id, x }); const gridLeft = grid.getBoundingClientRect().left; const cells = Array.from(grid.querySelectorAll(":scope > [data-column]")).map( (el) => { @@ -418,11 +423,8 @@ function useColumnDrag({ return { left: box.left - gridLeft, right: box.right - gridLeft }; }, ); - const id = e.active.id as ColumnId; - const x = pointer.current; const shown = shownKey(latest.current.columns); state.current = { id, from, cells, shown, x, to: null, ghostX: x, frame: 0 }; - latest.current.onColumnDrag({ type: "start", id, x }); target(state.current); const tick = () => {