Skip to content

feat(design): apply the design tokens to hosted service UIs #5186

Open

Description

@dan-petty

Update 2026-11-26 (infra move): the settings of the hosted services go to dan-petty/homelab.

This issue keeps the docs/DESIGN.md row, the stylesheet build in design/ and src/devops_cli/design/, and the contrast test. The Argo CD, Gitea, Grafana, gateway and other values are in homelab now. Homelab can read the generated stylesheets at a release tag, as it reads the dashboards.

Follow-up: dan-petty/homelab#294.


Problem or Motivation

On 2026-11-12 the owner asked for one look across the start page, the devops-cli dashboard, the docs, the artifacts, and the look-and-feel options of the services that the cluster hosts. docs/DESIGN.md "Rules for each target" covers the docs site, Grafana, the start page, reports, artifacts and the terminal, but no hosted service UI. The cluster serves 9 web UIs through its ingress (2026-11-12): Argo CD, Gitea, Grafana, Open WebUI, the LLM gateway (LiteLLM), Qdrant, Mattermost, Prometheus and the Traefik dashboard. Each uses its own default look.

Proposed Solution & Architectural Design

  1. Make an inventory table of each hosted UI: the look-and-feel options that upstream documents and supports (theme default, light and dark, custom CSS, logo, name), the source link, and the decision. Expected, to confirm against the upstream documents of the deployed version:
    • Argo CD: custom CSS through ui.cssurl in argocd-cm.
    • Gitea: theme CSS files in custom/public/assets/css/ and [ui] THEMES; a light and a dark theme that follows the system.
    • Grafana: default_theme = system (DESIGN.md row "Grafana"); custom branding is an Enterprise feature.
    • Mattermost: the default theme in ThemeSettings, if the edition in use supports it.
    • Open WebUI, LiteLLM: theme default, name and logo settings only.
    • Qdrant, Prometheus, Traefik: a light and dark switch or no option. They stay as published.
  2. Apply the tokens only through an option that upstream supports: for a CSS option, a stylesheet that the token build writes (the token CSS plus a short map of the UI's own variables to the tokens, as the start page row does), in a light and a dark form that follows the system theme; for a theme-default option, system or auto. No proxy that injects CSS, no patched image and no fork.
  3. Add the row "Hosted service UIs" to "Rules for each target" in DESIGN.md with the table: the service, the option, the item.

Target Subsystem

The design tokens (design/, src/devops_cli/design/), the hosted service values in dan-petty/homelab (follow-up), docs/DESIGN.md.

Existing Tool Considered

Each service's own supported theme options, and the Style Dictionary build of #4738 for the stylesheets. No new tool.

Acceptance Criteria

  • The DESIGN.md row lists each of the 9 UIs, its supported option with a source link, and the decision.
  • Each UI that has a CSS option follows the system theme in light and dark with the token colors and fonts. A screenshot of each theme is in a pull request comment.
  • Text in each styled UI passes WCAG 2.2 AA (4.5:1) in both themes; the token contrast test covers the new stylesheets.
  • The token build writes the stylesheets; no hand-written color literal is in a manifest.

Related

#4735 (parent), #4598 (start page), #4745 (docs site), #4762 (Grafana colors).

Source: #4735

Alternatives check of 2026-11-19: in-use.
The repository already uses this tool.
Tool: style-dictionary/style-dictionary (https://github.com/style-dictionary/style-dictionary), Apache-2.0, last activity 2026-11-03, maintained.
Reason: Searches found no maintained tool that themes these nine hosted UIs from the project's tokens; Style Dictionary, already the repository's token build, generates the light and dark CSS but has no per-service variable maps or manifest wiring.

Covers:

  • Builds CSS from the DTCG design tokens
  • Writes one stylesheet for each platform and theme
  • Runs inside the existing token build and contrast test

Lacks:

  • Per-service CSS variable maps
  • No wiring of generated CSS into argocd-cm or Gitea THEMES
  • No inventory of each UI's upstream theme options

Proposed design

Problem statement

The cluster hosts nine web UIs, and each uses its default look. The project has design tokens and a Style Dictionary build, but docs/DESIGN.md has no rule for hosted service UIs. This change records each supported option and applies the tokens only through options that upstream supports.

Acceptance criteria

Requirement: Hosted UI inventory

docs/DESIGN.md SHALL list each of the nine hosted service UIs, the look-and-feel option that its deployed version supports, a source link, and the decision.

Scenario: All nine hosted UIs are listed

  • WHEN uv run pytest tests/design runs
  • THEN The test passes and finds the nine service names in the "Hosted service UIs" table of docs/DESIGN.md.

Requirement: Generated per-service stylesheets

The token build SHALL write a light and a dark stylesheet for each hosted UI that the inventory records as supporting custom CSS.

Scenario: The build writes both themes

  • WHEN make design-tokens runs
  • THEN It writes the stylesheets under src/devops_cli/design/hosted/ and uv run pytest tests/design passes.

Requirement: Argo CD custom CSS

Argo CD SHALL load the generated token stylesheet through ui.cssurl in argocd-cm.

Scenario: Argo CD points to the generated CSS

  • WHEN uv run devops ci --check --only k8s runs
  • THEN The check passes and the rendered argocd-cm sets ui.cssurl to the generated stylesheet.

Requirement: Gitea themes

Gitea SHALL expose the generated light and dark token stylesheets through [ui] THEMES and custom/public/assets/css/.

Scenario: Gitea uses the generated themes

  • WHEN uv run devops ci --check --only k8s runs
  • THEN The check passes and the rendered Gitea config sets [ui] THEMES to the generated stylesheets.

Requirement: Theme-default settings

Each hosted UI that supports a theme-default setting SHALL set it to system or auto.

Scenario: Supported theme-default settings follow the system theme

  • WHEN uv run devops ci --check --only k8s runs
  • THEN The check passes and the rendered values set each supported theme-default setting to system or auto.

Requirement: No color literals in maps

The hand-written map for each hosted UI MUST use only token variables and MUST contain no color literal.

Scenario: The maps have no color literal

  • WHEN uv run pytest tests/design runs
  • THEN It passes and reports no color literal in the hosted-UI map files.

Requirement: Contrast of hosted-UI stylesheets

The token contrast test SHALL cover each generated hosted-UI stylesheet in both themes.

Scenario: New stylesheets meet the contrast rules

  • WHEN uv run pytest tests/design runs
  • THEN It passes and checks the contrast rules for each hosted-UI stylesheet in the light and the dark theme.

Existing Tool Considered

Style Dictionary (Apache-2.0, verdict in-use) is the open, maintained token build already in the repository. The alternatives check in the issue body gives what the tool covers and lacks. This proposal adds the per-service maps and wires the generated CSS into argocd-cm and Gitea [ui] THEMES.

Key questions

  • Which look-and-feel options do the deployed versions of the nine hosted UIs support?: Argo CD uses ui.cssurl. Gitea uses custom theme CSS and [ui] THEMES. Grafana uses default_theme = system. Mattermost uses a default theme only when its edition supports it. Open WebUI and LiteLLM use theme default, name and logo settings. Qdrant, Prometheus and Traefik have no custom CSS and stay as published. [sources: docs/DESIGN.md, k8s/gitea/values.yaml, k8s/monitoring/grafana-values.yaml, k8s/llm/gateway/config.yaml]
  • Should the change use upstream-supported options or inject CSS through a proxy or a patched image?: Use only an option that upstream documents and supports. Do not add a CSS-injecting proxy, a patched image or a fork. (best practice) [sources: docs/DESIGN.md, docs/adr/0024-the-project-owns-its-design-tokens-in-the-dtcg-format-and-style-dictionary-builds-them.md]
    • Chosen: Upstream-supported option. It keeps the deployment maintainable and upgradeable.
    • Rejected: CSS-injecting proxy. It adds a component that upstream does not support.
    • Rejected: Patched image or fork. It breaks the upstream upgrade path.
  • How should the token build produce per-service stylesheets?: Add one Style Dictionary config for each service and theme under design/sd/hosted/. Write the CSS under src/devops_cli/design/hosted/. The light and dark outputs follow the system theme. Each map uses only token variables. (best practice) [sources: docs/DESIGN.md, docs/adr/0024-the-project-owns-its-design-tokens-in-the-dtcg-format-and-style-dictionary-builds-them.md]
    • Chosen: Token build output. The build already owns the token CSS and the contrast test.
    • Rejected: Hand-written CSS in each manifest. It duplicates token values and fails the no-literal rule.
    • Rejected: Runtime CSS injection. It adds a component that upstream does not support.
  • Should the inventory include UIs that have no styling option?: Yes. List all nine UIs. Record stays as published for Qdrant, Prometheus and Traefik, or for any UI with no supported option. (best practice) [sources: docs/DESIGN.md]
    • Chosen: List all nine UIs. The table gives one complete record and shows why a UI is unchanged.
    • Rejected: List only styled UIs. It hides the services that have no supported option.
  • How should the change verify the themes without a screenshot?: Use the token build and tests/design for the generated CSS, contrast and color literals. Use uv run devops ci --check --only k8s for the rendered manifests. Keep a screenshot in the pull request comment as manual evidence, not as a gate. (best practice) [sources: docs/DESIGN.md]
    • Chosen: Automated checks plus manual screenshot. The checks are repeatable and the screenshot shows the rendered result.
    • Rejected: Screenshot only. A screenshot is not an offline check and cannot gate a merge.
  • Which Grafana work belongs to this item?: Record Grafana and its default_theme = system decision in the inventory. The color work stays with feat(grafana): apply the design colors to the dashboards #4762 and the existing Grafana row. (best practice) [sources: docs/DESIGN.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    on Nov 12, 2026
  2. added
    type/feature
    scope/design
    status/new
    value/medium
    effort/medium
    on Nov 12, 2026
  3. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 12, 2026
  5. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  6. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (7)

    Tools considered:

    Searches run:

    • open source theme CSS for self-hosted web UIs Argo CD Gitea Grafana Mattermost userstyles, results: 5
    • Style Dictionary generate per-service theme CSS custom properties design tokens, results: 5
    • catppuccin userstyles self-hosted service themes repository, results: 5
    • amzn style-dictionary GitHub design token CSS build tool, results: 5
    • Catppuccin userstyles themes for self-hosted apps, results: 5
    • Style Dictionary, results: 5
    • style-dictionary documentation css/variables format output, results: 5

    Sources:

  7. added
    status/ready
    and removed
    status/new
    on Nov 19, 2026
  8. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/designsource/agentstatus/readytype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions