+ {/* Header */}
+
+
+
+ Maestro System Logs
+
+
+ {filteredLogs.length} {filteredLogs.length === 1 ? 'entry' : 'entries'}
+
+
+
+
+
+
+
+
+
+ {/* Level Filters */}
+
+
+ Filter:
+
+ {(['all', 'debug', 'info', 'warn', 'error'] as const).map(level => (
+
+ ))}
+
+
+ {/* Search Bar */}
+ {searchOpen && (
+
+
+ setSearchQuery(e.target.value)}
+ onKeyDown={e => {
+ if (e.key === 'Escape') {
+ e.preventDefault();
+ setSearchOpen(false);
+ setSearchQuery('');
+ containerRef.current?.focus();
+ }
+ }}
+ />
+
+
+ )}
+
+ {/* Logs Container */}
+
+ {filteredLogs.length === 0 ? (
+
+ {logs.length === 0 ? 'No logs yet' : 'No logs match your filter'}
+
+ ) : (
+ filteredLogs.map((log, index) => (
+
+
+ {/* Level Pill */}
+
+ {log.level}
+
+
+ {/* Content */}
+
+
+
+ {new Date(log.timestamp).toLocaleTimeString()}
+
+ {log.context && (
+
+ {log.context}
+
+ )}
+
+
+ {log.message}
+
+ {log.data && (
+
+ {JSON.stringify(log.data, null, 2)}
+
+ )}
+
+
+
+ ))
+ )}
+
+
+
+ {/* Footer hint */}
+ {!searchOpen && (
+
+ Press / to search
+
+ )}
+
+ );
+}
diff --git a/src/renderer/components/MainPanel.tsx b/src/renderer/components/MainPanel.tsx
new file mode 100644
index 00000000..08364954
--- /dev/null
+++ b/src/renderer/components/MainPanel.tsx
@@ -0,0 +1,230 @@
+import React from 'react';
+import { Wand2, Radio, ExternalLink, Wifi, Info, Columns } from 'lucide-react';
+import { LogViewer } from './LogViewer';
+import { TerminalOutput } from './TerminalOutput';
+import { InputArea } from './InputArea';
+import { FilePreview } from './FilePreview';
+import { ErrorBoundary } from './ErrorBoundary';
+import type { Session, Theme, Shortcut, FocusArea } from '../types';
+
+interface MainPanelProps {
+ // State
+ logViewerOpen: boolean;
+ activeSession: Session | null;
+ theme: Theme;
+ activeFocus: FocusArea;
+ outputSearchOpen: boolean;
+ outputSearchQuery: string;
+ inputValue: string;
+ enterToSend: boolean;
+ stagedImages: string[];
+ commandHistoryOpen: boolean;
+ commandHistoryFilter: string;
+ commandHistorySelectedIndex: number;
+ previewFile: { name: string; content: string; path: string } | null;
+ markdownRawMode: boolean;
+ shortcuts: Record