feature/instance-db-stats-card
Adds a "Database" stats tile to the per-app Overview page in the console (console.carloku.com/a/<account>/apps/<app>), alongside the existing Running / Resources / Web addresses / Release history tiles — requested after reviewing a Supabase "Primary Database" card (region, instance type, CPU/Disk/RAM/connections) as a reference shape.
Shows two numbers per app:
- Total on-disk SQLite size across the account's own routes (file + -wal), reusing the existing status.BoxMetrics.RouteDBBytes join (loadBoxJoin/dbSize) that already backs the
carlos instances/carlos routesAPIs — no new backend plumbing needed, that pipeline already existed end-to-end from an earlier "show database and bucket sizes" commit. - The fullest disk-used fraction among the boxes backing the app's reporting instances (worst case, not an average) — reusing the existing internal/metrics sweep (BoxMetricsView.Disk) the same pipeline already used for the Resources tile's CPU/Mem.
Motivation: while scoping this I investigated the bdn/ips app's 3 instances failing repeatedly overnight (2026-10-01) — root cause was one instance's SQLite database hitting SQLITEFULL, crashing it, then every instance on the same box failing to even reopen its database (SQLITEIOERR_SHMSIZE) for the next 4h18m. Disk headroom per instance isn't visible anywhere on the tenant-facing console today; this tile is a step toward that, hence DiskFracMax deliberately surfaces the WORST box rather than an average.
Status: implemented, tested (new assembleOverview unit tests pin DiskFracMax-is-max-not-average and DBSizeSum-sums-regardless-of-sweep-reporting), build/vet/gofmt clean, internal/console's full test suite green. Two pre-existing test failures observed in this sandbox (internal/tunnelclient, internal/edge's fleet e2e tests) are unrelated tunnel/relay-subsystem tests with no import relation to this change — flagged in a separate discussion rather than investigated here.
Add a Database stats box to the console's per-instance Overview page (size, disk usage etc.), alongside the existing Running/Resources/Web Addresses/Release History boxes.
Discussions 1 open
Tasks 3/3 done
- Investigate overview tile data sources (reuse vs new plumbing) Done
- Add Database tile to app_overview.html + assembleOverview Done
- Tests for DiskFracMax (worst box, not average) and DBSizeSum (sums regardless of sweep reporting) Done
Activity
- claude agent, operated by paul@keymail.dev opened Review: tile shows the DB size only; box disk is not tenant data
- claude agent, operated by paul@keymail.dev pushed bb1362503 console: Database tile shows size only; no box disk to tenants
- task updated: Investigate overview tile data sources (reuse vs new plumbing)
- task updated: Add Database tile to app_overview.html + assembleOverview
- task updated: Tests for DiskFracMax (worst box, not average) and DBSizeSum (sums regardless of sweep reporting)
- claude agent, operated by tonywood@keymail.dev added task Tests for DiskFracMax (worst box, not average) and DBSizeSum (sums regardless of sweep reporting)
- claude agent, operated by tonywood@keymail.dev added task Investigate overview tile data sources (reuse vs new plumbing)
- claude agent, operated by tonywood@keymail.dev added task Add Database tile to app_overview.html + assembleOverview
- tonywood@keymail.dev pushed d9bf4606d console: a Database stats tile on the app Overview