Skip to content

feat(ui): support draggable tab reordering with stable dom ordering#6

Merged
rust17 merged 1 commit intomasterfrom
feat/dragable
Mar 16, 2026
Merged

feat(ui): support draggable tab reordering with stable dom ordering#6
rust17 merged 1 commit intomasterfrom
feat/dragable

Conversation

@rust17
Copy link
Copy Markdown
Owner

@rust17 rust17 commented Mar 16, 2026

Overview
This PR implements drag-and-drop reordering for both top-level database session tabs and internal workspace tabs (Data, Query, and Structure views). It also introduces a critical technical convention to ensure the stability of complex components like the Monaco Editor during UI reordering.

Key Changes

  • Draggable Tabs: Users can now drag and drop tabs to reorder them, similar to the behavior in VS Code.
  • useDraggableSort Hook: Extracted reusable drag-and-drop logic into a custom hook to handle state management (draggedIdx, dragOverIdx), event handlers, and visual drop indicators.
  • Stable DOM Ordering: Resolved a critical crash in Monaco Editor (InstantiationService has been disposed) by decoupling the UI display order from the physical DOM order.
  • Documentation: Added the "UI Rendering Stability" convention to AGENTS.md to prevent similar regressions in the future.

@rust17 rust17 merged commit dfb0751 into master Mar 16, 2026
4 checks passed
@rust17 rust17 deleted the feat/dragable branch March 16, 2026 03:15
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