Skip to content

fix(shell): persist pane Map order on drag-and-drop reorder#27

Merged
DannyNs merged 1 commit intomainfrom
bug/shell-dnd-reorder-persistence
Mar 19, 2026
Merged

fix(shell): persist pane Map order on drag-and-drop reorder#27
DannyNs merged 1 commit intomainfrom
bug/shell-dnd-reorder-persistence

Conversation

@DannyNs
Copy link
Collaborator

@DannyNs DannyNs commented Mar 19, 2026

Summary

  • Follow-up to PR fix(shell): persist drag-and-drop pane reorder across navigation #26 — the server-side fix alone was insufficient
  • The client-side panes Map (JavaScript Map preserves insertion order) was never reordered after drag-and-drop, so mount() reattached panes in the original insertion order when navigating back to Shell
  • Added _reorderPanesMap() helper that rebuilds the Map in visual order after each drag-and-drop swap and after receiving state:panes-reordered from the server

Test plan

  • Open Shell view, create 3+ terminal panes
  • Drag-and-drop to reorder panes
  • Navigate to another module (e.g. Kanban) and back to Shell
  • Verify pane order AND tab order are preserved
  • Open a second browser tab — verify reorder syncs and persists across both clients

🤖 Generated with Claude Code

The server-side fix alone was insufficient — the client-side panes Map
(which controls remount order) was never reordered on drag-and-drop.
When navigating away and back, mount() iterates the Map in insertion
order, restoring the original layout.

Add _reorderPanesMap() helper that rebuilds the Map in visual order
after each drag-and-drop swap and after receiving state:panes-reordered
from the server (multi-client sync).
@DannyNs DannyNs merged commit ff19f54 into main Mar 19, 2026
1 check passed
@DannyNs DannyNs deleted the bug/shell-dnd-reorder-persistence branch March 19, 2026 11:18
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