Repository navigation
web: Add the path-router outlet. - #24032
Conversation
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
b810343 to
28202eb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24032 +/- ##
=======================================
Coverage 91.67% 91.67%
=======================================
Files 1160 1160
Lines 73938 73938
Branches 4054 4054
=======================================
Hits 67781 67781
Misses 6115 6115
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
28202eb to
4f89d9d
Compare
4f89d9d to
885d4fd
Compare
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-a486db271307bf8759ccbd0799681ab5d1b3bbe9
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-a486db271307bf8759ccbd0799681ab5d1b3bbe9Afterwards, run the upgrade commands from the latest release notes. |
885d4fd to
7c4e184
Compare
7c4e184 to
9c5e9e1
Compare
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
9c5e9e1 to
8a414c7
Compare
cd26ae8 to
cb961da
Compare
08ac794 to
23fcdc1
Compare
906bce1 to
9c35666
Compare
Both router outlets decided whether to open a tracing span by re-deriving the policy from `process.env.NODE_ENV`, in two places that had drifted apart: the page-load span was gated on the environment, the navigation span only on the client existing. Adds `sentryReporting()`, a leaf module over the Sentry SDK, and points both gates in both outlets at it. Sentry initialization already decides once and leaves the result on the client; reading it back keeps a single copy of the policy. The predicate mirrors the SDK's own `_isEnabled()` — `enabled` is optional, and an unset value means enabled — so it stays correct if initialization moves the decision ahead of `init()` and stops passing an explicit flag. No behavior change here: `enabled` is currently set from the same NODE_ENV expression the outlets were testing. The helper is a leaf on purpose — `#common/sentry` pulls in `globalAK` and the API client, which `RouterView` is documented not to import.
9c35666 to
a486db2
Compare
Details
This PR adds
<ak-router-view>, the outlet that renders the new path-based route table, plus the two core hooks it needs. It strips the interface prefix fromlocation.pathname, matches through the router core, intercepts in-interface clicks, re-matches on popstate, redirects/to a configurabledefault-path, falls back to<ak-router-404>with the URL preserved, and owns the loading and error states, so a rejecting route renders an error state instead of escaping as an unhandled rejection. Sentry pageload and navigation spans mirror the legacy hash outlet.Two supporting changes come with it:
Route.resolve()exposes a route's render callback as a promise so the outlet can own the async states, andnavigate()falls back to a full-page assign for cross-origin destinations instead of lettingpushStatethrow.Nothing mounts the element yet. The user-interface flip lands on top of this.