Skip to content

docs(config): add white-label theming kit and admin guide - #482

Open
antonkatsapau wants to merge 49 commits into
codemie-ai:mainfrom
antonkatsapau:EPMCDME-15168_white-label-theming
Open

antonkatsapau wants to merge 49 commits into
codemie-ai:mainfrom
antonkatsapau:EPMCDME-15168_white-label-theming

Conversation

@antonkatsapau

@antonkatsapau antonkatsapau commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

White-label theming kit and admin guide. A DevOps engineer fills in one theme package (product name, colours, fonts, logos, links, an optional email block and an optional Keycloak block) and runs apply-theme. The script validates the package, renders values for the platform Helm releases, and applies them with pinned helm upgrade --reuse-values calls plus rollout restarts. --render-only writes the files for GitOps pipelines.

Changes

  • Guide: docs/admin/configuration/white-label/index.md and package-reference.md, with a sidebar entry. Two FAQ entries. The EMAIL_FROM_NAME row in api-configuration.md shows the new empty default and the fallback.
  • Kit: the apply-theme script, the theme-package.yaml template, a JSON schema, the example acme package and an example GitHub Actions workflow.
  • Colours: every token has a required dark and light value. Both are written to brand.css, under html.codemieDark and html.codemieLight.
  • Platform emails (optional email block): sender name, signature, a five-colour palette, one logo and message texts for the five platform emails. Bad fields fail before any file is written or any helm or kubectl call. The logo is stored as binaryData and mounted as a directory with no chart change. The checksum covers the logo bytes.
  • Keycloak login and email theme (optional keycloak block): a theme name, an optional SMTP block (secret references only) and an HTTPS logo URL for the Keycloak email. With the block present, one run:
    1. validates every input and collects all errors;
    2. renders the child theme values, the realm values and the stale-key values;
    3. runs a read-only preflight on the Keycloak release;
    4. applies the UI, API, Keycloak (helm --wait) and proxy releases in that order, each in its own namespace.
  • Gradients and tokens (added after the stand test): the optional effects.gradients (default or none); with none the UI removes every background gradient, and the kit makes two-colour gradients single-colour (the -to value follows -from). The guide lists the tokens for the side panels, button borders, the product tour, links, the "NEW" tag and the gradient fills.
  • Product name in visible text (EPMCDME-16332): a new guide section, "Where the Product Name Appears" in index.md, and a corrected product.name row in package-reference.md. It lists the texts that follow the brand name (UI texts, the chat label "{product name} Thoughts", platform emails, Keycloak), the texts that do not change (pre-built assistants, katas, documents, release notes, user-created assistants, the support address, the default tab title), the fallbacks, and the API restart after a brand change.
  • New flags: --chart-keycloak, --chart-proxy, --release-keycloak, --release-proxy, --namespace-keycloak, --namespace-proxy, --keycloak-timeout and --no-keycloak.
  • Review fixes (28 October): realm SMTP keys are written only with a full smtp block (an empty keycloak.smtp: {} clears them); the example workflow takes the Keycloak and proxy inputs; an unparsable extraVolumes string stops the run; arguments after the assets directory are rejected; the UI asset size check covers the 1 MiB Helm release Secret and fontFaceCSS has a length cap; the smoke check handles names with &; restarts find workloads by release label. Each has bats tests.
  • Tests and CI: a bats suite (167 tests) with an extended Helm stub, a contract-drift test and the CI job white-label-kit-tests.yml.

Behaviour changes to note

  • The backend EMAIL_FROM_NAME default changes from CodeMie to empty, and platform emails use neutral wording when no brand is set. The guide has the details.
  • Without a keycloak block, the output and the Helm calls are the same as before.

Operational notes (also in the guide)

  • A full redeploy of the platform charts without the brand values resets the brand to the chart defaults.
  • Release the parent theme image first. A child theme on an old parent image shows the old look.
  • The sender name for Keycloak emails works only together with a full SMTP connection.
  • The vendor parent theme must stay installed. The child theme inherits it.
  • A theme change restarts the single Keycloak replica, which gives a short login outage.

Scope note

Pairing the kit with a specific release is out of scope for this change. No Release Notes entry is added.

Testing

  • Kit bats suite: 167 passed on macOS and in an Ubuntu 24.04 container; the CI job apply-theme bats suite is green on the merged head. (An earlier head was red on Linux: the UI asset data was passed to yq in an environment variable, and Linux limits one variable to 128 KiB, so assets over about 96 KiB crashed the render. It now goes through files; commit 34d99d9.) markdownlint, prettier and cspell passed on the changed guide pages, including the two pages edited for EPMCDME-16332.
  • npm run check, npm run build and secrets:check: passed on the earlier head; not re-run after the review fixes.
  • Run against the GCP stand (GKE cdmp-codemie-gke), 20 and 21 October: apply-theme upgraded the UI, API and Keycloak releases with a test package ("Example Co"), and a running Keycloak served the child login theme. These runs also hit the restart problem that review comment 7 describes (fixed in f9ba69d).
  • Not run: the oauth2-proxy and realm phase (the stand has no KeycloakRealm resource), an upgrade with oversized assets, the example workflow on a real GitHub runner, and a mail sent by a running Keycloak.

antonkatsapau and others added 17 commits October 2, 2026 12:36
add JSON Schema draft-07 for theme-package.yaml with all required fields
(version, product, colors, typography, assets, links) and initial BATS
test skeleton for schema validation. extend linting ignore rules for
internal SDLC artifact directories.

refs: EPMCDME-15168
add apply-theme bash script implementing validate (json schema + asset
existence + enabled-link cross-check) and render phases (brand.css,
values-codemie-ui.brand.yaml, values-codemie.brand.yaml). add bats test
fixtures and stubs. extend cspell dictionary with theming terms and
exclude shell scripts from spell checking. all 7 bats tests pass.

refs: EPMCDME-15168
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
…ation

Move the kit under docs/admin, emit the CSS variables the UI reads, mount brand.yaml into the API pod while merging release lists, pin the installed chart version, harden validation and value encoding, add smoke-check, approval gate and a CI job for the bats suite.

Co-Authored-By: Claude Code <noreply@anthropic.com>
…colors at :root only

Co-Authored-By: Claude Code <noreply@anthropic.com>
…iring

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…me classes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… handling

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@antonkatsapau
antonkatsapau force-pushed the EPMCDME-15168_white-label-theming branch from 2daa365 to dca3dd4 Compare October 13, 2026 12:57
@antonkatsapau
antonkatsapau marked this pull request as draft October 13, 2026 13:02
antonkatsapau and others added 11 commits October 13, 2026 17:40
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Check the keycloak block of a theme package before anything is
rendered: properties policy, theme name, assets, email logo URL,
SMTP rules and the theme size cap. Add --no-keycloak and the
keycloak chart flags.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add flags for the Keycloak and proxy releases, a read-only preflight of
the child-theme hook, nulling of removed image keys, and ordered upgrades
(UI, API, Keycloak with wait, proxy).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add the Keycloak section (child theme, realm values, flags, steps, check
after apply, render-only wiring), the warnings, and fix statements that
the keycloak block made wrong.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add the Keycloak section (themeName rules, smtp fields, secret refs only,
host and from both-or-none), the email.images.logoUrl field, the value
policy, and the Acme block in the complete example.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Drop .markdownlintignore, the .prettierignore and lint:markdown excludes, and the
superpowers and .ai-run cspell ignores. They only covered local run files, which
are not in the repository. Keep the cspell ignores and words the kit files need.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
antonkatsapau and others added 3 commits October 21, 2026 17:31
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…el guide

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
antonkatsapau and others added 2 commits October 27, 2026 17:11
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…guide

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
antonkatsapau and others added 9 commits October 28, 2026 13:34
…lock

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Linux limits one environment string to 128 KiB, so base64 assets above
about 96 KiB made yq fail with Argument list too long.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@antonkatsapau
antonkatsapau marked this pull request as ready for review October 28, 2026 15:13
@baduda

baduda commented Oct 29, 2026

Copy link
Copy Markdown

The guide does not say which kit version goes with which CodeMie version. The description says it does, but the "Kit Versions" table lists features, not CodeMie releases. This matters together with the logoUrl problem (inline comment on apply-theme:574): a package with an email block applied to an older backend also stops the API. Please add the minimum CodeMie (chart and app) release for each row once the backend and UI MRs land.

…se the helm minimum to 3.13

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@antonkatsapau

Copy link
Copy Markdown
Contributor Author

Re: kit version and CodeMie version table. Agreed. The "Kit Versions" table will get the minimum CodeMie release (chart and app) for each row after the backend and UI MRs are merged and released. I leave this comment open until then. The logoUrl problem from the inline comment is fixed in 94e38c9.

antonkatsapau and others added 2 commits October 29, 2026 17:36
… default login theme

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants