Skip to content

feat: array sleeping disks show Standby + richer disk data (0.1.40-beta8) - #207

Merged
nofuturekid merged 2 commits into
mainfrom
feat/array-disk-sleep-and-stats
May 30, 2026
Merged

nofuturekid merged 2 commits into
mainfrom
feat/array-disk-sleep-and-stats

Conversation

@nofuturekid

Copy link
Copy Markdown
Owner

Spun-down disks showed "0°" because the server returns temp=null when isSpinning=false and GetArray didn't fetch isSpinning; now sleeping disks render a moon icon + "Standby" (in grid tile + list row), and the poll additionally fetches numErrors (shown as a danger pill), rotational, and per-disk warning/critical temp thresholds (used for temp colour, falling back to 42/50 when unset); array stays on the 5s poll (the arraySubscription is a slower 10s heartbeat — see ADR-0045); builds on the 0.1.40 cycle.

🤖 Generated with Claude Code

nofuturekid and others added 2 commits May 30, 2026 16:21
… counts (0.1.40-beta8)

- schema + GetArray op: add isSpinning, rotational, numErrors, warning,
  critical to ArrayDisk and all three disk selections (parities/disks/caches)
- Disk model: add isSpinning, rotational, numErrors, warningC, criticalC;
  KDoc notes temp=0 when spun down, isSpinning is the truth source
- Disk.tempLevel() pure helper (DiskTempLevel enum) encodes threshold
  precedence: server thresholds > app defaults (42/50 °C); isSpinning=false
  → Standby always wins regardless of tempC
- GraphQlMapper: mapDisk carries new fields; warningC/criticalC ≤0 → null
- UC.Standby icon wrapping Icons.Outlined.Bedtime
- ArrayTab DiskTile + DiskCard: !isSpinning → moon + "Standby" replaces
  thermo + "0°"; per-disk tempColor via tempLevel(); numErrors pill
- Tests: DiskTempLevelTest (pure model, 11 cases covering standby/fallback/
  server-threshold branches); ArrayMappingTest (mapper round-trip for
  isSpinning/numErrors/thresholds/zero-threshold-as-unset)
- ADR-0045: records the standby display decision, richer poll fields, and
  why the array stays on the 5 s poll (subscription is a slower 10 s heartbeat)
- CHANGELOG beta8; versionCode 113→114, versionName beta7→beta8

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

When the server has configured EITHER warningC or criticalC for a disk,
those thresholds are the sole authority. The old flat when-chain would
fall through to `warningC == null && tempC >= 42` even when criticalC
was set, producing Warn instead of Normal for a disk below its only
threshold. New logic: if either threshold is non-null, evaluate only
those; the 42/50 fallback fires only when both are null.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nofuturekid
nofuturekid merged commit 15140ab into main May 30, 2026
8 checks passed
@nofuturekid
nofuturekid deleted the feat/array-disk-sleep-and-stats branch May 30, 2026 14:44
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