REPORT: v0.163.1 launcher polish — live-validated on 9201 (monogram hidden, placeholder on backups_apps/stacks)

This commit is contained in:
2026-07-24 10:17:43 +02:00
parent 2c80868c63
commit 77956d8df2
+62 -100
View File
@@ -1,133 +1,95 @@
# REPORT — Indítópult (app launcher) + universal app placeholder icon (v0.163.0) # REPORT — Launcher polish: monogram reveal-on-failure + placeholder on every icon surface (v0.163.1)
**Date:** 2026-07-24 · **Repo:** felhom-controller · **Target:** v0.163.0 · No agent coupling; MinAgent unchanged. **Date:** 2026-07-24 · **Repo:** felhom-controller · **Target:** v0.163.1 · No agent coupling; MinAgent unchanged.
## 1. Baseline used ## 1. Baseline used
- felhom-controller `main` @ `a71cc583272a`, version `v0.162.0`**matched §1 exactly** (clean tree, - felhom-controller `main` @ `7a53cb4`, version `v0.163.0`**matched exactly** (clean tree,
HEAD == origin/main, CHANGELOG top = "v0.162.0 — R-71(a) settle-gate"). No drift. HEAD == origin/main, CHANGELOG top = v0.163.0). No drift.
## 2. Files created / modified ## 2. Files modified
**Backend** **Templates / CSS**
- `controller/internal/stacks/metadata.go` — new `Metadata.BrandColor` (`brand_color`, omitempty). - `controller/internal/web/templates/launcher.html` — both tile branches' `onerror` final step now
- `controller/internal/web/funcmap.go` — new `tileColor` (returns `template.CSS`) + `initial` adds `this.parentElement.classList.add('launch-tile--noimg')`.
(rune-safe monogram) + `hexColorRe`; both registered in the funcmap. - `controller/internal/web/templates/style.css``.launch-mono { display: none; inset:0; … }` +
- `controller/internal/web/handlers.go` — extracted `Server.subdomainMap` (replaced BOTH inline `.launch-tile--noimg .launch-mono { display: flex; }` (monogram = failure-only).
copies in dashboard + stacks handlers); new `LauncherApp` type, `buildLauncherApps`, - `controller/internal/web/templates/backups_apps.html` — the allowlisted aligned row's icon now
`launcherHandler`, `controllerStackName` const. uses the canonical `data-fallback="/static/app-placeholder.svg"` + 3-step chain; header comment updated.
- `controller/internal/web/inframeta.go` — new `AppPlaceholderSVG` constant. - `controller/internal/web/templates/stacks.html``data-fallback` always present:
- `controller/internal/web/server.go``/launcher` route; `/static/app-placeholder.svg` route. `{{if $im}}/static/infra-logo.svg{{else}}/static/app-placeholder.svg{{end}}`.
- `controller/internal/web/templates/app_info.html` — hero logo aligned to the 3-step chain +
**Templates / nav / CSS** placeholder; **screenshots untouched** (still `onerror="this.style.display='none'"`).
- `controller/internal/web/templates/launcher.html`NEW page template. - `controller/internal/web/templates/deploy.html`deploy logo aligned; kept its `.LogoURL`/`.LogoPNGURL` data source.
- `controller/internal/web/templates/app_row.html``data-fallback` now defaults to
`/static/app-placeholder.svg`; header comment updated.
- `controller/internal/web/templates/icons.html` — new `#i-rocket` sprite (nav glyph — `layout-grid`
is already the Vezérlőpult icon, so a distinct glyph was added rather than reused).
- `controller/internal/web/templates/layout.html` — Indítópult as the FIRST nav `<li>`, above Vezérlőpult.
- `controller/internal/web/templates/style.css``launch-grid` / `launch-cell` / `launch-tile`
(+ `--off`) / `launch-mono` / `launch-logo` / `launch-name` / `empty-state-link`, tokens only.
**Tests** **Tests**
- `controller/internal/web/launcher_test.go` — NEW (8 test functions). - `controller/internal/web/launcher_polish_test.go` — NEW (5 test functions).
- `controller/internal/web/app_row_test.go` — 2 test functions added (Group D).
**Docs** **Docs**: `CHANGELOG.md` (v0.163.1), `CONTEXT.md` (rule recorded), `REPORT.md` (this file).
- `CHANGELOG.md` (v0.163.0 entry), `REPORT.md` (this file), `CONTEXT.md` (design rulings),
`controller/README.md` (launcher + placeholder sections). **Gate script:** `app_row_dedup_gate.py` does NOT pin the `onerror` chain (only `app-row-icon`
- felhom.eu (separate repo): `documentation/architecture/00-capability-map.md` (launcher row, presence + forbidden structures), so no gate-script edit was needed; all three gates stay green.
IMPLEMENTED), `documentation/backlog/ROADMAP.md` (R-15 launcher-as-member-landing coupling note +
new R-72 "curate brand_color for top catalog apps").
## 3. Commits pushed to `main` ## 3. Commits pushed to `main`
- `987e915` — Indítópult launcher + universal app placeholder (code + CHANGELOG + CONTEXT + README). - `2c80868` — templates + CSS + tests + CHANGELOG + CONTEXT.
- `<REPORT commit>` — this REPORT.md (see git log). - `<REPORT commit>` — this REPORT.md.
- felhom.eu: `<docs commit>` — capability-map + ROADMAP (explicit paths only; shared worktree).
## 4. Tests + red-proofs ## 4. Tests + red-proofs
All groups green. **4 red-proofs applied → observed FAIL → restored → re-green** (tree clean after each): Five new tests, all green. **2 red-proofs applied → observed FAIL → restored → re-green:**
| # | Group | Mutation | Test | Observed FAIL | | # | Group | Mutation | Test | Observed FAIL |
|---|-------|----------|------|---------------| |---|-------|----------|------|---------------|
| 1 | A | dropped the `if !ok \|\| sd == ""` subdomain filter in `buildLauncherApps` | `TestBuildLauncherApps_SelectionAndOrder` | `apps = [filebrowser mealie paperless-ngx worker-app]`, want without worker-app | | A | launcher | removed `classList.add('launch-tile--noimg')` from both `onerror` else branches | `TestLauncher_MonogramRevealOnFailure` | reveal-hook count 0 (want 2) — the monogram would never re-appear for a logo-less tile |
| 2 | B | forced the launcher `<a>` branch (`{{if isOperational}}``{{if true}}`) | `TestLauncherTemplate_StoppedTileGreyedNoLink` | stopped tile became a link to `media.demo-felhom.eu`; greyed classes absent | | B | placeholder | reverted `backups_apps.html` to the old 2-step `onerror` chain | `TestBackupsApps_IconPlaceholder` | canonical 3-step chain absent → logo-less row dead-ends hidden |
| 3 | C | `tileColor` returns `brand` unvalidated (`if brand != ""`) | `TestLauncherTemplate_TileColorSafety` | injection payload reached the rendered style; hsl-fallback assertion failed |
| 4 | D | reverted `app_row.html` `data-fallback` to `{{with .FallbackIcon}}…{{end}}` | `TestAppRow_DefaultPlaceholderFallback` | logo-less row had no `data-fallback` attribute |
**New test functions (10):** Group A `TestBuildLauncherApps_SelectionAndOrder`, **New test functions (5):** `TestLauncher_MonogramRevealOnFailure` (Group A),
`TestLauncherTemplate_OpenableTiles`; Group B `TestLauncherTemplate_StoppedTileGreyedNoLink`; `TestBackupsApps_IconPlaceholder`, `TestStacks_IconPlaceholderAndInfra`,
Group C `TestLauncherTemplate_TileColorSafety`, `TestTileColor`, `TestInitial`; Group E `TestAppInfo_HeroPlaceholder_ScreenshotsUntouched`, `TestDeploy_LogoPlaceholder` (Group B).
`TestLauncherTemplate_EmptyState`; wiring `TestLauncherRoute_EndToEnd`; Group D
`TestAppRow_DefaultPlaceholderFallback`, `TestAppPlaceholderRoute`.
Note on `tileColor` returning `template.CSS`: html/template's CSS value filter mangles a legitimate Two test-only fixes made while writing them (not code bugs): the reveal class legitimately appears
`hsl()` from a func pipeline to `ZgotmplZ` (verified live). The value is trusted-by-construction (the inside the `onerror` JS string, so Group A asserts its count == 2 (both are `classList.add` hooks,
brand is validated against `hexColorRe` in Go; the hsl is fully computed by us), so `template.CSS` is none in a `class=` attribute); and `{{.LogoPNGURL}}` is JS-escaped (`\/…`) inside `onerror`, so the
correct — and red-proof #3 shows exactly why the Go-side validation is load-bearing (an unvalidated deploy test asserts the slash-free filename `docmost-logo.png`.
brand as `template.CSS` injects verbatim).
## 5. Test count & suite ## 5. Test count & suite
- `go build ./... && go vet ./... && go test ./...`**all green, 25 packages OK, 0 FAIL/panic.** - `go build ./... && go vet ./... && go test ./...`**all green, 0 FAIL/panic.**
- Gates green: `app_row_dedup_gate.py`, `template_id_gate.py`, `emoji_gate.py`. - Gates green: `app_row_dedup_gate.py`, `template_id_gate.py`, `emoji_gate.py`.
- Web package: 335 `=== RUN` entries after (+10 top-level funcs + subtests). - Web package: +5 test functions vs v0.163.0.
## 6. Deployed version + verification ## 6. Deployed version + verification
- Built + pushed `gitea.dooplex.hu/admin/felhom-controller:0.163.0` (145M) from the clean pushed tree - Built + pushed `gitea.dooplex.hu/admin/felhom-controller:0.163.1` (145M) from the clean pushed
(`4aa7d41`, HEAD == origin/main). `build.sh 0.163.0 --push` → "Build complete". tree (`2c80868`, HEAD == origin/main); deployed to guest 9201 via the bootstrap flow.
- Deployed to guest 9201 via the bootstrap flow (docker pull`/etc/felhom-controller-image` - Live: `docker ps``felhom-controller:0.163.1 Up (healthy)`; log
`systemctl restart felhom-controller-bootstrap.service`). Live: `controller_started (info) — Controller elindult (0.163.1)` + `settle-gate: GO … we are 0.163.1`.
```
docker ps: gitea.dooplex.hu/admin/felhom-controller:0.163.0 Up (healthy)
logs: [INFO] Event pushed: controller_started (info) — Controller elindult (0.163.0)
[INFO] [offsite-apply] settle-gate: GO — at/above floor 0.156.0 (we are 0.163.0)
```
## 7. Live validation ## 7. Live validation
Method: **endpoint-level** (browser automation / `claude-in-chrome` is not available on DooPlex), Method: **endpoint-level, authenticated** (real session cookie via `POST /login`; browser automation
run with `curl` inside the `felhom-controller` container on guest 9201 (the controller listens in its unavailable on DooPlex), `curl` inside the `felhom-controller` container on guest 9201. The 9201 box
own container netns, not the guest's 127.0.0.1). Authenticated with a real session cookie (`POST now has 5 launcher apps incl. Docmost (which has no logo asset — the exact reported case).
/login` → **302**) — the full server-side pipeline, no state hand-set.
- `GET /static/app-placeholder.svg` → **200, `Content-Type: image/svg+xml`, 359 bytes**, body = 1. **Launcher monogram (check 1).** On the live `/launcher`: `launch-tile--noimg` appears **5 times,
the `<svg … stroke="#94A6BF" …>` app-grid glyph. The new asset serves live (Group D on the real box). all 5 inside `onerror` `classList.add(...)` hooks, 0 in any `class=` attribute** — i.e. no tile
- `GET /launcher` (unauthenticated) → **302 → `/login?next=%2Flauncher`** — correctly behind statically carries the reveal class, so no white letter bleeds through a loaded transparent glyph.
`RequireAuth`, `next=` round-trips the launcher path. 5 tiles / 5 monogram spans (4 operational + 1 stopped — both branches exercised live). Served
- `GET /launcher` (**authenticated**, 34,630 bytes) — the real page: `style.css` carries `.launch-mono { display: none; inset:0; … }` and
- nav: `href="/launcher" class="active"` — Indítópult is the first item and marked active. `.launch-tile--noimg .launch-mono { display: flex; }`.
- **one `launch-grid`, 4 tiles** (4 `launch-cell`, 4 `launch-tile`, 4 monograms, **0 greyed** — all 2. **Placeholder on Biztonsági mentés → Alkalmazások (check 2).** The live `/backups/apps` page's
apps running today): **BookStack → `https://wiki.demo-felhom.eu`**, **Calibre-Web Automated → **Docmost row now carries `data-fallback="/static/app-placeholder.svg"`** and the canonical 3-step
`https://books.demo-felhom.eu`**, **Filebrowser → `https://files.demo-felhom.eu`**, **Immich → chain (4 rows total with the placeholder default) — the reported hidden-icon dead-end is gone.
`https://photos.demo-felhom.eu`** — all 4 `target="_blank" rel="noopener"`. 3. **No regression on Alkalmazások (check 3).** The live `/stacks` page: **all 56 `stack-logo-lg`
- deterministic per-app tile colors: `hsl(112,…)`, `hsl(274,…)`, `hsl(217,…)`, `hsl(18,…)` — each a imgs still render** with a fallback — 52 default to `/static/app-placeholder.svg`, 4 infra cards
distinct hue, S/L fixed. No `brand_color` is set on any app yet (so all four are hash colors). keep `/static/infra-logo.svg`. Every card keeps its logo source; no logo vanished.
- **Filebrowser appears** — the protected stack whose subdomain comes from `protectedStackSubdomains`
(`filebrowser → files`), confirming the protected-with-subdomain inclusion; the controller stack
does NOT appear (excluded by name); no subdomain-less app appears.
The one path NOT exercised by today's live data is the **greyed stopped tile** (all four deployed apps ## 8. Observations (not acted on)
are running) — covered by `TestLauncherTemplate_StoppedTileGreyedNoLink` + its red-proof.
## 8. Not yet live-validated (expected residual) - The four aligned copies (`backups_apps` aligned row, `stacks`, `app_info` hero, `deploy`) share the
same `onerror` grammar but differ in class/size/data-source, so consolidating them into one partial
- **Human tile click-through in a real browser** (I verified the tile `<a href>` targets end-to-end is a possible future cleanup — deliberately NOT done here (backups_apps is gate-exempted because it
via curl, but not a rendered click) — HUMAN, browser automation unavailable on DooPlex. owns its collapse toggle; the task scoped this to chain-grammar alignment only).
- **Greyed stopped tile on live data** — no app is stopped on 9201 right now; covered by the render - The launcher now has a live stopped tile (a greyed app on 9201), so the stopped-branch reveal hook
test + red-proof (Group B). is exercised on real data, not only in the render test.
- **Placeholder on a real list surface** — every deployed catalog app on 9201 has a logo, so the
placeholder does not appear on a live list today; covered by `TestAppRow_DefaultPlaceholderFallback`
+ the live `GET /static/app-placeholder.svg` (200, `image/svg+xml`, verified above). Stated per §15.8.
## 9. Observations (not acted on)
- Tile S/L constants (`hsl(H, 45%, 38%)`) are a first pick; worth eyeballing live and tuning while
keeping S/L fixed (only H per app). Not changed.
- `brand_color` curation for top catalog apps is parked as ROADMAP R-72 (catalog-only).
- `protectedStackSubdomains` currently maps only `filebrowser → files`, so FileBrowser is the one
protected stack eligible for the launcher.