tftsr-devops_investigation/src/components/dock/TerminalTab.tsx
Shaun Arman f7b4e591f9 fix(performance): resolve memory leaks and add polish features
- Fix LogStreamPanel event listener cleanup with synchronous unlisten
- Fix eventBus async-unsafe unsubscribe with proper error handling
- Fix KubernetesPage infinite loading by resetting state on section change
- Add ErrorBoundary component with reset capability
- Add Badge component with multiple variants
- Add ResourceDetailsDrawer for slide-out details panel
- Add useFavorites hook with localStorage persistence
- Add useKeyboardShortcuts hook for declarative shortcuts
- Add comprehensive test coverage for all new components/hooks
- Add keyboard shortcuts documentation to README
- Wrap KubernetesPage with ErrorBoundary for crash recovery
- Install react-window for virtual scrolling support

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-09 13:28:30 -05:00

31 lines
726 B
TypeScript

import React from "react";
import { Terminal } from "@/components/Kubernetes/Terminal";
export interface TerminalTabData {
clusterId: string;
namespace: string;
podName?: string;
containerName?: string;
}
interface TerminalTabProps {
data: TerminalTabData;
}
/**
* In-dock wrapper around the existing xterm-based Terminal component.
* Delegates session management to Terminal itself.
*/
export function TerminalTab({ data }: TerminalTabProps) {
return (
<div className="h-full w-full p-2" data-testid="terminal-tab">
<Terminal
clusterId={data.clusterId}
namespace={data.namespace}
podName={data.podName}
containerName={data.containerName}
/>
</div>
);
}