-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
web: Merge branch -- Stale notifications, synchronized context objects, rendering fixes #19141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
35a7e95 to
0074e30
Compare
✅ Deploy Preview for authentik-docs ready!
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"; |
There was a problem hiding this comment.
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", | ||
| } | ||
|
|
There was a problem hiding this comment.
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.
f929ff4 to
ac62b25
Compare
kensternberg-authentik
left a comment
There was a problem hiding this 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...
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
d9f3d82 to
3a5d22b
Compare
757bd03 to
86efb6b
Compare
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your 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)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your 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-9d348cc52384fb7f8a0808e2b27d3109f390491bAfterwards, run the upgrade commands from the latest release notes. |
| @@ -0,0 +1,139 @@ | |||
| /** | |||
There was a problem hiding this comment.
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 = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #19184
|
|
…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>
* 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)
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-refreshevent 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
sessionproperty 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
ak-interface-userandak-interface-user-presentation, fixing multiple session related re-renders and ARIA focus target headaches.!importantoverrides.console.debug.bind(console, "some-component"), moreConsoleLogger.prefix("some-component")`connectedCallback/disconnectedCallbackto manage events is now handled by our@listen(Event)decorator.windowarepassive: trueby default, fixing some UI lockups when notifications and API requests are frequently updating the page.