mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 18:45:53 +00:00
5b94724bf2
Audit pass on the TrueNAS pages turned up three concrete issues: 1. **TrueNAS system Uptime/Temperature were dashes** even though the data lives on `truenas.uptimeSeconds` and on the `agent.temperature` max-sensor projection. The system row is emitted by `internal/truenas/provider.go::truenasRecordsFromSnapshot`, which is a separate path from the host/node adapters that the prior commit (c7bdd11e0) updated. Project the same top-level `Resource.Uptime` and `Resource.Temperature` here so the canonical table renders real values (live mock now reports `uptime: 3628800, temperature: 61.5` on the TrueNAS appliance row). 2. **The Systems tab needed NAS-native columns.** A TrueNAS appliance is a storage box — operators want at-a-glance pool / dataset / disk / app counts on the same row as CPU / Memory / Storage / Temperature / Uptime. New `TrueNASSystemsTable` reuses canonical shared primitives (Card, Table, SearchInput, FilterButtonGroup, StatusDot) and computes per-system child counts client-side from the same TrueNAS scope already fetched by the page. 3. **Physical disks weren't surfaced anywhere on the page**, even though the canonical TrueNAS adapter emits SMART-instrumented `physical_disk` rows with model / serial / size / health / temperature / wearout. Add a `disks` sub-tab (between Storage and Apps) backed by a new `TrueNASDisksTable` that surfaces those columns — generic Disk I/O / Uptime / Temperature from the infra table aren't meaningful for individual disks, but disk-native columns (model, type, size, health, temp, wearout, serial) are. Browser verification (Playwright, chromium, live mock-mode dev runtime): - 9 tests pass. The every-sub-tab operator-controls audit now covers /truenas/disks too; the search input on every TrueNAS sub-tab is the canonical SearchInput primitive. Targeted vitest: `src/features/truenas/__tests__/truenasPageModel.test.ts` (2 tests) green — covers the four-tab spec and the new `disks` bucket on the page model. Targeted Go: `go test ./internal/truenas/...` green. Contract-neutral bypass: PULSE_ALLOW_CONTRACT_NEUTRAL_COMMIT set. This completes the platform-page column-fit audit for TrueNAS. New top-level `Resource.Uptime` / `Resource.Temperature` projection is strictly additive (already documented as the adapter responsibility in unified-resources.md byc7bdd11e0). The two new bespoke tables live inside features/truenas/ and reuse canonical primitives only.