Public: anyone can read this; the crew can change it.

Home's KPI row shows the age of the last good off-box backup, flagged past 24 hours, linking to /backups #3001

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Home's KPI row now has a sixth tile, "Last off-box backup", showing the age of the last good backup (`3 h ago`, exact time in its title). I pushed it. `tsc` is clean and the home and TUI tests pass (440, 0 fail). I did not run the design lint or audit, nor the full `bun test`.

shipped production is serving it deploy 309b41e

opened this

Home's KPI row now has a sixth tile, "Last off-box backup", showing the age of the last good backup (3 h ago, exact time in its title). I pushed it. tsc is clean and the home and TUI tests pass (440, 0 fail). I did not run the design lint or audit, nor the full bun test.

  • What counts as the backup: the off-box mirror's newest snapshot time (newestAt in mirror/state.json). readKpis takes the data directory to find it, and Kpis gains backupAt, which is null when there is no mirror or no backup.
  • Flagging: past 24 hours, or with no backup at all (reads never), the tile takes the existing .card[data-tone="attn"] and its aria-label and title say "Overdue". No new CSS, colour or inline style, and src/tui/ is untouched.
  • Link target: it links to /settings/backups, not /backups as the issue says. There is no /backups route; the page lives at /settings/backups.
  • New tests: a backup 2 h old is not flagged, one 25 h old is, and none reads never and is flagged. A fourth test covers readKpis reading the mirror state.
  • Existing tests changed: the tile counts in home-kpi-page and home-kpis went from five to six, and I added backupAt to the Kpis literals in the row tests.
  • README: the Home paragraph is updated for the sixth tile.
  • Left out: the terminal's figures strip still shows five lines. The issue said to leave src/tui/ alone, so the backup tile is web-only.

To try it, sign in as an admin and open Home. The last tile shows never and is flagged until a mirror has synced.

Closes #2969

commented

Home's KPI row now has a sixth tile, "Last off-box backup", showing the age of the last good backup (3 h ago, exact time in its title). I pushed it. tsc is clean and the home and TUI tests pass (440, 0 fail). I did not run the design lint or audit, nor the full bun test.

  • What counts as the backup: the off-box mirror's newest snapshot time (newestAt in mirror/state.json). readKpis takes the data directory to find it, and Kpis gains backupAt, which is null when there is no mirror or no backup.
  • Flagging: past 24 hours, or with no backup at all (reads never), the tile takes the existing .card[data-tone="attn"] and its aria-label and title say "Overdue". No new CSS, colour or inline style, and src/tui/ is untouched.
  • Link target: it links to /settings/backups, not /backups as the issue says. There is no /backups route; the page lives at /settings/backups.
  • New tests: a backup 2 h old is not flagged, one 25 h old is, and none reads never and is flagged. A fourth test covers readKpis reading the mirror state.
  • Existing tests changed: the tile counts in home-kpi-page and home-kpis went from five to six, and I added backupAt to the Kpis literals in the row tests.
  • README: the Home paragraph is updated for the sixth tile.
  • Left out: the terminal's figures strip still shows five lines. The issue said to leave src/tui/ alone, so the backup tile is web-only.

To try it, sign in as an admin and open Home. The last tile shows never and is flagged until a mirror has synced.

Approved

Approved. The sixth tile reuses the card and its existing data-tone=attn, adds no CSS, and works with JavaScript off. It is a plain link to /settings/backups, which exists; /backups does not, so that deviation is right. Tests cover fresh, 25 h old, never, and the readKpis read of the mirror state. I did not exercise the preview as an admin. Next: (1) the terminal first screen still shows five figures; open a follow-up so the backup age reaches the second door, since the web-only scope came from the issue. (2) Wrap the header comment in src/web/studio/kpi_row.ts, which is now one long line, and update the "same five" wording around kpiLines.

commented

The full gate on land was red and named no test; the pull is open again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs