From 15e9dffb85fae097c3762f84f60db94a416d0e56 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Mon, 16 Feb 2026 07:45:19 +0100 Subject: [PATCH] Update CONTEXT.md for v0.4.5 session Co-Authored-By: Claude Opus 4.6 --- CONTEXT.md | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/CONTEXT.md b/CONTEXT.md index d5fab91..28fa615 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -7,7 +7,7 @@ > > Ask Claude Code: "Please update CONTEXT.md with what we did today" -Last updated: 2026-02-15 (session 11) +Last updated: 2026-02-16 (session 12) --- @@ -22,15 +22,44 @@ Last updated: 2026-02-15 (session 11) ## Current project state ### felhom-controller (this repo) -- **Version:** v0.4.1 +- **Version:** v0.4.5 - **Phase 1:** ✅ COMPLETE — Stack Manager + Deploy Flow - **Phase 2:** ✅ COMPLETE — Monitoring & Health (scheduler, CPU/temp, healthchecks.io pings) -- **Phase 3:** ✅ COMPLETE — Backups (DB dumps, restic integration, manual trigger) +- **Phase 3:** ✅ COMPLETE — Backups (DB dumps, restic integration, manual trigger, **dedicated backup page**) - **First app deployed:** Paperless-ngx on demo-felhom.eu (2026-02-13) - **Running on:** demo-felhom (N100 mini PC) at 192.168.0.162:8080 -- **All Phase 1-3 features working:** deploy, start/stop/restart/update, logs, health-aware states, auth, monitoring, backups +- **All Phase 1-3 features working:** deploy, start/stop/restart/update, logs, health-aware states, auth, monitoring, backups, backup detail page -### What was just completed (2026-02-15 session 11) +### What was just completed (2026-02-16 session 12) +- **v0.4.5 — Dedicated Backup Page ("Biztonsági mentés"):** + - **New `/backups` page** with full backup system visibility — 5 sections: + 1. **Status overview cards**: Local backup status (green/gray), remote placeholder (gray), DB count, repo size + 2. **Schedule section**: DB dump/restic/prune schedule with next-run times, last backup time + duration, retention policy, "Mentés most" button + 3. **Database table**: Lists all discovered DBs with type badge (PostgreSQL/MariaDB), dump file size, last dump time, validation (table count), status + 4. **Snapshot history table**: Last 20 snapshots with ID, time, data added, files new/changed + 5. **Repository info card**: Path, size, snapshot count, integrity check status, backed-up paths list, remote copy placeholder + - **Backend extensions:** + - `SnapshotRecord` type + ring buffer (20 entries) in Manager for per-snapshot stats + - `DumpValidation` — scans dump files for CREATE TABLE statements, validates header and file size + - `ValidateDump()` runs after each successful dump in `DumpOne()` + - `ListDumpFiles()` scans dump directory for existing `.sql` files (fallback when in-memory results empty) + - `ListSnapshots()` on ResticManager — returns all snapshots from restic (newest first) + - `GetFullStatus()` on Manager — single call returns everything the page needs + - `LoadSnapshotHistory()` populates history from restic on startup (without delta stats) + - Restic check result tracking (`lastCheckTime`, `lastCheckOK`) + - `NextDailyRun()` exported from scheduler for next-run time calculation + - **Server wiring:** + - `Server` struct now holds `*scheduler.Scheduler` + - `NewServer()` accepts scheduler parameter + - `/backups` route + `backupsHandler()` in handlers.go + - **New template functions** (`funcmap.go`): `timeAgo`, `fmtTime`, `fmtTimeShort`, `dbTypeLabel`, `nextRunLabel`, `pruneLabel`, `nextPruneLabel`, `fmtDuration`, `fmtBytes`, `shortID` + - **Navigation**: Sidebar now has 3 items (Vezérlőpult, Alkalmazások, Biztonsági mentés) + - **Dashboard**: Backup card title is now a clickable link to `/backups` + - **Auto-refresh**: Page polls `/api/backup/status` every 3s during backup-in-progress, reloads when complete + - **CSS**: Full dark-theme styles for schedule card, database table, snapshot table, repository card, validation badges, DB type badges, empty state + - **Controller version:** v0.4.5 — deployed and verified on demo-felhom.eu (2 historical snapshots loaded) + +### What was previously completed (2026-02-15 session 11) - **v0.4.1 — App Filtering + Bugfixes:** - **Filter bar on Alkalmazások page**: Four pill-shaped filter buttons (Mind/Futó/Leállítva/Telepíthető) with live count badges computed from DOM. Filters stack cards via `display: none`, updates URL with `?filter=running` via `history.replaceState`. Reads filter from URL on page load for deep-linking support. - **New `filterCategory` template function** (`funcmap.go`): Maps container state + deployed flag to filter categories (running/stopped/available). Each stack card gets a `data-filter-state` attribute for client-side filtering.