feat(web): drag reorder right-panel tabs - #6404
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bfa8b33. Configure here.
ApprovabilityVerdict: Approved 29537f1 This PR adds drag-and-drop reordering for right-panel tabs using the standard @dnd-kit library. The changes are purely UI-focused, well-tested, and don't affect any backend behavior or data processing. You can customize Macroscope's approvability policy. Learn more. |

What Changed
Why
Right-panel surfaces currently stay in creation order, which makes it harder to organize several files, terminals, previews, and pull requests. Drag-to-reorder gives users the familiar browser-tab interaction while keeping the existing active surface and close-to-the-right behavior coherent with the visible order.
UI Changes
Interaction video:
Screen.Recording.2026-08-13.at.3.12.16.AM.mov
Checklist
Generated with GPT-5.6-sol via Codex in T3 Code.
Note
Low Risk
UI-only panel tab ordering with unit tests; reconcile change is localized to browser surface sync behavior.
Overview
Adds horizontal drag-to-reorder for right-panel tabs (chat, desktop, and pull-requests), using
@dnd-kitsortable tabs with a 6px drag threshold and horizontal-only movement.Dropping a tab on another calls
reorderSurfaceon the per-thread right panel store, which moves surfaces in the list without changing the active tab. Picking up an inactive tab activates it immediately (browser-style).reconcileBrowserSurfacesno longer groups non-browser tabs ahead of browsers—it keeps the current order and only appends new browser tabs.Active-tab auto-scroll is skipped while dragging via
scrollActiveRightPanelTabIntoView; user docs mention drag reorder.Reviewed by Cursor Bugbot for commit 29537f1. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add drag-to-reorder support for right-panel tabs
@dnd-kit, with a newSortableSurfaceTabcomponent that handles drag listeners and styles.reorderSurfaceto the right panel store in rightPanelStore.ts, which moves a surface to a target index and preserves custom ordering during browser tab reconciliation.scrollActiveRightPanelTabIntoViewhelper in rightPanelTabs.logic.ts.onReorderSurfaceprop throughChatViewand the pull requests route to connect UI events to the store.Macroscope summarized 29537f1.