feat(02-06): cache the Server tab's seven load groups with explicit TTL/persist
Demo images / Build & push demo images (push) Failing after 3m46s

Server.vue already had five of the seven load groups (network summary, FIPS
summary, VPN peers, interfaces, Tor services) on useCachedResource from a
pre-phase commit, but none declared an explicit ttlMs/persist (relying on
the composable's 30s/persist:true defaults) and dedup:true was missing from
several underlying RPC calls. loadDiskStatus was the one remaining plain
uncached fetch, forced on every activation.

- Explicit TTL per group (10s fast tier: network-summary/interfaces/
  disk-status; 30s near-default: vpn-peers/tor-services; 60s near-static:
  fips-summary)
- Explicit persist:false for server.vpn-peers (npub/peer identity) and
  server.tor-services (onion addresses) per T-02-01; other groups persist
- New server.disk-status cached resource replaces the plain fetch; it now
  self-heals via the composable's own onActivated instead of an explicit
  every-entry call
- dedup:true added to all underlying rpcClient calls, including the
  parameterless vpnStatus()/dnsStatus()/diskStatus() convenience methods
- RefreshIndicator wired into a new minimal header row, driven by whether
  any of the six cache entries is refreshing
- RESEARCH assumption A3 settled: read all seven loader bodies; none
  consumes another's result — the concurrent fan-out is correct as-is
- Fixed a keepAliveLifecycle.test.ts assertion invalidated by the new 10s
  network-summary TTL (reactivation now also revalidates that resource,
  adding one more vpnStatus() call the test didn't previously account for)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-07-30 17:03:55 -04:00
co-authored by Claude Fable 5
parent 8563cf4a84
commit e6ed5536c9
4 changed files with 399 additions and 30 deletions
+3 -1
View File
@@ -1021,6 +1021,7 @@ class RPCClient {
return this.call({
method: 'vpn.status',
params: {},
dedup: true, // read-only status; safe to collapse concurrent callers (PERF-02)
})
}
@@ -1091,6 +1092,7 @@ class RPCClient {
return this.call({
method: 'network.dns-status',
params: {},
dedup: true, // read-only status; safe to collapse concurrent callers (PERF-02)
})
}
@@ -1118,7 +1120,7 @@ class RPCClient {
used_percent: number
level: 'ok' | 'warning' | 'critical'
}> {
return this.call({ method: 'system.disk-status' })
return this.call({ method: 'system.disk-status', dedup: true }) // read-only; safe to collapse concurrent callers (PERF-02)
}
async diskCleanup(): Promise<{