Skip to content

test(dnd): verify pointer mode clears the anchor overlay on drag-leave - #1535

Merged
mathuo merged 1 commit into
masterfrom
claude/drop-target-overlays-floating-t67o9k
Jul 25, 2026
Merged

test(dnd): verify pointer mode clears the anchor overlay on drag-leave#1535
mathuo merged 1 commit into
masterfrom
claude/drop-target-overlays-floating-t67o9k

Conversation

@mathuo

@mathuo mathuo commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Description

Verification follow-up to this series of floating-group drop-target fixes (#1531, #1533, #1534), confirming they hold under dndStrategy: 'pointer' as well as HTML5. No code fixes were required — pointer mode was already correct; this PR adds one guarding test.

Analysis per fix:

Fix Backend-specific? Pointer status
#1531 — floating drop-overlay routing No Lives in the backend-agnostic DockviewGroupPanelModel.dropTargetContainer getter, which both backends read via getOverrideTarget; the pointer anchor-render path is already covered.
#1533 — always-render split z-index No correctLayerPosition involves no DnD backend (split is driven by moveGroupOrPanel), so behavior is identical.
#1534 — stale overlay after drag Yes (HTML5-only) The pointer backend clears the anchor container on drag-leave (_onDragLeaveoverrideTarget.clear()), and the drag controller fires that leave on every target transition and at drag end/cancel — so the cross-container stale overlay cannot occur. The #1534 shell dragend listener only responds to HTML5 dragend, which pointer drags never emit, so it is inert (and harmless) for pointer.

The one genuine coverage gap was that no test pinned down the pointer backend's drag-leave clearing — the exact reason it is immune to the #1534 stale overlay. This PR adds that test.

Type of change

  • Build / CI / tooling (test-only)

Affected packages

  • dockview-core

How to test

yarn test — the new PointerDropTarget test (drag-leave clears the anchor overlay (pointer mode leaves no stale overlay behind)) asserts that _onDragLeave clears the override target and drops the latched drop position.

Checklist

  • yarn test passes (1680 dockview-core tests)
  • biome format clean
  • I have added or updated tests where applicable
  • Breaking changes are documented (none — test-only)

🤖 Generated with Claude Code

https://claude.ai/code/session_01PjU3r4fnmpLUz7Bx1SjNvP


Generated by Claude Code

…g-leave

Verification follow-up to the session's floating-group drop-target fixes.
The stale-overlay fix (clearing the shell containers on HTML5 `dragend`) was
HTML5-specific because the HTML5 backend does not clear the anchor container on
drag-leave. The pointer backend does clear on leave (and the drag controller
fires that leave on every target transition and at drag end), so the same stale
overlay cannot occur in pointer mode.

Add a PointerDropTarget test asserting `_onDragLeave` clears the override
target and drops the latched state, documenting and guarding that difference.

The other two fixes need no pointer-specific coverage: the floating-group
drop-overlay routing lives in the backend-agnostic
`DockviewGroupPanelModel.dropTargetContainer` getter (both backends read it via
`getOverrideTarget`, and the pointer anchor-render path is already covered), and
the always-render split z-index fix (`correctLayerPosition`) involves no DnD
backend at all.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjU3r4fnmpLUz7Bx1SjNvP
@mathuo
mathuo merged commit 95e5fe3 into master Jul 25, 2026
6 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant