feat(branding): the workspace's CI colour frames every page, its logo in the sidebar #1087

Merged
sharang merged 2 commits from feat/customer-branding into main 2026-12-01 11:56:23 +00:00
Owner

Closes #1086. This is Prüfwerk's part of tenant-registry#155 (Sharang, 30.11.). Mockup: https://claude.ai/artifact/N2mSgu4GaJ4CuRHPfzm9Bh ("Rahmen rundum", approved).

The registry derives each workspace's branding from the website of its signup domain. Prüfwerk only shows it:

  • Frame: the CI colour, exactly as given, as a 6 px frame around every page (--brand-frame, a fixed overlay that never takes a click).
  • Sidebar: the customer logo, or initials on the CI colour, with the workspace name and "Prüfwerk", in place of the Breakpilot wordmark; "Prüfwerk von Breakpilot" at the foot.
  • Notice: "Logo und Farbe von übernommen – Passt / Ändern", for the workspace's admins only (Owner, IT admin; never support or an API key). "Passt" hides it at once and records it in the registry; "Ändern" opens the portal.
  • Unchanged: our own CI. Buttons, links and the menu keep --accent, and severities and status keep their colours.

Contract, agreed with the platform session:

  • branding {color, logo_etag, notice, domain, name} on the entitlement check, which is already cached ≤ 60 s.
  • GET /v1/tenants/{id}/branding/logo with ETag, 304 and 404.
  • POST /v1/tenants/{id}/branding/ack with {"user_id"}; 403 not_admin.

Agent:

  • GET /api/v1/branding;
  • GET /api/v1/branding/logo (PNG; kept per tenant until the ETag changes, then fetched with If-None-Match; at most 1 MiB);
  • POST /api/v1/branding/ack.
  • Only a #rrggbb colour and a hex ETag are used. Anything else counts as no frame and no logo.

Dashboard: the frame, the sidebar mark and the notice, plus the /api/branding/logo proxy.

Safe before the registry ships: without branding, or with no registry, nothing changes. So this PR can merge before the registry part lands.

Tests:

  • the notice only for admins, never for support;
  • a malformed colour or ETag is ignored;
  • the logo is fetched once per ETag (304 from cache), and a missing logo is none;
  • ack is refused for a non-admin;
  • the initials, and the text colour on the CI colour;
  • clippy clean (agent, and dashboard server and web), fmt clean.

Before merging: Sharang's look at the admin notice (board 1), and a screen-by-screen check against the mockup with a fake registry.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

Closes #1086. This is Prüfwerk's part of tenant-registry#155 (Sharang, 30.11.). Mockup: https://claude.ai/artifact/N2mSgu4GaJ4CuRHPfzm9Bh ("Rahmen rundum", approved). The registry derives each workspace's branding from the website of its signup domain. Prüfwerk only shows it: - **Frame:** the CI colour, exactly as given, as a 6 px frame around every page (`--brand-frame`, a fixed overlay that never takes a click). - **Sidebar:** the customer logo, or initials on the CI colour, with the workspace name and "Prüfwerk", in place of the Breakpilot wordmark; "Prüfwerk von Breakpilot" at the foot. - **Notice:** "Logo und Farbe von <domain> übernommen – Passt / Ändern", for the workspace's admins only (Owner, IT admin; never support or an API key). "Passt" hides it at once and records it in the registry; "Ändern" opens the portal. - **Unchanged:** our own CI. Buttons, links and the menu keep `--accent`, and severities and status keep their colours. **Contract, agreed with the platform session:** - `branding {color, logo_etag, notice, domain, name}` on the entitlement check, which is already cached ≤ 60 s. - `GET /v1/tenants/{id}/branding/logo` with ETag, 304 and 404. - `POST /v1/tenants/{id}/branding/ack` with `{"user_id"}`; 403 `not_admin`. **Agent:** - `GET /api/v1/branding`; - `GET /api/v1/branding/logo` (PNG; kept per tenant until the ETag changes, then fetched with If-None-Match; at most 1 MiB); - `POST /api/v1/branding/ack`. - Only a `#rrggbb` colour and a hex ETag are used. Anything else counts as no frame and no logo. **Dashboard:** the frame, the sidebar mark and the notice, plus the `/api/branding/logo` proxy. **Safe before the registry ships:** without `branding`, or with no registry, nothing changes. So this PR can merge before the registry part lands. **Tests:** - the notice only for admins, never for support; - a malformed colour or ETag is ignored; - the logo is fetched once per ETag (304 from cache), and a missing logo is none; - ack is refused for a non-admin; - the initials, and the text colour on the CI colour; - clippy clean (agent, and dashboard server and web), fmt clean. **Before merging:** Sharang's look at the admin notice (board 1), and a screen-by-screen check against the mockup with a fake registry. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-30 22:15:38 +00:00
feat(branding): the workspace's CI colour frames every page, its logo in the sidebar
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m37s
CI / Deploy Agent (pull_request) Skipped
CI / Check (pull_request) Successful in 20m55s
fd078db187
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-30 22:41:05 +00:00
fix(branding): the admin notice keeps clear of the notification bell
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m57s
CI / Check (pull_request) Successful in 20m55s
0cb90b0708
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang merged commit 1ff5fcc1a4 into main 2026-12-01 11:56:23 +00:00
Sign in to join this conversation.