docs: update CHANGELOG.md and CONTEXT.md for v0.16.1 + hub v0.1.8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 18:29:41 +01:00
parent 80f5cbaa28
commit 276be5a88e
2 changed files with 23 additions and 2 deletions
+21
View File
@@ -1,5 +1,26 @@
## Changelog
### What was just completed (2026-02-19 session 59)
- **v0.16.1 + hub v0.1.8 — Hub Update Trigger + Controller URL Reporting:**
Controller now includes its external URL (`controller_url`) in periodic hub reports so the hub can trigger self-updates remotely. Hub tracks the URL in a new `controller_url` DB column, checks the Gitea registry for the latest controller image version (VersionChecker goroutine, `web/version.go`), and shows a "Controller Update" card on the customer detail page.
**Controller (v0.16.1):**
- `internal/report/types.go`: Added `ControllerURL string` field to Report struct.
- `internal/report/builder.go`: Sets `ControllerURL` from `cfg.Customer.Domain``https://felhom.<domain>`.
- `internal/api/router.go`: **Bug fix** — moved selfupdate routes to before `hasSuffix(path, "/update")` stack case (which was catching `/selfupdate/update` first).
**Hub (v0.1.8):**
- `cmd/hub/main.go`: Added `Registry` config section + defaults; creates `VersionChecker` goroutine if credentials configured; passes `apiKey` to `web.New()`.
- `internal/store/store.go`: Added `ControllerURL` to `CustomerSummary`; idempotent `ALTER TABLE reports ADD COLUMN controller_url TEXT` migration; updated `SaveReport`, `GetCustomers`, `GetCustomer`, `GetCustomerHistory` queries.
- `internal/web/version.go` (NEW): `VersionChecker` type — polls Gitea Docker Registry V2 API (`/v2/<owner>/<repo>/tags/list`) every 6h; parses semver tags; stores latest version thread-safely.
- `internal/web/server.go`: Added `apiKey`, `versionChecker` fields; updated `New()` signature; added `SetVersionChecker()`; added `handleTriggerUpdate` handler that proxies POST to controller's `/api/selfupdate/update`; added trigger-update route (before `/customers/` catch-all); updated `handleCustomerDetail` with `ControllerURL`, `LatestVersion`, `UpdateAvailable` template data; added `compareVersions` helper.
- `internal/web/templates/customer.html`: New "Controller Update" section between Health and Notifications — shows current/latest version with update indicator, controller URL link, and conditional "Trigger Update" button with JS.
- `internal/api/handler.go`: Added `ControllerURL` to `/api/v1/customers` JSON response.
- Hub config (`hub.yaml`): Added `registry:` section with Gitea admin credentials.
**Files modified/created:** controller: 3 files; hub: 5 modified + 1 created (version.go).
### What was just completed (2026-02-19 session 58)
- **v0.16.0 — Controller Self-Update:**
+2 -2
View File
@@ -7,7 +7,7 @@
>
> Ask Claude Code: "Please update CONTEXT.md with what we did today"
Last updated: 2026-02-19 (session 54)
Last updated: 2026-02-19 (session 59)
---
@@ -20,7 +20,7 @@ Last updated: 2026-02-19 (session 54)
- Customer deployments use Docker Compose (not Kubernetes) for simplicity
### felhom-controller (this repo)
- **Version:** v0.15.4
- **Version:** v0.16.1
- **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, **dedicated backup page**)