Skip to content

Conversation

@GirlBossRush
Copy link
Contributor

@GirlBossRush GirlBossRush commented Jan 1, 2026

Details

This PR fixes several issues that contribute to stale, stalled, or otherwise incorrect notification counts in the page header.

The underlying issue stems from how we consume Lit's context objects for mutable values. At first glance it may appear as if the value of a context can be considered consistent across any component who applies a With* mixin. This is true...unless the data changes.

How does this relate to notifications?

Previously, notifications depended on frequent checks for the ak-refresh event to get a clue as to when to fetch new data, both too often and too infrequently to maintain timely updates. This has been fixed through a combination of context-ification and adding lifecycle checks to coordinate the user's session context with a request for new notifications. A similar approach is used to align the session context with other authenticated contexts such as locale, version info, and license information.

Why hasn't this been an issue for the session context?

Session data has been more or less immutable in our approach of always applying page reloads after modifying its value. Additionally, we've quietly accepted some repetitive setting of the session property on some unusual situations, such as the AdminInterface element which both consumes and provides the same data. Because notification fetches depend on the session context, some changes are needed to synchronize their values.

The end result for sessions is the same with fewer re-renders.

Dependencies

This PR is merge branch and includes several fixes composed to make notifications work consistently.

Fixes

  • User library UI elements now layer as expected, such as in drawer content, modals, page headers, progress bars, and tooltips.
    • Combined ak-interface-user and ak-interface-user-presentation, fixing multiple session related re-renders and ARIA focus target headaches.
    • CSS parts of library elements are now exported to better expose custom CSS
    • API and notification drawers no longer overlap each other when both open.
  • Several ARIA fixes for user library and user settings:
    • Table progress bars now include additional ARIA attributes and more accurately reflect the current visibility.
    • Added or revised ARIA labels for navigation header buttons, notification drawer, API drawer, user settings.
    • Color customizations more consistently use PatternFly's CSS variables over !important overrides.
  • Better logging of user-driven events:
    • i.e. less duplication of console.debug.bind(console, "some-component"), more ConsoleLogger.prefix("some-component")`
  • Fix issues surrounding global event dispatching:
    • Our pattern of connectedCallback/disconnectedCallback to manage events is now handled by our @listen(Event) decorator.
    • Event listeners on window are passive: true by default, fixing some UI lockups when notifications and API requests are frequently updating the page.
    • The Lit locale context now correctly dispatches its event to the CAPTCHA stage, fixing a race condition that often results in a mismatched language.

@GirlBossRush GirlBossRush added this to the Release 2025.12 milestone Jan 1, 2026
@GirlBossRush GirlBossRush added the backport/version-2025.12 Add this label to PRs to backport changes to version-2025.12 label Jan 1, 2026
@netlify
Copy link

netlify bot commented Jan 1, 2026

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 4004a34
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6959e533ada25800088f5ef8
😎 Deploy Preview https://deploy-preview-19141--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.

@codecov
Copy link

codecov bot commented Jan 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.38%. Comparing base (3838150) to head (9d348cc).
⚠️ Report is 13 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19141      +/-   ##
==========================================
+ Coverage   92.88%   93.38%   +0.50%     
==========================================
  Files         949      949              
  Lines       52254    52254              
==========================================
+ Hits        48535    48798     +263     
+ Misses       3719     3456     -263     
Flag Coverage Δ
conformance 38.78% <ø> (+<0.01%) ⬆️
e2e 44.70% <ø> (+1.99%) ⬆️
integration 23.43% <ø> (+<0.01%) ⬆️
unit 91.59% <ø> (+<0.01%) ⬆️
unit-migrate 91.64% <ø> (+<0.01%) ⬆️

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

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

@GirlBossRush GirlBossRush marked this pull request as ready for review January 1, 2026 15:30
@GirlBossRush GirlBossRush requested a review from a team as a code owner January 1, 2026 15:30
@GirlBossRush GirlBossRush force-pushed the fix-stale-notifications branch from 35a7e95 to 0074e30 Compare January 2, 2026 00:23
@netlify
Copy link

netlify bot commented Jan 2, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 3a5d22b
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6959d9feeccf100008fb597f
😎 Deploy Preview https://deploy-preview-19141--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.

export const EVENT_LOCALE_REQUEST = "ak-locale-request";
export const EVENT_REQUEST_POST = "ak-request-post";
export const EVENT_MESSAGE = "ak-message";
export const EVENT_THEME_CHANGE = "ak-theme-change";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Vestigial

success = "success",
info = "info",
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved from Message component to avoid circular dependencies.

@GirlBossRush GirlBossRush force-pushed the fix-stale-notifications branch 2 times, most recently from f929ff4 to ac62b25 Compare January 2, 2026 15:43
Copy link
Contributor

@kensternberg-authentik kensternberg-authentik left a comment

Choose a reason for hiding this comment

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

Better abstractions than the ones I came up with, at any rate...

@netlify
Copy link

netlify bot commented Jan 3, 2026

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 3a5d22b
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6959d9fe15a72c0008663523
😎 Deploy Preview https://deploy-preview-19141--authentik-integrations.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.

@GirlBossRush GirlBossRush force-pushed the fix-stale-notifications branch from d9f3d82 to 3a5d22b Compare January 4, 2026 03:09
@GirlBossRush GirlBossRush changed the title web: Fix stale notifications web: Merge branch -- Stale notifications, synchronized context objects, rendering fixes Jan 4, 2026
@GirlBossRush GirlBossRush self-assigned this Jan 4, 2026
@GirlBossRush GirlBossRush requested a review from a team as a code owner January 5, 2026 01:14
@GirlBossRush GirlBossRush force-pushed the fix-stale-notifications branch from 757bd03 to 86efb6b Compare January 5, 2026 03:37
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

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-9d348cc52384fb7f8a0808e2b27d3109f390491b
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-9d348cc52384fb7f8a0808e2b27d3109f390491b

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

@@ -0,0 +1,139 @@
/**
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #19185

*
* @see {@link https://developers.cloudflare.com/turnstile/reference/supported-languages/ Turnstile Supported Languages}
*/
protected renderTurnstileFrame = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #19184

@GirlBossRush GirlBossRush merged commit 2c813cb into main Jan 5, 2026
183 of 187 checks passed
@GirlBossRush GirlBossRush deleted the fix-stale-notifications branch January 5, 2026 20:54
authentik-automation bot pushed a commit that referenced this pull request Jan 5, 2026
This cherry-pick has conflicts that need manual resolution.

Original PR: #19141
Original commit: 2c813cb
@authentik-automation
Copy link
Contributor

⚠️ Cherry-pick to version-2025.12 has conflicts: #19197

GirlBossRush added a commit that referenced this pull request Jan 5, 2026
This cherry-pick has conflicts that need manual resolution.

Original PR: #19141
Original commit: 2c813cb
GirlBossRush added a commit that referenced this pull request Jan 5, 2026
…s, rendering fixes (cherry-pick #19141 to version-2025.12) (#19197)

Cherry-pick #19141 to version-2025.12 (with conflicts)

This cherry-pick has conflicts that need manual resolution.

Original PR: #19141
Original commit: 2c813cb

Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>
kensternberg-authentik added a commit that referenced this pull request Jan 6, 2026
* main:
  outpost/proxyv2: reduce max number of postgres connections (#19211)
  web/maintenance: lint pass to add missing HTMLElementEventMap entries (#18953)
  translate: Updates for project authentik and language pt_BR (#19082)
  core: bump goauthentik.io/api/v3 from 3.2026020.6 to 3.2026020.7 (#19202)
  lifecycle/aws: bump aws-cdk from 2.1100.1 to 2.1100.2 in /lifecycle/aws (#19203)
  core: bump axllent/mailpit from v1.28.0 to v1.28.1 in /tests/e2e (#19204)
  web: bump knip from 5.79.0 to 5.80.0 in /web (#19207)
  website/integrations: glpi: add step (#19208)
  admin/files: support %(theme)s variable in media file paths (#19108)
  web: bump the eslint group across 1 directory with 3 updates (#19205)
  core: add last_login filter to users API (#18993)
  website/docs: rewrite section about users and perms (#19195)
  rbac: Add show all to roles tab, add role tab to groups (#19097)
  web: Defer table refresh, visibility checks. (#19194)
  Add docs for roles (#19196)
  web: Merge branch -- Stale notifications, synchronized context objects, rendering fixes (#19141)
  root: codespell: ignore Python virtual env, group patterns. (#19180)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2025.12 Add this label to PRs to backport changes to version-2025.12

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants