94 lines
6.9 KiB
Markdown
94 lines
6.9 KiB
Markdown
# REPORT — v0.166.0: mobile nav drawer + sidebar cleanup + versioned logo/favicon URLs
|
||
|
||
**Date:** 2026-07-24 · **Deployed & verified live on guest 9201.**
|
||
|
||
## 1. Confirmed baselines used
|
||
| Repo | `main` @ hash (start) | Version | → |
|
||
|------|------------------------|---------|---|
|
||
| felhom-controller | `1fd070615db91658df85438f760cb5ed61832d7e` | v0.165.1 | v0.166.0 |
|
||
| felhom.eu (asset source, read-only) | live `main` = `be9edb443cab1d2581fa022537e7113f45c3fd92` | — | — (unchanged by this task) |
|
||
|
||
felhom.eu asset commit **consumed: NONE** — the outlined asset was never pushed (see §2 below).
|
||
|
||
## 2. §3a precondition gate — Part 4 GATED OUT
|
||
Fetched `felhom.eu:website/assets/logo.svg` from live Gitea `main` (`be9edb44`, confirmed via
|
||
`git ls-remote`): **2 `<text` + 7 `font-family`** occurrences. The text-outlined master is not yet
|
||
pushed → **Part 4 (logo-constant swap + favicon `<text>` cleanup) was NOT performed.** No CLI
|
||
text-to-path conversion was attempted (glyph fidelity is Viktor's Inkscape responsibility). Parts 1–3
|
||
shipped independently as specified. When Viktor pushes the outlined asset, Part 4 ships as a follow-up
|
||
(swap `FelhomLogoSVG`, clean `FelhomFaviconSVG`, add the `TestLogoSVG_NoLiveText` constant test).
|
||
|
||
## 3. Files modified
|
||
- `controller/internal/web/templates/layout.html` — `no-js` html class + early swap script; sticky
|
||
`.mobile-topbar` (logo→`/`, `.nav-burger` w/ aria); `.nav-backdrop` (hidden); `id="sidebar"`;
|
||
drawer JS (burger/backdrop/Escape); removed `.customer-name` span; `?v=` on favicon + sidebar logo.
|
||
- `controller/internal/web/templates/style.css` — deleted the `.nav-links` strip from the 768px block;
|
||
added desktop-default hidden `.mobile-topbar`/`.nav-backdrop`/`.nav-burger`; mobile drawer + no-JS
|
||
fallback + `body.nav-open`; reduced-motion rule; removed dead `.customer-name` rule.
|
||
- `controller/internal/web/templates/login.html` — `?v={{.Version}}` on the login logo `<img>`.
|
||
- `controller/internal/web/templates/icons.html` — new `#i-menu` (lucide "menu", matching stroke).
|
||
- `controller/internal/web/auth.go` — `renderLogin` now passes `"Version"` (for the login logo `?v=`).
|
||
- `controller/internal/web/mobile_nav_test.go` — **new**, 5 tests.
|
||
- `CHANGELOG.md`, `CONTEXT.md` — updated; `REPORT.md` — this file.
|
||
|
||
## 4. Commits pushed to `main`
|
||
- `bf44216` — v0.166.0 implementation (code + tests + CHANGELOG + CONTEXT).
|
||
- REPORT commit — this REPORT.md (follow-up commit, matching the established pattern).
|
||
|
||
## 5. Tests + RED proofs
|
||
**Test count:** web package `--- PASS` count 278 → **283** (5 new). Full repo: 25 packages pass, 0 fail.
|
||
|
||
Phase-1 RED runs (recorded against pre-change source):
|
||
| Test | RED (pre-change) | GREEN (post-change) |
|
||
|------|------------------|---------------------|
|
||
| `TestMobileCSS_StripRemovedDrawerPresent` (Group B) | FAIL — 768px block still had `overflow-x` + `.nav-links{}`; no `.js .sidebar`/`translateX`/`.no-js .sidebar`/`body.nav-open`/`.mobile-topbar` | PASS |
|
||
| `TestMobileNav_TopbarAndDrawerMarkup` (Group A) | FAIL — no `no-js`, no topbar/burger/backdrop, no `aria-controls`/`id=sidebar` | PASS |
|
||
| `TestSidebar_NoCustomerName` (Group D) | FAIL — `customer-name` still rendered | PASS |
|
||
| `TestLayout_VersionedAssetURLs` (Group E) | FAIL — logo/favicon URLs lacked `?v=` | PASS |
|
||
| `TestLogoSVG_NoLiveText` (Group E, Part-4 gated) | FAIL — `FelhomLogoSVG`/`FelhomFaviconSVG` contain `<text`+`font-family` | **not committed** — ships with Part 4 |
|
||
| `TestLogin_CustomerNameKept` (Group D) | PASS pre-change (login already keeps the name) — its red-proof is the sidebar-removal test | PASS |
|
||
|
||
Companion red-proofs (documented mutations that flip a committed test to FAIL):
|
||
- Re-add `<span class="customer-name">` → `TestSidebar_NoCustomerName` FAILS.
|
||
- Drop `aria-controls` from the burger → `TestMobileNav_TopbarAndDrawerMarkup` FAILS.
|
||
- Restore the `.nav-links{display:flex;overflow-x}` strip → `TestMobileCSS_StripRemovedDrawerPresent` FAILS.
|
||
- Remove `?v=` from the logo/favicon refs → `TestLayout_VersionedAssetURLs` FAILS.
|
||
|
||
`nav_accordion_test.go` invariants pass **unchanged** (not edited). Green gate
|
||
`go build ./... && go vet ./... && go test ./...` — all clean. Mechanical gates
|
||
(`template_id_gate`, `emoji_gate`, `mojibake_gate`, `native_confirm_gate`) all OK.
|
||
|
||
## 6. Deploy + live endpoint validation (guest 9201)
|
||
- Built `gitea.dooplex.hu/admin/felhom-controller:0.166.0` (145M) from the clean pushed tree
|
||
(`git status` empty, HEAD == origin/main), pushed, deployed via the bootstrap service.
|
||
- `docker ps`: `gitea.dooplex.hu/admin/felhom-controller:0.166.0 Up (healthy)`; logs show
|
||
`Event pushed: controller_started (info) — Controller elindult (0.166.0)`, settle-gate GO.
|
||
- Method: endpoint-level (`curl` in-guest to the container IP `172.17.0.2:8080` with
|
||
`Host: felhom.demo-felhom.eu`; login 302 with the stored password → authed session cookie).
|
||
|
||
| Surface | Assertion | Result |
|
||
|---------|-----------|--------|
|
||
| `/static/style.css?v=0.166.0` | `.mobile-topbar`, `.js .sidebar`, `translateX(-100%)`, `.no-js .sidebar`, `body.nav-open` present; the 3 residual `overflow-x` are non-nav (tables/code) | ✅ |
|
||
| `/login` (no auth) | `felhom-logo.svg?v=` + `login-subtitle` (CustomerName kept) | ✅ |
|
||
| `/` (authed) | topbar / `nav-burger` / `aria-controls="sidebar"` / `id="sidebar"` / `nav-backdrop hidden` / `no-js`+swap script / `logo.svg?v=` (×2) / `favicon.svg?v=` present; **`customer-name` absent (0)** | ✅ |
|
||
| `/storage` (authed) | both accordion sub-items render (`Meghajtók` + `Hálózati tárhely`), `nav-group-storage` present, `customer-name` absent | ✅ |
|
||
| `/static/felhom-logo.svg` | still contains 4 `<text` — confirms Part 4 gated (constants unchanged) | ✅ (expected) |
|
||
|
||
## 7. NOT yet live-validated — awaiting Viktor's visual acceptance
|
||
- **Android/mobile drawer interaction** (burger opens/closes, backdrop tap, Escape, body scroll-lock,
|
||
accordion inside the drawer, banners not obscured by the sticky top bar).
|
||
- **Desktop >768px pixel-parity** vs v0.165.1 (no burger, fixed 240px sidebar, hover/active states).
|
||
- **Conscious omission:** the drawer has no full focus-trap — `aria-expanded`/`aria-controls` only.
|
||
Page navigations reset drawer state, so a trap would add complexity for a state that never persists.
|
||
|
||
## 8. Logo viewBox
|
||
Part 4 gated out → `FelhomLogoSVG`/`FelhomFaviconSVG` **unchanged**; no viewBox delta to record. The
|
||
outlined swap must preserve the current logo `viewBox` (record old-vs-new when Part 4 ships).
|
||
|
||
## 9. Observations (out of scope — documented only, not acted on)
|
||
- The **website and hub still serve their own non-outlined logo copies** (`felhom.eu/website/assets/logo.svg`
|
||
consumers, the hub's `felhom-logo.svg`, `logo_favicon*.svg`) — once Viktor's outlined master lands,
|
||
propagating it there is a separate follow-up.
|
||
- `login.html`'s **stylesheet** link is still unversioned (`/static/style.css`, no `?v=`) — the task
|
||
scoped only the login *logo* `<img>`; the login page's CSS cache-bust is a minor follow-up.
|