Logo references dangle on every surface except the IdP — nothing materialises LogoSource for portal/dashboard/nextcloud/mattermost #356

Closed
opened 2026-08-09 16:09:24 +00:00 by ben · 3 comments
Owner

DDR 0147 landed the logo BYTES for the kanidm push at the fixed ourcloud/brand/idp-login/logo. Everything else still consumes logoVariants(LogoSource) reference strings (tokens.css --oc-logo url(brand/<file>), nextcloud logo=, mattermost mono CustomBrandLogo=) that no step materialises — the refs dangle exactly as before (DDR 0124's gap, now closed only for idp-login). Also: LogoSource is the RAW uploaded filename (brand/${file.name} — spaces, macrons, ../ all pass) used as a path in CSS url(), Nix literals and shell words; sanitise or replace with fixed-path conventions when materialising. And mono/favicon variants (<base>-mono.svg, <base>-favicon.png) are asserted by the kit but no upload ever produces them.

Relates: DDR 0147's follow-up — the dashboard wearing the uploaded logo (NavChrome brand bar currently letter-mark only) belongs to this slice too; the S3 control-panel mini was made honest to today's chrome and should upgrade WITH the chrome.

DDR 0147 landed the logo BYTES for the kanidm push at the fixed `ourcloud/brand/idp-login/logo`. Everything else still consumes `logoVariants(LogoSource)` reference strings (`tokens.css --oc-logo url(brand/<file>)`, nextcloud `logo=`, mattermost mono `CustomBrandLogo=`) that no step materialises — the refs dangle exactly as before (DDR 0124's gap, now closed only for idp-login). Also: `LogoSource` is the RAW uploaded filename (`brand/${file.name}` — spaces, macrons, `../` all pass) used as a path in CSS url(), Nix literals and shell words; sanitise or replace with fixed-path conventions when materialising. And mono/favicon variants (`<base>-mono.svg`, `<base>-favicon.png`) are asserted by the kit but no upload ever produces them. Relates: DDR 0147's follow-up — the dashboard wearing the uploaded logo (NavChrome brand bar currently letter-mark only) belongs to this slice too; the S3 control-panel mini was made honest to today's chrome and should upgrade WITH the chrome.
Author
Owner

This was generated by AI during triage.

Triage Notes

What we've established so far:

  • The core problem is real and confirmed independent of "DDR 0147": logoVariants(AssetRef) is consumed by nextcloud's logo field and mattermost's CustomBrandLogo field, but no code path ever writes the logo image bytes those references point at — the compiled-artifacts writer only lands CSS/conf, never the logo image files themselves. logoSource.value = \brand/${file.name}`is indeed the raw, unsanitized uploaded filename, used downstream in CSSurl(), Nix literals, and shell words. The -mono.svg/-favicon.png` variant convention is asserted at compile time but nothing produces those files. All confirmed by reading the code — this part of the issue is accurate and well-specified.
  • The title's exception — "dangle on every surface except the IdP" — does not hold against the current codebase. The IdP logo push does not exist either: STATUS.md states plainly "the logo half (set-image) stays blocked on the DDR 0124 logo-bytes gap," and the IdP brand module only carries the override-CSS path (the DDR 0145 skin) — there is no kanidm logo-bytes push at ourcloud/brand/idp-login/logo or anywhere else.
  • "DDR 0147" does not exist in this repo on any branch (same check as #357); STATUS.md calls 0147 a free/unminted number. So the claim "DDR 0147 landed the logo BYTES for the kanidm push" doesn't hold either.
  • Net effect: the real scope looks broader than stated — the IdP surface has the same unmaterialised-logo-bytes gap as portal/dashboard/nextcloud/mattermost, not a solved case that should be excluded. There's also no separate open ticket in this tracker tracking the IdP-side DDR 0124 logo-bytes gap on its own.

What we still need from you (@ben):

  • Is there a real DDR 0147 ruling (landing imminently, on a branch this checkout doesn't have) that actually closes the IdP logo-bytes gap? If so, point us at it so this issue's scope can correctly exclude the IdP.
  • If DDR 0147 isn't real yet: should this issue's scope widen to include materialising the IdP logo bytes too (the DDR 0124 gap), given there's no separate ticket tracking it? That changes the shape of the fix (one materialisation step feeding all five surfaces, IdP included, vs. four surfaces only).
> *This was generated by AI during triage.* ## Triage Notes **What we've established so far:** - The core problem is real and confirmed independent of "DDR 0147": `logoVariants(AssetRef)` is consumed by nextcloud's `logo` field and mattermost's `CustomBrandLogo` field, but no code path ever writes the logo image bytes those references point at — the compiled-artifacts writer only lands CSS/conf, never the logo image files themselves. `logoSource.value = \`brand/${file.name}\`` is indeed the raw, unsanitized uploaded filename, used downstream in CSS `url()`, Nix literals, and shell words. The `-mono.svg`/`-favicon.png` variant convention is asserted at compile time but nothing produces those files. All confirmed by reading the code — this part of the issue is accurate and well-specified. - The title's exception — "dangle on every surface **except the IdP**" — does not hold against the current codebase. The IdP logo push does not exist either: `STATUS.md` states plainly "the logo half (`set-image`) stays blocked on the DDR 0124 logo-bytes gap," and the IdP brand module only carries the override-CSS path (the DDR 0145 skin) — there is no kanidm logo-bytes push at `ourcloud/brand/idp-login/logo` or anywhere else. - "DDR 0147" does not exist in this repo on any branch (same check as #357); `STATUS.md` calls 0147 a free/unminted number. So the claim "DDR 0147 landed the logo BYTES for the kanidm push" doesn't hold either. - Net effect: the real scope looks **broader** than stated — the IdP surface has the same unmaterialised-logo-bytes gap as portal/dashboard/nextcloud/mattermost, not a solved case that should be excluded. There's also no separate open ticket in this tracker tracking the IdP-side DDR 0124 logo-bytes gap on its own. **What we still need from you (@ben):** - Is there a real DDR 0147 ruling (landing imminently, on a branch this checkout doesn't have) that actually closes the IdP logo-bytes gap? If so, point us at it so this issue's scope can correctly exclude the IdP. - If DDR 0147 isn't real yet: should this issue's scope widen to include materialising the IdP logo bytes too (the DDR 0124 gap), given there's no separate ticket tracking it? That changes the shape of the fix (one materialisation step feeding all five surfaces, IdP included, vs. four surfaces only).
Author
Owner

Ruled (Ben, 2026-08-09): yes — carry the logo to every surface. needs-info → ready-for-agent.

Materialisation follows DDR 0147's fixed-path precedent: the raw uploaded filename never becomes a path. Adopt a fixed per-surface object path + sidecar convention (as ourcloud/brand/idp-login/logo + logo.type did) for each consumer — portal tokens (--oc-logo), dashboard, Nextcloud logo=, Mattermost CustomBrandLogo= — and retire LogoSource-as-path everywhere (its raw brand/${file.name} never reaches CSS url(), Nix literals, or shell words).

**Ruled (Ben, 2026-08-09): yes — carry the logo to every surface.** `needs-info` → `ready-for-agent`. Materialisation follows **DDR 0147's fixed-path precedent**: the raw uploaded filename never becomes a path. Adopt a fixed per-surface object path + sidecar convention (as `ourcloud/brand/idp-login/logo` + `logo.type` did) for each consumer — portal tokens (`--oc-logo`), dashboard, Nextcloud `logo=`, Mattermost `CustomBrandLogo=` — and retire `LogoSource`-as-path everywhere (its raw `brand/${file.name}` never reaches CSS url(), Nix literals, or shell words).
Author
Owner

Fixed (materialisation half) in 09b1daa on main.

Following Ben's 2026-08-09 ruling, DDR 0147's fixed-path + sidecar precedent now extends to every logo-bearing surface, and LogoSource-as-path is retired:

  • brandkit.logoVariants() returns the fixed sibling object logo for full/mono/favicon — the raw uploaded filename (brand/${file.name}: spaces, macrons, ../) never becomes a path in CSS url(), a Nix literal, or a shell word. The phantom -mono.svg/-favicon.png derivations (bytes no upload produced) are retired; mono wears the full-colour mark (#357).
  • New brandkit.SurfaceLogoObjectPath/SurfaceLogoTypePath/LogoBearingSurfaces + clan.WriteSurfaceLogos land the uploaded bytes + a logo.type sidecar beside each logo-bearing surface's compiled artifact (ourcloud/brand/<surface>/logo), one idempotent commit, half-a-logo refused. idp-login is excluded (no logo token in its capability — its logo stays on the runtime domain set-image push).
  • founding landBrandLogo carries the same decoded bytes to the branded surfaces on both legs (deploy + private path).
  • App compilePortalCss mirrors the seam (--oc-logo: url("logo")).

So --oc-logo, Nextcloud logo=, and Mattermost CustomBrandLogo= reference the bare sibling object and the deploy materialises real bytes behind them — no more dangling refs.

Evidence: test-first seams — internal/brandkit/logoobject_test.go (fixed sibling refs, no raw-source leak, idp excluded), internal/clan/surfacelogos_test.go (bytes+sidecar, idempotent, refusals), internal/founding/logo_internal_test.go (carried to portal/dashboard, idp excluded). Golden corpus regenerated. Full go test ./... green (incl. the pre-push gate), go vet + golangci-lint clean, app/dashboard/ui-kit vitest green. DDR 0147 known-debt note + STATUS.md updated.

Remaining follow-ups (out of this slice, noted in DDR 0147 + STATUS):

  1. Render-side consumption — the Nextcloud/Mattermost oneshots must resolve the bare sibling to an absolute path for occ/mmctl, and the portal/dashboard static serving must set the content type from the logo.type sidecar.
  2. The dashboard NavChrome brand bar wearing the uploaded mark (vs the letter-mark) needs a runtime has-logo signal on the details API — a separate vertical (the ruling's four consumers, all Go-side compiled artifacts, are done here).
Fixed (materialisation half) in `09b1daa` on `main`. Following Ben's 2026-08-09 ruling, DDR 0147's fixed-path + sidecar precedent now extends to every logo-bearing surface, and `LogoSource`-as-path is retired: - `brandkit.logoVariants()` returns the fixed sibling object `logo` for full/mono/favicon — the raw uploaded filename (`brand/${file.name}`: spaces, macrons, `../`) never becomes a path in CSS url(), a Nix literal, or a shell word. The phantom `-mono.svg`/`-favicon.png` derivations (bytes no upload produced) are retired; mono wears the full-colour mark (#357). - New `brandkit.SurfaceLogoObjectPath`/`SurfaceLogoTypePath`/`LogoBearingSurfaces` + `clan.WriteSurfaceLogos` land the uploaded bytes + a `logo.type` sidecar beside each logo-bearing surface's compiled artifact (`ourcloud/brand/<surface>/logo`), one idempotent commit, half-a-logo refused. `idp-login` is excluded (no logo token in its capability — its logo stays on the runtime `domain set-image` push). - founding `landBrandLogo` carries the same decoded bytes to the branded surfaces on both legs (deploy + private path). - App `compilePortalCss` mirrors the seam (`--oc-logo: url("logo")`). So `--oc-logo`, Nextcloud `logo=`, and Mattermost `CustomBrandLogo=` reference the bare sibling object and the deploy materialises real bytes behind them — no more dangling refs. **Evidence:** test-first seams — `internal/brandkit/logoobject_test.go` (fixed sibling refs, no raw-source leak, idp excluded), `internal/clan/surfacelogos_test.go` (bytes+sidecar, idempotent, refusals), `internal/founding/logo_internal_test.go` (carried to portal/dashboard, idp excluded). Golden corpus regenerated. Full `go test ./...` green (incl. the pre-push gate), `go vet` + `golangci-lint` clean, app/dashboard/ui-kit vitest green. DDR 0147 known-debt note + STATUS.md updated. **Remaining follow-ups (out of this slice, noted in DDR 0147 + STATUS):** 1. Render-side consumption — the Nextcloud/Mattermost oneshots must resolve the bare sibling to an absolute path for `occ`/`mmctl`, and the portal/dashboard static serving must set the content type from the `logo.type` sidecar. 2. The dashboard NavChrome brand bar wearing the uploaded mark (vs the letter-mark) needs a runtime has-logo signal on the details API — a separate vertical (the ruling's four consumers, all Go-side compiled artifacts, are done here).
ben closed this issue 2026-08-09 18:37:08 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#356
No description provided.