Skip to content

web: resolve themed icon URLs everywhere - #25103

Merged
dominic-r merged 5 commits into
mainfrom
dominic/resolve-files
Sep 9, 2026
Merged

dominic-r merged 5 commits into
mainfrom
dominic/resolve-files

Conversation

@dominic-r

@dominic-r dominic-r commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Icons using the %(theme)s placeholder rendered the literal placeholder in several places:

  • the admin application overview header
  • the user applications table
  • the policy access-denied page
  • the SFE
  • favicons.

All web icon rendering now goes through a shared helper, and the server-rendered templates pick the light/dark variant via
data-theme and prefers-color-scheme.

Closes #25101
Closes #25255

@dominic-r dominic-r self-assigned this Aug 14, 2026
@dominic-r
dominic-r requested review from a team as code owners August 14, 2026 14:17
@dominic-r dominic-r added area:frontend Features or issues related to the browser, TypeScript, Node.js, etc area:backend backport/version-2026.8 Add this label to PRs to backport changes to version-2026.8 labels Aug 14, 2026
@netlify

netlify Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 81f3158
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a90525f2bea8d0009b0d4d1
😎 Deploy Preview https://deploy-preview-25103--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 81f3158
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a90525f184e2f000862c00e
😎 Deploy Preview https://deploy-preview-25103--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.67%. Comparing base (8890ee2) to head (81f3158).
⚠️ Report is 134 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #25103   +/-   ##
=======================================
  Coverage   91.67%   91.67%           
=======================================
  Files        1151     1151           
  Lines       73416    73448   +32     
  Branches     4054     4054           
=======================================
+ Hits        67301    67335   +34     
+ Misses       6073     6071    -2     
  Partials       42       42           
Flag Coverage Δ
conformance 34.40% <0.00%> (-0.02%) ⬇️
e2e 39.05% <0.00%> (-0.02%) ⬇️
integration 31.00% <0.00%> (+<0.01%) ⬆️
rust 42.92% <ø> (ø)
unit 93.22% <100.00%> (+<0.01%) ⬆️
unit-migrate 93.24% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-81f315894929d9d594d68c75c02f53b6ab2d535e
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-81f315894929d9d594d68c75c02f53b6ab2d535e

Afterwards, run the upgrade commands from the latest release notes.

@kensternberg-authentik kensternberg-authentik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but the dead code bothers me.

}
:root[data-theme="dark"] .branding-logo--light,
:root:not([data-theme="dark"]) .branding-logo--dark {
display: none;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data-theme and prefers-color-scheme aren't the same, and they're not required to be the same; we made it so that data-theme can override prefers-color-scheme if the user specifies the theme in the URL or has set it to an alternative which we store in localStorage. So it's possible for the page to be in the user's preference, and the favicon not to be.

I'm not sure this is a bad thing; the favicon reflects the system color scheme, so it has contrast with the tab background, whereas the user can set the page color to some expressed value, falling back to the system colors when there is no such expression.

Comment thread web/src/common/api/config.ts Outdated

import type { CurrentBrand } from "@goauthentik/api";

export function brandSetFavicon(brand: CurrentBrand) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find anyplace we actually use this function.

$ rg 'brandSetFavicon'
web/src/common/api/config.ts: * @file brandSetFavicon() and AndNext(), which is used for redirects and flow steps
web/src/common/api/config.ts:export function brandSetFavicon(brand: CurrentBrand) {
$ 

@emilburzo emilburzo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backend part only seems to be a test?

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Sep 9, 2026
@dominic-r
dominic-r merged commit 6283e48 into main Sep 9, 2026
144 checks passed
@dominic-r
dominic-r deleted the dominic/resolve-files branch September 9, 2026 19:49
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Sep 9, 2026
@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

⚠️ Cherry-pick to version-2026.8 has conflicts: #25992

@dominic-r

Copy link
Copy Markdown
Member Author

backend part only seems to be a test?

django templates as well i think

dominic-r added a commit that referenced this pull request Sep 17, 2026
…on-2026.8) (#25992)

* Cherry-pick #25103 to version-2026.8 (with conflicts)

This cherry-pick has conflicts that need manual resolution.

Original PR: #25103
Original commit: 6283e48

* web: resolve themed icon cherry-pick conflicts

---------

Co-authored-by: Dominic Roy <[email protected]>
@dewi-tik dewi-tik removed this from the Release 2026.11.0: Nice to have milestone Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend area:frontend Features or issues related to the browser, TypeScript, Node.js, etc backport/version-2026.8 Add this label to PRs to backport changes to version-2026.8

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Evaluate %(theme)s on logos, backgrounds, error pages, and light/dark app icons Theme-aware icons with %(theme)s not evaluated correctly everywere

4 participants