fix: resize handle now adjusts column to its left

Handle on the left edge resizes the PREVIOUS column, not itself.
This matches the mental model: dragging the boundary between Subject
and Status changes Subject's width. First column has no handle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Gjermund Høsøien Wiggen
2026-06-09 22:10:14 +02:00
parent 30108c7600
commit 7f91a51e32

View File

@@ -890,16 +890,19 @@ function TicketWorkbenchContent() {
density === "compact" ? "min-h-7" : "min-h-8"
)} style={{ display: "table-row" }}>
<div style={{ display: "table-cell", width: 36 }} />
{availableColumns.filter((c) => c.visible).map((col) => (
{availableColumns.filter((c) => c.visible).map((col, idx, arr) => (
<div
key={col.key}
className="relative border-r border-border/60 px-3 align-middle last:border-r-0"
style={{ display: "table-cell", width: col.key === "subject" ? undefined : col.width }}
>
{/* Resize handle: drags the boundary, resizes the column to the LEFT */}
{idx > 0 && (
<div
className="absolute left-0 top-0 h-full w-2 -ml-1 cursor-col-resize hover:bg-primary/40 z-10"
onMouseDown={(e) => handleColumnResize(col.key, e)}
onMouseDown={(e) => handleColumnResize(arr[idx - 1].key, e)}
/>
)}
<span className="text-[10px] font-semibold uppercase text-muted-foreground/60 truncate block">
{col.label}
</span>