Files
felhom-controller/REPORT.md
T
admin a9f0de4c63 v0.79.0: disk view keys the "registered" check on the stable path
Follow-up to v0.78.0. The disk-view JS (settings.html regBadge/actions) checked
registration by the raw mount_path, but the registry stores the stable path since
v0.78.0 — so enrolled drives showed a spurious "Nem regisztrált" badge + Register
button. Fix: regKey(d) = d.guest_path || d.mount_path (agent reports the stable
guest_path per disk); registerDrive still posts the raw path. Display-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PsnU2ASocYrvzqE82YDYW
2026-06-23 17:42:37 +02:00

41 lines
2.6 KiB
Markdown

# REPORT — controller v0.79.0: disk view keys "registered" on the stable path
## Baseline
- felhom-controller `main` @ `081c1cd`, **v0.78.0 → v0.79.0**. Trunk-based, `main`.
- Follow-up to v0.78.0 (stable-path registration). Same path-model mismatch, on the **display** side.
## Problem (operator-reported, screenshot)
After v0.78.0, the storage disk view tagged both enrolled, working drives **"Nem regisztrált"** and
showed a **"Regisztrálás"** button — even though the registry holds them and the selftest reports them
`2 connected`. Root cause: the disk-view JS (`settings.html`) decided "registered?" by looking up the
drive's **raw** `mount_path` (`/mnt/felhom-flash`) in `window.__registeredPaths`, but v0.78.0 made the
registry store the **stable** path (`/mnt/felhom-drives/felhom-flash`), so the raw-key lookup always
missed. (Before v0.78.0 it read "Regisztrálva" because the registry held the raw path — looked right but
the drive was broken.)
## Fix (`controller/internal/web/templates/settings.html`, disk-view JS)
- New `regKey(d)` = `d.guest_path || d.mount_path` — the agent already reports each drive's STABLE
in-guest path as `guest_path` (`/mnt/felhom-drives/<name>`), which is what the registry stores.
- `regBadge(d, registered)` and `actions(d, registered)` now key the "is registered" check on
`regKey(d)` instead of `d.mount_path`. So an enrolled drive reads **"Regisztrálva"** and the spurious
Register button is hidden.
- `registerDrive()` still posts the RAW `mount_path` (unchanged) — the agent operates on raw, and
`handleStorageRegister` maps it to the stable path. Display-only change; no Go/handler change.
## Tests
- `go build ./... && go vet ./... && go test ./...`**all green** (incl. `TestTemplatesParse`, which
forces the edited template to parse).
## Deploy (v0.79.0 → guest 9201)
- _(filled at deploy)_ built+pushed `:0.79.0` on 192.168.0.180; deployed to 9201 (pull →
`/etc/felhom-controller-image` → restart `felhom-controller-bootstrap.service`); `:0.79.0 Up (healthy)`.
## Verification
- _(filled at verify)_ disk view: both drives show **"Regisztrálva"**, NO "Regisztrálás" button; storage
selftest still `2 connected`; no "Rendszermeghajtón", no activation banner (v0.78.0 state intact).
## Observations (recorded, NOT acted on)
- `pendingActivationDrives` still keys off the agent's raw `MountPath` (the "~30 mp újraindítás" banner);
obsolete in the live-activating intermediary model — key off `GuestPath`/`BoundUnderParent` or retire.
- The free-form settings storage-add registers a user-typed path verbatim (advanced manual flow).