Skip to content

fix: show plus-sign cursor when dragging tab/pane outside window (v0.32.83)#224

Open
AgentA-asaf wants to merge 5 commits intomainfrom
agenta/fix-tab-drag-cursor
Open

fix: show plus-sign cursor when dragging tab/pane outside window (v0.32.83)#224
AgentA-asaf wants to merge 5 commits intomainfrom
agenta/fix-tab-drag-cursor

Conversation

@AgentA-asaf
Copy link
Copy Markdown
Contributor

Summary

  • Dragging a tab or pane header outside the AgentMux window previously showed a circle-slash cursor (🚫). It now shows the arrow + plus cursor (➕), correctly communicating that dropping on the desktop tears off into a new window.

Root Cause

dataTransfer.effectAllowed was never set during dragstart. Atlaskit PDND does not expose dataTransfer directly, so Windows OLE defaulted to the forbidden cursor over non-WebView2 areas (where no drop target sets dropEffect). Setting effectAllowed = "copy" constrains the drag to copy-semantics and OLE renders the plus cursor.

Why a native listener works: Atlaskit registers its dragstart handler on document in capture phase. A bubble-phase listener on the draggable element fires after Atlaskit has committed the drag — effectAllowed is still writable until dragstart returns.

Changes

  • frontend/app/tab/droppable-tab.tsx — native dragstart listener on tabWrapRef sets effectAllowed = "copy"
  • frontend/layout/lib/TileLayout.win32.tsx — same fix on the pane header element inside register()

Test Plan

  • Drag a tab past the window edge → cursor shows arrow + plus (not circle-slash)
  • Drop tab on desktop → tears off into new window (existing behavior unchanged)
  • Drag tab within tab bar → insertion gap animation and reorder work as before
  • Drag a pane header outside the window → also shows arrow + plus

🤖 Generated with Claude Code

Copy link
Copy Markdown

@reagentx-workflow reagentx-workflow Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReAgent Diagnostics
Field Value
ReAgent Version 5.12.4
Project Context CLAUDE.md loaded
Model claude-opus-4-6
Effort high
Ref Repos Disabled
Merge Analysis Clean
Review Time 36.6s
Timestamp 2026-03-25T01:52:37Z
Repository agentmuxai/agentmux
PR #224

Issues:

  • package-lock.json:3 - Version is 0.32.82 but package.json is 0.32.83 (package-lock.json was bumped from 0.32.81→0.32.82 instead of 0.32.82→0.32.83, leaving it one behind)

AgentA and others added 2 commits March 24, 2026 18:53
Set effectAllowed = "copy" via a native dragstart listener on the
draggable element (tab wrapper and pane header). Atlaskit PDND does not
expose dataTransfer, so this bubble-phase listener fires after Atlaskit's
capture-phase handler — effectAllowed is still writable at that point.

Without this, Windows OLE defaults to the forbidden cursor (circle-slash)
when the cursor leaves WebView2 and there is no drop target. Constraining
to "copy" makes OLE show the arrow+plus cursor, communicating tearoff intent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@AgentA-asaf AgentA-asaf force-pushed the agenta/fix-tab-drag-cursor branch from c2995d0 to 23e82e1 Compare March 25, 2026 01:53
Copy link
Copy Markdown

@reagentx-workflow reagentx-workflow Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReAgent Diagnostics
Field Value
ReAgent Version 5.12.4
Project Context CLAUDE.md loaded
Model claude-opus-4-6
Effort high
Ref Repos Disabled
Merge Analysis Clean
Review Time 75.7s
Timestamp 2026-03-25T01:55:16Z
Repository agentmuxai/agentmux
PR #224

Issues:

  • package-lock.json:3 - Version is 0.32.83 but package.json is 0.32.84 (package-lock.json not updated by version bump)
  • VERSION_HISTORY.md:5 - Still shows "Latest Version: 0.32.83" but should be 0.32.84 (not updated by version bump)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@reagentx-workflow reagentx-workflow Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReAgent Diagnostics
Field Value
ReAgent Version 5.12.4
Project Context CLAUDE.md loaded
Model claude-opus-4-6
Effort high
Ref Repos Disabled
Merge Analysis 44 regression(s) detected
Review Time 82.3s
Timestamp 2026-03-25T01:59:21Z
Repository agentmuxai/agentmux
PR #224

LGTM

The Win32 commands already existed but were never called. Call
setDragCursor() on drag start so SetSystemCursor replaces OCR_NO with
IDC_CROSS for the drag's lifetime — showing a plus instead of circle-slash
when dragging over the Windows desktop (Explorer returns DROPEFFECT_NONE,
effectAllowed alone can't override OLE's cursor choice). Call
restoreDragCursor() on drop, dragend, and the OLE fallback path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@reagentx-workflow reagentx-workflow Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReAgent Diagnostics
Field Value
ReAgent Version 5.12.4
Project Context CLAUDE.md loaded
Model claude-opus-4-6
Effort high
Ref Repos Disabled
Merge Analysis 44 regression(s) detected
Review Time 67.3s
Timestamp 2026-03-25T02:40:05Z
Repository agentmuxai/agentmux
PR #224

LGTM

…ursor

SetSystemCursor fails on Windows desktop because OLE's IDropSource caches
its LoadCursor(NULL, IDC_NO) handle on first GiveFeedback call, and Explorer
also uses its own cursor resources for WM_SETCURSOR — so there is no static
replacement that works reliably.

Instead, spawn a 2ms polling thread (500Hz) that calls SetCursor(IDC_CROSS)
while DRAG_CURSOR_ACTIVE is set. This wins every race when the mouse is
stationary and dominates during typical 125–250Hz mouse movement. Stop the
thread by setting DRAG_CURSOR_ACTIVE=false in restore_drag_cursor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@reagentx-workflow reagentx-workflow Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReAgent Diagnostics
Field Value
ReAgent Version 5.12.4
Project Context CLAUDE.md loaded
Model claude-opus-4-6
Effort high
Ref Repos Disabled
Merge Analysis 44 regression(s) detected
Review Time 72.9s
Timestamp 2026-03-25T10:42:30Z
Repository agentmuxai/agentmux
PR #224

LGTM

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