Pointer-based dashboard dragging — fixes rightmost column (v1.3.6)#85
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
dragstartreflows 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:
pointerdownon the grip starts the drag, spawns aposition: fixedclone that follows the cursor.pointermoveroutes 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.pointerupfinalizes + persists.Every column now behaves identically. Also removes the native
dragstart/dragover/drophandlers anddraggableattribute; addstouch-action: noneon 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:
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