Skip to content

web: Add path-router primitives. - #23990

Merged
GirlBossRush merged 7 commits into
mainfrom
web/router-core-primitives
Aug 11, 2026
Merged

GirlBossRush merged 7 commits into
mainfrom
web/router-core-primitives

Conversation

@GirlBossRush

@GirlBossRush GirlBossRush commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

Adds the dependency-free building blocks of the new path-based router under web/src/elements/router/core/, all new files with co-located unit tests:

  • constants.ts — slug/ID/UUID pathname-group patterns
  • parameters.ts — search-param serialization with typed round-trips
  • config.ts — base path and interface name injected by entrypoints (initRouter), so the router core never reads globals
  • Route.ts — URLPattern-backed route, pattern compiled once at construction
  • matcher.ts — pure first-match-wins scan over pre-compiled patterns

Nothing is wired into an entrypoint; the hash router is untouched and remains active.

Why is this change needed?

Part of moving the web UI from hash routing (/if/admin/#/core/applications;{"page":2}) to real paths and query strings (/if/admin/core/applications?page=2), staged interface by interface. Server-side catch-alls: #23987. Navigation layer (click interception, href builders, legacy-hash translator): #23988, stacked on this PR.

How was this tested?

26 unit tests across the five modules (Unit Tests vitest project), plus the full project run and typecheck. Depends on the transform fix in #23991 and the CI gating in #23989 (the base chain of this PR).

Linked issues


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)

@GirlBossRush
GirlBossRush requested a review from a team as a code owner July 13, 2026 22:46
@netlify

netlify Bot commented Jul 13, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit ebaa6f9
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a556ae4ddfca80008aca0a2
😎 Deploy Preview https://deploy-preview-23990--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 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.37%. Comparing base (07a51c1) to head (175b5bb).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #23990   +/-   ##
=======================================
  Coverage   91.37%   91.37%           
=======================================
  Files        1137     1137           
  Lines       71591    71591           
  Branches     3875     3875           
=======================================
+ Hits        65416    65417    +1     
+ Misses       6140     6139    -1     
  Partials       35       35           
Flag Coverage Δ
conformance 34.82% <ø> (+<0.01%) ⬆️
e2e 39.55% <ø> (+0.01%) ⬆️
integration 31.40% <ø> (+<0.01%) ⬆️
rust 38.89% <ø> (ø)
unit 93.03% <ø> (+<0.01%) ⬆️
unit-migrate 93.06% <ø> (+<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 7, 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-175b5bbe5b7e446a3aa98df5894b33fa88af2db0
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-175b5bbe5b7e446a3aa98df5894b33fa88af2db0

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

@GirlBossRush
GirlBossRush requested a review from a team as a code owner August 7, 2026 17:26
@GirlBossRush
GirlBossRush force-pushed the web/router-core-primitives branch from 6f93948 to c6afab3 Compare August 7, 2026 17:27
@GirlBossRush
GirlBossRush force-pushed the web/router-core-primitives branch from c6afab3 to 711009f Compare August 7, 2026 21:58
Base automatically changed from web/unit-test-ci-gate to main August 7, 2026 22:31
getRouterConfig returns a copy so callers cannot mutate the stored
config; numeric deserialization only coerces digit strings that
round-trip safely (leading zeros and unsafe integers stay strings);
the matcher documents its leading-slash pathname contract.
@GirlBossRush
GirlBossRush force-pushed the web/router-core-primitives branch from 711009f to 175b5bb Compare August 7, 2026 22:31
@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 175b5bb
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a765cbfecd7d6000869d82c
😎 Deploy Preview https://deploy-preview-23990--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.

@GirlBossRush
GirlBossRush merged commit 9de6209 into main Aug 11, 2026
233 of 236 checks passed
@GirlBossRush
GirlBossRush deleted the web/router-core-primitives branch August 11, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants