mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-20 15:19:16 +00:00
* perf(terminal): smooth layout drags and faster tab switching Defer xterm refit during split, sidebar, and host-tree drags while keeping pane containers in sync with live layout measurements. Refactor TerminalLayer into focused sections with TabBridge/memo optimizations and add the terminal host tree sidebar. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(terminal): keep side panels alive and guard session attach races Prevent terminal boot unmount from leaking backend sessions, keep SFTP/scripts/theme/AI state when switching side tabs, and defer heavy SFTP UI mount so first entry stays responsive. Co-authored-by: Cursor <cursoragent@cursor.com> * perf(terminal): reduce tab switch jank --------- Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
import React, { memo } from 'react';
|
|
|
|
import { TerminalFocusSidebar } from './TerminalFocusSidebar';
|
|
import { terminalLayerFocusSidebarPropsEqual } from './terminalLayerViewMemo';
|
|
|
|
type FocusSidebarContext = Record<string, any>;
|
|
|
|
function TerminalLayerFocusSidebarSectionInner({ ctx }: { ctx: FocusSidebarContext }) {
|
|
if (!ctx.isFocusMode || !ctx.activeWorkspace) return null;
|
|
|
|
return (
|
|
<TerminalFocusSidebar
|
|
activeWorkspace={ctx.activeWorkspace}
|
|
focusedSessionId={ctx.focusedSessionId}
|
|
onReorderWorkspaceSessions={ctx.onReorderWorkspaceSessions}
|
|
onRequestAddToWorkspace={ctx.onRequestAddToWorkspace}
|
|
onSetWorkspaceFocusedSession={ctx.onSetWorkspaceFocusedSession}
|
|
onToggleWorkspaceViewMode={ctx.onToggleWorkspaceViewMode}
|
|
resolvedPreviewTheme={ctx.resolvedPreviewTheme}
|
|
sessionHostsMap={ctx.sessionHostsMap}
|
|
sessions={ctx.sessions}
|
|
t={ctx.t}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export const TerminalLayerFocusSidebarSection = memo(
|
|
TerminalLayerFocusSidebarSectionInner,
|
|
(prev, next) => terminalLayerFocusSidebarPropsEqual(prev.ctx, next.ctx),
|
|
);
|
|
TerminalLayerFocusSidebarSection.displayName = 'TerminalLayerFocusSidebarSection';
|