Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Document storage freshness presentation contract

rcourtmancaf7f8086787
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 76297e3613..a16d83fa04 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -6505,3 +6505,13 @@ without horizontal overflow at mobile widths. The unavailable state is a
`role="alert"` message distinct from the empty state, because "cannot read
the log" and "no attempts" mean opposite things to someone deciding whether
to trust their alerting.
+
+### Storage rows distinguish retained observations
+
+Storage table state presentation consumes the storage record's canonical
+freshness field before provider-native health labels. When polling fails and
+the last-known capacity remains visible, the row uses the shared amber warning
+tokens, labels the observation `Stale`, and exposes the last successful refresh
+age in its title. Freshness presentation remains in the pure storage row model;
+the table component must not infer age from render time or restyle retained
+capacity independently.
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 240d7c2a84..976e02cac1 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -5522,3 +5522,18 @@ resource agent ID and canonical hostname. This identity reconciliation changes
neither backup, snapshot, restore, retention, nor recovery authority; those
operations remain governed by their existing resource capabilities and action
lifecycle contracts.
+
+### Retained storage observations preserve freshness truth
+
+The shared storage adapter may retain the last successful capacity observation
+when a provider poll fails, but it must also project the canonical resource
+`sourceStatus` into the storage record. A stale, offline, failed, errored, or
+unauthorised source therefore renders as `Stale` even when the provider's last
+native state was online. The row identifies the last successful observation
+age and may include the bounded collection error; a subsequent online source
+observation clears that stale presentation. Retained capacity must never be
+presented indistinguishably from current provider data.
+
+`frontend-modern/src/features/storageBackups/__tests__/storageAdapters.test.ts`
+pins the canonical freshness and error projection, while the row-presentation
+tests pin the operator-facing state and observation age.
diff --git a/frontend-modern/src/features/storageBackups/__tests__/storageAdapters.test.ts b/frontend-modern/src/features/storageBackups/__tests__/storageAdapters.test.ts
index 274d7be12f..96866fbeda 100644
--- a/frontend-modern/src/features/storageBackups/__tests__/storageAdapters.test.ts
+++ b/frontend-modern/src/features/storageBackups/__tests__/storageAdapters.test.ts
@@ -61,6 +61,29 @@ describe('storageAdapters', () => {
expect(records).toHaveLength(0);
});
+ it('carries failed-poll freshness into the storage presentation record', () => {
+ const records = buildStorageRecords({
+ state: baseState(),
+ resources: [
+ makeResourceStorage({
+ sourceStatus: {
+ proxmox: {
+ status: 'stale',
+ lastSeen: '2026-08-25T18:00:00Z',
+ error: 'Datastore.Audit permission denied',
+ },
+ },
+ }),
+ ],
+ });
+
+ expect(records[0]).toMatchObject({
+ observedAt: 1731000000000,
+ freshness: 'stale',
+ freshnessError: 'Datastore.Audit permission denied',
+ });
+ });
+
it('prefers enriched storage metadata over platformData inference', () => {
const enriched = {
...makeResourceStorage({