Skip to content

Commit 5b59008

Browse files
Grace Bradleyclaude
authored andcommitted
fix(dashboard): hide CPU temp card when sensor unavailable
On macOS the dashboard-api runs in Docker and can't read host thermal sensors, so temp_c is always null. Instead of showing "— N/A", just hide the card entirely. Linux/Windows with real sensors still show it normally. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 708e20c commit 5b59008

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

  • dream-server/extensions/services/dashboard/src/pages

dream-server/extensions/services/dashboard/src/pages/Dashboard.jsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,15 @@ export default function Dashboard({ status, loading }) {
265265
subvalue="utilization"
266266
percent={status.cpu.percent}
267267
/>
268-
<MetricCard
269-
icon={Thermometer}
270-
label="CPU Temp"
271-
value={status.cpu.temp_c != null ? `${status.cpu.temp_c}°C` : '—'}
272-
subvalue={status.cpu.temp_c != null ? (status.cpu.temp_c < 70 ? 'Normal' : status.cpu.temp_c < 85 ? 'Warm' : 'Hot') : 'N/A'}
273-
alert={status.cpu.temp_c >= 85}
274-
/>
268+
{status.cpu.temp_c != null && (
269+
<MetricCard
270+
icon={Thermometer}
271+
label="CPU Temp"
272+
value={`${status.cpu.temp_c}°C`}
273+
subvalue={status.cpu.temp_c < 70 ? 'Normal' : status.cpu.temp_c < 85 ? 'Warm' : 'Hot'}
274+
alert={status.cpu.temp_c >= 85}
275+
/>
276+
)}
275277
</>
276278
)}
277279
{status?.ram && status?.gpu?.memoryType !== 'unified' && (

0 commit comments

Comments
 (0)