Skip to content

Polish pane split drag and drop#670

Open
RA1NCS wants to merge 3 commits into
athasdev:masterfrom
RA1NCS:feat/dnd-split-polish
Open

Polish pane split drag and drop#670
RA1NCS wants to merge 3 commits into
athasdev:masterfrom
RA1NCS:feat/dnd-split-polish

Conversation

@RA1NCS
Copy link
Copy Markdown
Contributor

@RA1NCS RA1NCS commented May 8, 2026

Summary

  • Adds pane-aware split previews for file-tree drags and internal tab drags.
  • Routes file-tree drops and tab drops through the same 3x3 pane-zone resolver: edge thirds split, center moves or opens without splitting.
  • Makes the resolver choose the pane physically under the pointer, so drag previews do not stick to the source pane when the drag overlay is above another pane.
  • Keeps the split preview scoped to the editor surface so it never covers the tab bar.
  • Supports Escape during drag: first Escape suppresses split and forces center, second quick Escape aborts the drag.
  • Cleans up redundant drag paths, dead hover/debug plumbing, duplicated split-zone logic, and the no-op drag hint component.

Details

  • File-tree drag remains raw mouse-event based and publishes window.__fileDragData for pane drops.
  • Tab drag remains dnd-kit based and publishes internal tab drag data for cross-pane movement and splitting.
  • Both paths resolve their current drop target through resolveDropTarget, which checks the element stack plus viewport containment so fixed drag previews do not steal the target pane.
  • Split direction and placement now come from one helper, keeping file drops, tab drops, and sidebar-resource drops aligned.
  • Overlay styling uses theme accent variables instead of hardcoded accent RGB values.

Validation

  • bun run typecheck
  • bunx vp lint src/features/tabs/utils/internal-tab-drag.ts src/features/tabs/components/tab-bar.tsx src/features/panes/components/pane-container.tsx src/features/panes/components/split-drop-overlay.tsx src/features/file-explorer/hooks/use-file-explorer-drag-drop.ts src/features/layout/components/main-layout.tsx
  • git diff --check
  • Manual split testing confirmed by local app smoke test: file-tree split drag, tab cross-pane split drag, overlay placement, and Escape modifier behavior.

Copy link
Copy Markdown
Member

@mehmetozguldev mehmetozguldev left a comment

Choose a reason for hiding this comment

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

Thanks, the shared pane-zone resolver and scoped overlay direction look good. I checked this on current master: merge is clean, typecheck passes, and the targeted
pane/tab tests plus lint pass.

One blocker before merging: the new Escape behavior is not applied to terminal tab drags. TabBar uses isDragAborted() and applyDropZoneGates(), but terminal- tab-bar.tsx still resolves the raw target zone and splits directly. That means Escape can show/suppress the hover state but terminal drops can still split, and the
double-Escape abort path can still detach the terminal.

Please route terminal tab drag end through the same drag gates/split config helpers as editor tab drag, or explicitly scope the Escape behavior away from terminal
drags.

@RA1NCS
Copy link
Copy Markdown
Contributor Author

RA1NCS commented May 11, 2026

Addressed review. Terminal tab drag end now goes through the same drag-gate and split-config helpers as editor tab drags, so single-Escape suppression and double-Escape abort both apply before split/drop handling.

RA1NCS added 2 commits May 11, 2026 00:04
Route file-tree and tab drags through the same pane-zone resolver so the
preview and final drop agree on the target pane.

Support Escape during drag to force a no-split drop, with a second quick
Escape aborting the drag entirely.

Keep the split preview scoped to the editor surface so it never covers the
tab bar, and remove the redundant drop paths and helper UI left from the
polish pass.
- apply the same escape suppression and abort rules to terminal tab drops
- let terminal drags attach to a pane without splitting after a single escape
- stop double-escape from detaching a terminal after the drag was aborted
@RA1NCS RA1NCS force-pushed the feat/dnd-split-polish branch from 09860c1 to d2000bb Compare May 11, 2026 04:05
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