9596c8e563
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PsnU2ASocYrvzqE82YDYW
3.2 KiB
3.2 KiB
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 asguest_path(/mnt/felhom-drives/<name>), which is what the registry stores. regBadge(d, registered)andactions(d, registered)now key the "is registered" check onregKey(d)instead ofd.mount_path. So an enrolled drive reads "Regisztrálva" and the spurious Register button is hidden.registerDrive()still posts the RAWmount_path(unchanged) — the agent operates on raw, andhandleStorageRegistermaps 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)
- Built + pushed
gitea.dooplex.hu/admin/felhom-controller:0.79.0on 192.168.0.180; deployed to 9201 (pull →/etc/felhom-controller-image→ restartfelhom-controller-bootstrap.service);docker ps→:0.79.0 Up (healthy).
Verification (the two data inputs the fixed JS consumes — now aligned)
GET /api/disks(in-guest):felhom-flash→mount_path=/mnt/felhom-flash,guest_path=/mnt/felhom-drives/felhom-flash,bound_under_parent=true;felhom-usb→guest_path=/mnt/felhom-drives/felhom-usb,bound=true.- Settings page
__registeredPaths=["/mnt/felhom-drives/felhom-flash","/mnt/felhom-drives/felhom-usb"]. - ⇒
regKey(d)=d.guest_pathnow matches the registry → badge renders "Regisztrálva" and the spurious "Regisztrálás" button is hidden. (The badge/button are pure client-side JS over these two inputs; verified the inputs, not a browser render — the bridge wasn't available this session.) - v0.78.0 state intact: storage selftest
2 connected, no "Rendszermeghajtón", no activation banner.
Observations (recorded, NOT acted on)
pendingActivationDrivesstill keys off the agent's rawMountPath(the "~30 mp újraindítás" banner); obsolete in the live-activating intermediary model — key offGuestPath/BoundUnderParentor retire.- The free-form settings storage-add registers a user-typed path verbatim (advanced manual flow).