docs: CHANGELOG v0.98.0 + REPORT + CONTEXT + README (Tárhely subpage split)

This commit is contained in:
2026-07-02 19:37:42 +02:00
parent d3c97c62fe
commit 1b954e9217
4 changed files with 64 additions and 130 deletions
+24
View File
@@ -1,5 +1,29 @@
## Changelog
### v0.98.0 — storage IA follow-up: Meghajtók / Hálózati tárhely subpages (2026-07-02)
User feedback on the D1 Tárhely page: the NAS-add button rendered directly next to the local-drive
enrollment buttons ("Új meghajtó inicializálása" / "Meglévő meghajtó csatolása") — two different
storage classes confusingly interleaved. The page splits into two subpages under Tárhely:
- **`/storage` — Tárhely — Meghajtók** (storage.html): physical drive registry + unified agent view
+ migrate + wizard entry points + manual add. The enrollment buttons now live unambiguously in the
local-drive context.
- **`/storage/network` — Tárhely — Hálózati tárhely (NAS)** (storage_network.html, new): the NAS
share list ("NAS-megosztások") + add form + its JS moved verbatim (incl. its own `openDialog` copy
for the remove overlay).
- **layout.html:** the Tárhely main-nav item gains two always-visible nested sub-links (Meghajtók /
Hálózati tárhely; `.nav-links-nested` CSS); the parent stays highlighted on both subpages.
- **handlers.go / server.go:** `NetworkStoragePaths` moved from `storagePageData` into the new
`networkStoragePageData` (page key `storage-network`) + `storageNetworkPageHandler`;
`GET /storage/network` route. No `/api/storage/*` change.
- Tests updated: `/storage` must NOT render the NAS section, `/storage/network` renders it and
nothing drive-related; the section inventory + no-native-confirm scans cover the new template.
Both template gates green; `go build/vet/test ./...` green (18 pkgs).
- Live-validated on 9201: both subpages render with correct sidebar active states; the NAS add-form
toggle + `nsToggleSmb` + `openDialog` exercised on the new page.
### v0.97.0 — TASK-D1: settings split + Tárhely page (unified drive view) (2026-07-02)
The 1451-line settings monolith becomes four pages; storage is promoted to a first-class main-nav
+8 -1
View File
@@ -7,7 +7,14 @@
>
> Ask Claude Code: "Please update CONTEXT.md with what we did today"
Last updated: 2026-07-02 (v0.97.0 — TASK-D1 settings split + Tárhely unified drive view; live on 9201)
Last updated: 2026-07-02 (v0.98.0 — Tárhely split into Meghajtók + Hálózati tárhely subpages; live on 9201)
> **2026-07-02 — v0.98.0 (deployed on 9201): Tárhely IA follow-up.** User feedback on D1: NAS-add and
> local-drive enrollment buttons sat side by side — confusing. `/storage` split into two subpages
> under the Tárhely nav item (nested sub-links, `.nav-links-nested`): **/storage = Meghajtók**
> (drives + agent view + wizards + manual add) and **/storage/network = Hálózati tárhely (NAS)**
> (NAS-megosztások list + add form; own openDialog copy). `networkStoragePageData` (page key
> `storage-network`) split out of `storagePageData`. No API/storage-semantics change.
> **2026-07-02 — v0.97.0 (deployed on 9201): TASK-D1 — settings split + Tárhely page (IA only).**
> The 1451-line `settings.html` monolith is split into four pages: `/storage` (new main-nav
+31 -128
View File
@@ -1,135 +1,38 @@
# REPORT — TASK-D1: Settings split + Tárhely page (unified drive view) → v0.97.0
# REPORT — Storage IA follow-up: Meghajtók / Hálózati tárhely subpages → v0.98.0
**Date:** 2026-07-02 · **Deployed:** guest 9201 (`gitea.dooplex.hu/admin/felhom-controller:0.97.0`, healthy)
**Date:** 2026-07-02 · **Deployed:** guest 9201 (`gitea.dooplex.hu/admin/felhom-controller:0.98.0`, healthy)
**Trigger:** user feedback on the D1 Tárhely page — the NAS-add button and the local-drive enrollment
buttons ("Új meghajtó inicializálása" / "Meglévő meghajtó csatolása") sat side by side with no
separation; two different storage classes confusingly interleaved.
## 1. Baseline
## What changed (commit `d3c97c6` on `main`, from `c427b40`)
felhom-controller `main` @ `52e97b1` (v0.96.0, TASK-D0 final) — matched the spec exactly; **main had
NOT moved** past 52e97b1 at session start.
- **`/storage` — Tárhely — Meghajtók** (storage.html): physical drives only — registry cards +
unified agent view + migrate + the wizard entry points + manual add. The enrollment buttons now
live unambiguously in the local-drive context (directly under the drive cards).
- **`/storage/network` — Tárhely — Hálózati tárhely (NAS)** (storage_network.html, new): the NAS
share list ("NAS-megosztások") + add form + its JS moved verbatim, incl. its own `openDialog`
copy for the remove overlay (per the D1 no-shared-bundle convention).
- **Sidebar:** the Tárhely main-nav item gains two always-visible nested sub-links (Meghajtók /
Hálózati tárhely; new `.nav-links-nested` CSS); the parent stays highlighted on both subpages.
- **Go:** `networkStoragePageData()` (page key `storage-network`) split out of `storagePageData()`;
`storageNetworkPageHandler`; `GET /storage/network` route. **No `/api/storage/*` or storage
semantics change.**
## 2. Old-section → new-page mapping (every h3 accounted for)
## Verification
| Old settings.html section (h3) | New page |
|---|---|
| Rendszer konfiguráció | `/settings` (settings_system.html) |
| Verzió és frissítés | `/settings` |
| Vezérlő újraindítása | `/settings` |
| Kiszolgáló újraindítása | `/settings` |
| Adattárolók | `/storage` (storage.html) |
| Hálózati tárhely (NAS) | `/storage` |
| Meghajtók (ügynök nézet) → merged into Adattárolók + Rendszermeghajtók / Nem regisztrált groups | `/storage` |
| Értesítések | `/settings/notifications` (settings_notifications.html) |
| Alkalmazás-email | `/settings/notifications` |
| Jelszó módosítás | `/settings/security` (settings_security.html) |
| Földrajzi korlátozás | `/settings/security` |
| Veszhelyzeti informaciok → **Vészhelyzeti információk** (typo fixed) | `/settings/security` |
- `go build ./... && go vet ./... && go test ./...` — exit 0, 18 packages ok. Tests updated:
`/storage` must NOT render the NAS section, `/storage/network` renders it and nothing
drive-related; the h3 inventory + no-native-confirm scans include the new template.
- Template gates: `template_id_gate.py` OK, `emoji_gate.py` 0.
- **Live (claude-in-chrome):** both subpages render with correct sidebar active states (parent +
child); the drives page shows the enrollment buttons directly under the cards with the
Rendszermeghajtók group below and no NAS content; the NAS page's add-form toggle, `nsToggleSmb`
protocol switch, and `openDialog` were exercised on the moved JS. Sidebar shows 0.98.0.
The "Meghajtók (ügynök nézet)" standalone section was deliberately dissolved into the unified view
(enrichment of the registry cards + the two new groups) — noted here as the one consciously
restructured section. `TestSettingsSectionInventory` asserts all 11 remaining headings survive in
the union of the four templates and that the misspelling is gone.
## Notes
## 3. Files created / modified / deleted
**Created:** `settings_system.html`, `settings_notifications.html`, `settings_security.html`
(templates); `scripts/template_id_gate.py`, `scripts/emoji_gate.py`; `internal/web/settings_split_test.go`.
**Renamed:** `settings.html``storage.html` (git rename, 51% similarity).
**Modified:** `internal/web/server.go` (routes), `internal/web/handlers.go` (builders + rewired
handlers), `internal/web/templates/layout.html` (sidebar), `templates/style.css` (nav group CSS;
deleted `.sidebar-settings-link` + `.badge-lock` + `.lock-ico`), `templates/{backups,debug,deploy}.html`
(emoji), CHANGELOG.md, CONTEXT.md, controller/README.md, REPORT.md.
## 4. Per-commit hashes (pushed to `main`)
| Commit | Content |
|---|---|
| `d50a919` | Part 1: routes + per-page data builders + redirect tests |
| `f8e18a9` | Part 2: template split + sidebar + integrity gate |
| `cb6f04c` | Part 3: unified drive view + overlay migration |
| `622d932` | Part 3 leftovers: 8 emoji removed + Python emoji gate |
## 5. Tests + red-proofs
`go build ./... && go vet ./... && go test ./...` green after every commit; final run 18 packages
ok. Web-package test functions +8 (TestSettingsSplitPagesRender, TestSettingsSectionInventory,
TestWizardRoutesMovedWith301, TestStorageActionRedirectsToStorage, TestPasswordErrorRerendersSecurityPage,
TestStorageNoNativeConfirm, TestStorageAgentDownNote, TestNoEmojiInTemplates).
- **Redirect red-proof (Scenario D/E):** `TestStorageActionRedirectsToStorage` +
`TestWizardRoutesMovedWith301` run against the stashed pre-split handlers **failed**
`Location = "/settings?storage_msg=success&…"` (want `/storage?…`) and the 301s returned empty
Location. With the new code: pass.
- **Integrity-gate red-proof (§10):** a storage function (`getElementById('migrate-progress')`)
planted in `settings_notifications.html` made the gate **fail** with
`static #migrate-progress not defined in settings_notifications.html`; reverted → OK.
- **Section inventory:** all 11 old h3 headings present in the union; the misspelled
"Veszhelyzeti informaciok" asserted absent.
## 6. Integrity gate output (per template)
`python scripts/template_id_gate.py` → **OK — every JS element-ID reference resolves within its own
template.** Justified dynamic-ID exception list (in the script's `ALLOW`): the layout.html modals
that are built entirely in JS then looked up (`alert-modal`, `delete-modal`, `remove-modal` and
their inner button/checkbox IDs), and `sync-btn`/`sync-toast` which live on stacks.html but are
touched by shared layout JS behind an `if(!btn)return` guard. Template-parameterized IDs
(`id="field-{{.EnvVar}}"``field-SUBDOMAIN`, `agent-extra-{{.Path}}`, `migrate-target-{{.Path}}`,
`label-wrap-{{.Path}}`, etc.) and JS-created IDs (`dialog-go`, `dialog-type`, `confirm-go`,
`geo-edit-<app>`) are resolved by prefix/JS-string matching, not allowlisted.
## 7. Emoji gate + badge/confirm greps
- `python scripts/emoji_gate.py`**before: 8** (backups 📁/🔄, debug 🔄/🔒, deploy 📦/★, storage
📦×2); **after: 0.** Go `TestNoEmojiInTemplates` keeps it enforced.
- **confirm() grep (Scenario F):** zero native `confirm(`/`prompt(` in the four split templates
(the surviving `openConfirm`/`confirmEject`/`confirmWipe` are the pre-existing type-to-confirm
overlay, not native dialogs).
- **badge grep:** `.badge-lock` / `.lock-ico` deleted after confirming zero template/JS references.
Other `.badge*` classes (NAS health, orphaned, backups tables) remain in use and were NOT deleted
(rule §9.8: grep-zero before delete) — restyled flat by the D0 CSS.
## 8. Deployment + live validation (claude-in-chrome)
```
gitea.dooplex.hu/admin/felhom-controller:0.97.0 Up 9 seconds (healthy)
```
Checks performed on `https://felhom.demo-felhom.eu` (screenshots per page):
1. **All four pages + /storage render**, each with its own sections and the correct sidebar active
state (Tárhely main-nav item; Beállítások group → Rendszer / Értesítések / Biztonság és
hozzáférés). Sidebar shows 0.97.0.
2. **301 in the browser:** `GET /settings/storage/init` landed on `/storage/init`
(title "Új meghajtó inicializálása").
3. **Unified view (Scenario B):** DOM-asserted — 3 registry cards enriched in place (role tag
"Felhasználói adat" + durable-id `uuid:…`, 8 enrichment metarows total); **Rendszermeghajtók**
group visible with 3 read-only rows (local, local-lvm, felhom-pbs) and **0 action buttons**;
unregistered group hidden; warn note empty (agent reachable). Zero emoji in the rendered body.
4. **Overlay (Scenario F, live):** `storageDisconnect` opened the v2 `.confirm-overlay`
("Meghajtó leválasztása", verbatim text, Leválasztás/Mégsem) — NOT a native dialog — and
**Cancel** closed it cleanly (`#dialog-root` empty); the drive was untouched.
5. **End-to-end storage action (Scenario D, live):** renamed felhom-usb's label via the real pencil
form → redirected to `/storage?storage_msg=success&…`, the flash "Megnevezés módosítva: Teszt USB
D1" rendered on /storage and the card title updated → **renamed back** to the original
"Tárhely (felhom-usb)" (verified).
## 9. NOT yet live-validated
- **Agent-down degradation (Scenario C):** static/unit only — the agent must not be stopped on the
live host. The warn-note element + error path are asserted by `TestStorageAgentDownNote`.
- **Destructive storage ops through the moved UI** (eject/wipe/decommission/migrate): the endpoints
are unchanged and unit-tested, but exercising the relocated overlay paths on real data awaits a
supervised session.
## 10. Observations (structural, NOT acted on)
1. Each split page carries its own copy of the ~14-line overlay `openDialog` helper (system,
security, storage) — intentional per spec §2.1 (no shared JS bundle). A future shared static JS
asset would DRY this if the no-bundle constraint is lifted.
2. `storage.html` is still large (~700 lines) — it absorbed the full drive registry, NAS, migrate,
and unified-view JS. Splitting the NAS-add form into a partial is a candidate for a later pass.
3. `.badge*` markup persists on secondary pages (backups tables, NAS health, orphaned) — a full
tag/metarow migration there is D2 territory.
4. ~50 inline `style="…"` attributes remain across the split pages (carried verbatim from the
monolith); reducible where a v2 class now covers them.
5. The unified view enriches only **connected** user-data registry cards; a disconnected/decommissioned
registry card is not agent-joined (it has no live mount) — correct today, but if the agent ever
reports a re-appeared device the card won't auto-enrich until reload.
- Storage flashes still land on `/storage` (all storage POST actions are drive actions; NAS uses
fetch + in-page reload).
- The prior TASK-D1 report (v0.97.0, four-page settings split, unified drive view, overlay
migration, red-proofs and gate outputs) is preserved in CHANGELOG v0.97.0 and CONTEXT.md.
+1 -1
View File
@@ -113,7 +113,7 @@ backups, monitoring and notifications. All Proxmox/disk operations are delegated
- **Page IA (v0.97.0, TASK-D1)** — the settings monolith is split into four pages, each with its own
data builder (`systemPageData`/`storagePageData`/`notificationsPageData`/`securityPageData`, sharing
`settingsBaseData`) and template. Routes: `/settings` (Rendszer), `/settings/notifications`
(GET→page, POST→save on the same path), `/settings/security`, and `/storage` (main-nav **Tárhely**).
(GET→page, POST→save on the same path), `/settings/security`, `/storage` (main-nav **Tárhely** — Meghajtók), and `/storage/network` (Hálózati tárhely / NAS; v0.98.0 split — nested sub-links under Tárhely).
The enrollment wizards live at `/storage/{init,attach}`; `/settings/storage/{init,attach}` **301**
to them; all storage action successes redirect to `/storage?storage_msg=…`. `/storage` shows a
**unified drive view**: server-rendered registry cards enriched in place from the agent `/api/disks`