Skip to content

Pointer-based dashboard dragging — fixes rightmost column (v1.3.6)#85

Merged
Krippler merged 1 commit into
mainfrom
claude/pointer-based-drag
Jul 17, 2026
Merged

Pointer-based dashboard dragging — fixes rightmost column (v1.3.6)#85
Krippler merged 1 commit into
mainfrom
claude/pointer-based-drag

Conversation

@Krippler

Copy link
Copy Markdown
Owner

Bug (recurring)

Cards in the right column of a two-column layout still couldn't be dragged — not to create a third column, not into the first column. Only after seeding a third column from the left did the middle column become movable.

Why my earlier fixes missed it

The two previous attempts (X-band routing, full-height columns) were verified with synthetic drag events, which gave false passes. Native HTML5 drag-and-drop behaves differently in a real browser: adding the + rail on dragstart reflows the columns, and the browser's own drag hit-testing broke dragging out of the rightmost column.

Fix

Rewrote rearranging to pointer events + a floating clone instead of native DnD:

  • pointerdown on the grip starts the drag, spawns a position: fixed clone that follows the cursor.
  • pointermove routes purely by coordinates — _columnAtX (X-band) + _cardAfterPoint (Y) — and live-moves the real card. Nothing depends on what element is under the cursor or on native drag hit-testing.
  • pointerup finalizes + persists.

Every column now behaves identically. Also removes the native dragstart/dragover/drop handlers and draggable attribute; adds touch-action: none on the grip for touch/pen.

Verification (real mouse, not synthetic)

Driven with Playwright's actual mouse (fires real pointer events) in a headless browser at 1940px:

  • Right-column card → new 3rd column (the reported bug) — ends in col 2, 3 visible columns
  • ✅ Right-column card → first column
  • ✅ In-column reorder
  • ✅ Floating clone cleaned up; layout persisted
  • ✅ 122 tests green

Ships as 1.3.6 (in-place 1.3.5 update isn't possible — proxy blocks tag force-push). On merge the auto-release publishes 1.3.6 / 1.3 / 1 / latest.

🤖 Generated with Claude Code


Generated by Claude Code

Native HTML5 drag-and-drop couldn't drag the rightmost column: adding the
+ rail on dragstart reflowed the columns and the browser's drag
hit-testing broke dragging out of that column (cards there couldn't move
to a new column or the first column until a third column was seeded from
the left). Rewrote rearranging with pointer events + a floating clone and
coordinate-based routing (X-band column pick + Y position), so every
column behaves identically and nothing depends on native drag hit-testing.

Verified by driving a REAL mouse in a headless browser (not synthetic drag
events, which gave false passes): right-column card -> new third column,
right-column -> first column, in-column reorder, clone cleanup, and
persistence all work. 122 tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ffp2b19PUmzEU1fxpnURA
@Krippler
Krippler merged commit 526ac12 into main Jul 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants