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>
27 lines
913 B
TypeScript
27 lines
913 B
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
import React, { memo } from 'react';
|
|
|
|
import { TerminalHostTreeSidebar } from './TerminalHostTreeSidebar';
|
|
import { terminalLayerHostTreePropsEqual } from './terminalLayerViewMemo';
|
|
|
|
type HostTreeContext = Record<string, any>;
|
|
|
|
function TerminalLayerHostTreeSectionInner({ ctx }: { ctx: HostTreeContext }) {
|
|
return (
|
|
<TerminalHostTreeSidebar
|
|
hosts={ctx.hosts}
|
|
customGroups={ctx.customGroups}
|
|
resolvedPreviewTheme={ctx.resolvedPreviewTheme}
|
|
activeHostId={ctx.activeHostIdForSidebar}
|
|
onConnect={ctx.onConnectToHost}
|
|
onCreateLocalTerminal={ctx.onCreateLocalTerminal}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export const TerminalLayerHostTreeSection = memo(
|
|
TerminalLayerHostTreeSectionInner,
|
|
(prev, next) => terminalLayerHostTreePropsEqual(prev.ctx, next.ctx),
|
|
);
|
|
TerminalLayerHostTreeSection.displayName = 'TerminalLayerHostTreeSection';
|