Skip to content

feat: use Unraid global temperature thresholds for disk + CPU coloring (0.1.40-beta9) - #208

Merged
nofuturekid merged 2 commits into
mainfrom
feat/global-temp-thresholds
May 30, 2026
Merged

nofuturekid merged 2 commits into
mainfrom
feat/global-temp-thresholds

Conversation

@nofuturekid

Copy link
Copy Markdown
Owner

Per-disk temperature thresholds are null on real servers; the real thresholds live in the dynamix display settings (display { hot max warning critical }, live-verified hot=55/max=60 for disks, warning=85/critical=95 for CPU).

Disk temp coloring now coalesces per-disk → global(hot/max) → hardcoded(42/50), fixing false alarms (a 52° disk wrongly showed danger under the old hardcoded 50, now Normal under the user's max=60); the CPU temperature card accent now uses the global warning/critical.

This supersedes the beta8 per-disk "no-mixing" rule (ADR-0045 updated). Builds on the 0.1.40 cycle.

🤖 Generated with Claude Code

nofuturekid and others added 2 commits May 30, 2026 17:39
…eta9)

Unraid stores global temperature thresholds in dynamix display settings
(display.hot/max for disks, display.warning/critical for CPU). These were
ignored: disk colors used hardcoded 42/50, causing a 52 °C disk with
global crit=60 to show Danger. CPU temp card used sensor-derived flags only.

Changes:
- schema: add `display: InfoDisplay` to Query; vendor `InfoDisplay` type
- queries: add `GetDisplay { display { hot max warning critical } }`
- Models: add `DisplayThresholds`; replace `Disk.tempLevel()` with
  `Disk.tempLevel(globalWarnC, globalCritC)` using independent coalescing
  (per-disk ?: global ?: hardcoded) — removes beta8 "if-either-set" rule
- Mapper: `GetDisplayQuery.Data.toDisplayThresholds()` extension
- Repository: `displayStream()` at POLL_INFO_MS (60 s)
- ViewModel: `displayState` + `displayThresholds` (nullable unwrap)
  gated on overviewOr(Array) — same pattern as dockerLiveStats
- ArrayTab: thread globalDiskWarnC/globalDiskCritC to DiskTile/DiskCard
- OverviewTab: CPU card accent prefers cpuWarnC/cpuCritC from display;
  falls back to sensor flags when display poll not yet loaded
- MainScreen: collect displayThresholds, pass to both tabs
- Tests: DiskTempLevelTest updated to new signature + coalescing semantics;
  new DisplayThresholdsMappingTest for mapper correctness
- docs: ADR-0045 updated with beta9 precedence rule

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ontent

OverviewTab received the threshold params but never forwarded them to
OverviewContent (call-site was missing the args) and OverviewContent
had no matching parameters in its signature, so the threshold logic at
lines 306-309 always resolved to the fallback path. Both gaps are fixed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nofuturekid
nofuturekid merged commit a07b59d into main May 30, 2026
8 checks passed
@nofuturekid
nofuturekid deleted the feat/global-temp-thresholds branch May 30, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant