From 63d81088bd3af70f790f8183be4654c1f8c97aaa Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Sun, 15 Feb 2026 10:05:19 +0100 Subject: [PATCH] =?UTF-8?q?update=20CONTEXT.md=20for=20session=208=20?= =?UTF-8?q?=E2=80=94=20orphan=20detection,=20filebrowser=20infra?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- CONTEXT.md | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/CONTEXT.md b/CONTEXT.md index 40bd5ab..fc97a3d 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-14 (session 7) +Last updated: 2026-02-15 (session 8) --- @@ -22,13 +22,31 @@ Last updated: 2026-02-14 (session 7) ## Current project state ### felhom-controller (this repo) -- **Version:** v0.2.14 +- **Version:** v0.2.15 - **Phase 1:** ✅ COMPLETE — Stack Manager + Deploy Flow - **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 features working:** deploy, start/stop/restart/update, logs, health-aware states, auth -### What was just completed (2026-02-14 session 7) +### What was just completed (2026-02-15 session 8) +- **FileBrowser as infrastructure service:** + - Created `scripts/hdd-setup.sh` (adapted from deploy-portainer) — sets up HDD folder structure with `Dokumentumok` user dir + - Created `scripts/docker-setup.sh` (adapted from deploy-portainer) — installs Docker, Traefik, FileBrowser as infra services + - Added `filebrowser` to protected stacks in `controller.yaml.example` + - Removed `templates/filebrowser/` from app-catalog-felhom.eu (no longer a catalog app) +- **Orphan stack detection and deletion:** + - Added `Orphaned` field to Stack struct + `getCatalogTemplateSlugs()` helper + - Orphan detection in `ScanStacks()` — deployed stacks with no matching catalog template marked as orphaned + - New `delete.go`: `DeleteStack()` (compose down + HDD cleanup + dir removal), `GetStackHDDData()`, `parseComposeHDDMounts()` + - Safety: protected HDD paths (root, media, storage, Dokumentumok, appdata) can never be deleted + - New API endpoints: `DELETE /api/stacks/{name}` and `GET /api/stacks/{name}/hdd-data` + - UI: orange "Elavult" badge on orphaned stacks, "Törlés" button, delete confirmation modal + - Modal shows HDD data paths/sizes, checkbox for "Felhasználói adatok törlése a merevlemezről" + - Hides "Frissítés" and "Részletek" buttons for orphaned stacks +- **Verified:** 1 orphaned stack detected on startup (filebrowser — now infra, removed from catalog) +- **Controller version:** v0.2.15 + +### Previously completed (2026-02-14 session 7) - **Fixed YAML parse error in romm `.felhom.yml`** (app-catalog repo): - Root cause: Hungarian opening quote `„` (U+201E) paired with ASCII `"` (0x22) inside YAML double-quoted strings terminated the string prematurely - Affected lines: `help_text` for IGDB Client Secret and SteamGridDB API Key fields @@ -159,13 +177,14 @@ Last updated: 2026-02-14 (session 7) 7. Documentation: restart vs up -d for image updates ### What's next (priorities) -1. Add `app_info` + `optional_config` to more apps (start with Immich, Mealie, Vaultwarden) -2. Deploy a second app (e.g., ActualBudget — simplest, or Immich — tests HDD + secrets) to validate all .felhom.yml files -3. Add app screenshots to the asset pipeline (romm-screenshot-1.webp etc.) -4. Test on Raspberry Pi (pi-customer-1) -5. Add `paths.hdd_path` to demo-felhom controller.yaml to enable HDD bar -6. Phase 2 continued: CPU/temperature metrics, Healthchecks.io pings -7. Phase 3: Backup system (DB dumps + restic) +1. **Test orphan delete flow** — try deleting the orphaned filebrowser stack via the UI +2. Add `app_info` + `optional_config` to more apps (start with Immich, Mealie, Vaultwarden) +3. Deploy a second app (e.g., ActualBudget — simplest, or Immich — tests HDD + secrets) to validate all .felhom.yml files +4. Add app screenshots to the asset pipeline (romm-screenshot-1.webp etc.) +5. Test on Raspberry Pi (pi-customer-1) +6. Add `paths.hdd_path` to demo-felhom controller.yaml to enable HDD bar +7. Phase 2 continued: CPU/temperature metrics, Healthchecks.io pings +8. Phase 3: Backup system (DB dumps + restic) ## Architecture decisions @@ -187,6 +206,9 @@ Last updated: 2026-02-14 (session 7) | Git sync via os/exec git CLI | No Go git library needed, git is in the container image | | SHA-256 for content comparison | Only copy changed files, avoid unnecessary disk writes | | 30s debounce on manual sync | Prevents spamming the git server | +| Orphan = deployed but not in catalog | Safe lifecycle: remove from catalog → mark orphaned → user deletes via UI | +| FileBrowser as infra (not catalog) | Needed even after apps deleted (user browses HDD data); deployed by setup script | +| Protected HDD paths | Safety net: never delete top-level HDD dirs (media, storage, Dokumentumok, appdata) | ## Key file locations on demo-felhom