Skip to content

Commit 4107930

Browse files
eimexdevclaude
andauthored
feat(web): reorder right panel tabs by dragging (pingdotgg#17730)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 1f093d1 commit 4107930

5 files changed

Lines changed: 260 additions & 134 deletions

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6233,6 +6233,13 @@ export default function ChatView(props: ChatViewProps) {
62336233
finishRightPanelSurfaceClose,
62346234
rightPanelState.surfaces,
62356235
]);
6236+
const moveRightPanelSurface = useCallback(
6237+
(surfaceId: string, toIndex: number) => {
6238+
if (activeThreadRef)
6239+
useRightPanelStore.getState().moveSurface(activeThreadRef, surfaceId, toIndex);
6240+
},
6241+
[activeThreadRef],
6242+
);
62366243
const copyRightPanelFilePath = useCallback((relativePath: string) => {
62376244
if (typeof window === "undefined" || !navigator.clipboard?.writeText) {
62386245
toastManager.add(
@@ -11991,6 +11998,7 @@ export default function ChatView(props: ChatViewProps) {
1199111998
onCloseOtherSurfaces={closeOtherRightPanelSurfaces}
1199211999
onCloseSurfacesToRight={closeRightPanelSurfacesToRight}
1199312000
onCloseAllSurfaces={closeAllRightPanelSurfaces}
12001+
onMoveSurface={moveRightPanelSurface}
1199412002
onCopyFilePath={copyRightPanelFilePath}
1199512003
onAddBrowser={() => createBrowserSurface()}
1199612004
onAddBrowserInProfile={createBrowserSurface}
@@ -12049,6 +12057,7 @@ export default function ChatView(props: ChatViewProps) {
1204912057
onCloseOtherSurfaces={closeOtherRightPanelSurfaces}
1205012058
onCloseSurfacesToRight={closeRightPanelSurfacesToRight}
1205112059
onCloseAllSurfaces={closeAllRightPanelSurfaces}
12060+
onMoveSurface={moveRightPanelSurface}
1205212061
onCopyFilePath={copyRightPanelFilePath}
1205312062
onAddBrowser={() => createBrowserSurface()}
1205412063
onAddBrowserInProfile={createBrowserSurface}

0 commit comments

Comments
 (0)