From cf52b5f51b95cb112054df3911f9253eca154ab2 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 21 Jan 2026 11:26:38 +0000 Subject: [PATCH] fix: UI improvements. Related to #1114, #1134, #1116 - Fix Docker update button staying disabled when settings API fails (#1114) - Remove AI banner warning on every page load when AI is intentionally disabled (#1134) - Use auto-precision for formatBytes in Proxmox tab display (#1116) --- frontend-modern/src/App.tsx | 2 ++ frontend-modern/src/components/AI/Chat/index.tsx | 3 ++- .../src/components/shared/NodeSummaryTable.tsx | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend-modern/src/App.tsx b/frontend-modern/src/App.tsx index 88138082b..992f241d0 100644 --- a/frontend-modern/src/App.tsx +++ b/frontend-modern/src/App.tsx @@ -708,6 +708,8 @@ function App() { layoutStore.loadFromServer(); } catch (error) { logger.error('Failed to load theme from server', error); + // Ensure settings are marked as loaded so UI doesn't stay in loading state + markSystemSettingsLoadedWithDefaults(); } } else { // We have a local preference, just mark that we've checked the server diff --git a/frontend-modern/src/components/AI/Chat/index.tsx b/frontend-modern/src/components/AI/Chat/index.tsx index 2042c85a5..483151d07 100644 --- a/frontend-modern/src/components/AI/Chat/index.tsx +++ b/frontend-modern/src/components/AI/Chat/index.tsx @@ -194,7 +194,8 @@ export const AIChat: Component = (props) => { try { const status = await AIChatAPI.getStatus(); if (!status.running) { - notificationStore.warning('AI is not running'); + // AI not running - silently return, don't show warning on every page load + // Users who intentionally disabled AI don't need a notification about it return; } const sessionList = await AIChatAPI.listSessions(); diff --git a/frontend-modern/src/components/shared/NodeSummaryTable.tsx b/frontend-modern/src/components/shared/NodeSummaryTable.tsx index 60a82d368..bb14b86e6 100644 --- a/frontend-modern/src/components/shared/NodeSummaryTable.tsx +++ b/frontend-modern/src/components/shared/NodeSummaryTable.tsx @@ -200,12 +200,12 @@ export const NodeSummaryTable: Component = (props) => { if (isPVE(item)) { const node = item; if (!node.disk) return undefined; - return `${formatBytes(node.disk.used, 0)}/${formatBytes(node.disk.total, 0)}`; + return `${formatBytes(node.disk.used)}/${formatBytes(node.disk.total)}`; } const pbs = item; if (!pbs.datastores || pbs.datastores.length === 0) return undefined; const totals = getPbsTotals(pbs); - return `${formatBytes(totals.used, 0)}/${formatBytes(totals.total, 0)}`; + return `${formatBytes(totals.used)}/${formatBytes(totals.total)}`; }; const getTemperatureValue = (item: TableItem) => { @@ -548,8 +548,8 @@ export const NodeSummaryTable: Component = (props) => { 0}> = 10 - ? 'bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400' - : 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400' + ? 'bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400' + : 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400' }`} title={`${node!.pendingUpdates} pending apt update${node!.pendingUpdates !== 1 ? 's' : ''}`} > @@ -609,7 +609,7 @@ export const NodeSummaryTable: Component = (props) => { value={memoryPercentValue} type="memory" resourceId={metricsKey} - sublabel={pbs!.memoryTotal ? `${formatBytes(pbs!.memoryUsed, 0)}/${formatBytes(pbs!.memoryTotal, 0)}` : undefined} + sublabel={pbs!.memoryTotal ? `${formatBytes(pbs!.memoryUsed)}/${formatBytes(pbs!.memoryTotal)}` : undefined} isRunning={online} showMobile={false} />