From c54d078d7851d6d0a1662a83f02a476eb879b9cf Mon Sep 17 00:00:00 2001 From: Dima Marchevskyi Date: Wed, 12 Aug 2026 09:25:37 -0700 Subject: [PATCH] Widen logs dialog and simplify settings controls Increase the logs window width, move the manual refresh button and Lines/Auto-refresh controls into the footer next to Copy/Download, and drop the Settings/Apply buttons since both controls already apply on change. Also removes the redundant "Auto-refreshing every N seconds" indicator, which overlapped the footer controls. Co-Authored-By: Claude Sonnet 5 --- webui/src/components/LogDialog.tsx | 146 +++++++++++------------------ 1 file changed, 55 insertions(+), 91 deletions(-) diff --git a/webui/src/components/LogDialog.tsx b/webui/src/components/LogDialog.tsx index 4dd604a5..805585a4 100644 --- a/webui/src/components/LogDialog.tsx +++ b/webui/src/components/LogDialog.tsx @@ -12,14 +12,13 @@ import { } from '@/components/ui/dialog' import { Badge } from '@/components/ui/badge' import { instancesApi } from '@/lib/api' -import { - RefreshCw, - Download, - Copy, - CheckCircle, +import { + RefreshCw, + Download, + Copy, + CheckCircle, AlertCircle, - Loader2, - Settings + Loader2 } from 'lucide-react' interface LogsDialogProps { @@ -41,8 +40,7 @@ const LogsDialog: React.FC = ({ const [lineCount, setLineCount] = useState(100) const [autoRefresh, setAutoRefresh] = useState(false) const [copied, setCopied] = useState(false) - const [showSettings, setShowSettings] = useState(false) - + const logContainerRef = useRef(null) const refreshIntervalRef = useRef(null) @@ -130,12 +128,6 @@ const LogsDialog: React.FC = ({ setLineCount(num) } - // Apply new line count - const applyLineCount = () => { - void fetchLogs(lineCount) - setShowSettings(false) - } - // Format logs with basic syntax highlighting const formatLogs = (logText: string) => { if (!logText) return '' @@ -169,7 +161,7 @@ const LogsDialog: React.FC = ({ return ( - +
@@ -183,70 +175,9 @@ const LogsDialog: React.FC = ({ Instance logs and output
- -
- - - -
- {/* Settings Panel */} - {showSettings && ( -
-
-
- - handleLineCountChange(e.target.value)} - className="w-24" - min="1" - max="10000" - /> -
- -
- setAutoRefresh(e.target.checked)} - disabled={!isRunning} - className="rounded" - /> - -
- - -
-
- )} - {/* Log Content */}
{error && ( @@ -255,10 +186,10 @@ const LogsDialog: React.FC = ({ {error}
)} - -
{loading && !logs ? (
@@ -275,17 +206,50 @@ const LogsDialog: React.FC = ({
)}
- - {autoRefresh && isRunning && ( -
-
- Auto-refreshing every 2 seconds -
- )} -
+
+ + +
+ + handleLineCountChange(e.target.value)} + className="w-24" + min="1" + max="10000" + /> +
+ +
+ setAutoRefresh(e.target.checked)} + disabled={!isRunning} + className="rounded" + /> + +
+ - + - +
- +