/** * PaneContent - Renders tab content for a single pane. * Uses CSS display-toggle to keep all tabs mounted (preserving state). */ import { TeamGraphTab } from '@features/agent-graph/renderer'; import { TabUIProvider } from '@renderer/contexts/TabUIContext'; import { DashboardView } from '../dashboard/DashboardView'; import { ExtensionStoreView } from '../extensions/ExtensionStoreView'; import { NotificationsView } from '../notifications/NotificationsView'; import { SessionReportTab } from '../report/SessionReportTab'; import { SchedulesView } from '../schedules/SchedulesView'; import { SettingsView } from '../settings/SettingsView'; import { TeamDetailView } from '../team/TeamDetailView'; import { TeamListView } from '../team/TeamListView'; import { SessionTabContent } from './SessionTabContent'; import type { Pane } from '@renderer/types/panes'; interface PaneContentProps { pane: Pane; isPaneFocused: boolean; } export const PaneContent = ({ pane, isPaneFocused }: PaneContentProps): React.JSX.Element => { const activeTabId = pane.activeTabId; // Show default dashboard if no tabs are open in this pane const showDefaultDashboard = !activeTabId && pane.tabs.length === 0; return (
{showDefaultDashboard && (
)} {pane.tabs.map((tab) => { const isActive = tab.id === activeTabId; return (
{tab.type === 'dashboard' && } {tab.type === 'notifications' && } {tab.type === 'settings' && } {tab.type === 'teams' && } {tab.type === 'team' && ( )} {tab.type === 'session' && ( )} {tab.type === 'report' && } {tab.type === 'extensions' && ( )} {tab.type === 'schedules' && } {tab.type === 'graph' && ( )}
); })}
); };