Base: main Last Updated: 2026-02-04 Stats: 12 feature commits (+ 11 merged from main), +7456 -914 across 75 files
This branch implements drag-and-drop cell reordering for Positron Notebooks using the @dnd-kit library. The work includes integrating sortable components, supporting multi-cell selection drag, adding visual feedback with drag overlays, and comprehensive E2E test coverage.
src/vs/workbench/contrib/positronNotebook/browser/notebookCells/SortableCellList.tsx- Main sortable container with DnD contextsrc/vs/workbench/contrib/positronNotebook/browser/notebookCells/SortableCell.tsx- Individual sortable cell wrappersrc/vs/workbench/contrib/positronNotebook/browser/notebookCells/SortableCell.css- Drag styling and animationssrc/vs/workbench/contrib/positronNotebook/browser/PositronNotebookInstance.ts- Cell reordering logictest/e2e/tests/positron-notebook/notebook-cell-reordering.test.ts- E2E tests for drag-and-drop
- Added
@dnd-kit/core,@dnd-kit/sortable,@dnd-kit/utilities,@dnd-kit/accessibilitydependencies - Created
SortableCellListcomponent with DndContext and SortableContext - Created
SortableCellwrapper component for individual cells - Integrated with existing
NotebookCellWrappervia composition
- Added
moveCells(sourceIndices, targetIndex)method for reordering - Added
selectedCellIndicesgetter for multi-selection support - Implemented batch cell movement with proper selection preservation
- Custom drag overlay showing selected cell count badge
- Visual placeholder during drag with CSS transitions
- Drag handle cursor behavior and styling
- Height limiting for large cell overlays
- New E2E test file with 5 test cases covering:
- Single cell drag-and-drop (downward and upward)
- Multi-cell selection and drag
- Auto-scrolling in long notebooks
- Basic drag interaction
- Added ESM dependency shims for
@dnd-kitpackages - Updated
package.jsonwith new dependencies - Added
@dnd-kitscripts to workbench HTML files - Added Claude Code helper scripts (
build-check.sh,build-ps.sh,deemon-status.mjs)
- Research on drag-and-drop library options
- Implementation plan with 6-phase approach
- Analysis of potential custom implementation vs
@dnd-kit - Handoff documentation for Phase 2 completion
d4fcbefe8a- Add @dnd-kit integration (Phase 1 & 2) - Initial setup and basic components69816c29a0- Fix React hooks rule violation in SortableCellList83adc39451- Integrate dnd-kit sortable components with notebook (Phase 3)913c9470dc- Fix positioning and cursor behavior4631ffac31- Use DOM.getActiveWindow() for multi-window supportb02b368dee- Limit drag overlay height for large cellsa479b00eef- Add multi-cell drag-and-drop support5ca0c82cb7- Fix lint warnings
0b75e31317- Improve E2E test robustness17bcc9be06- Add auto-scroll test for long notebooks
636e128091- Add planning docsffad600537- Add research on replacing dnd-kit with custom implementation
Completed:
- Core drag-and-drop functionality with @dnd-kit
- Single cell reordering
- Multi-cell selection and drag
- Visual feedback (overlays, placeholders, badges)
- E2E test coverage
- Multi-window support
- Auto-scroll during drag
Possible Future Work:
- Custom implementation analysis suggests @dnd-kit could potentially be replaced with ~600 LOC custom solution (see
thoughts/shared/research/2026-01-28-dnd-kit-replacement-analysis.md)
Space for your notes...