Skip to content

web/admin: Simplify sidebar entries handling - #27112

Merged
GirlBossRush merged 6 commits into
mainfrom
web/sidebar/validate-sidebar-entries
Oct 27, 2026
Merged

GirlBossRush merged 6 commits into
mainfrom
web/sidebar/validate-sidebar-entries

Conversation

@kensternberg-authentik

Copy link
Copy Markdown
Contributor

This commit streamlines how sidebar entries are generated and validated. The entries field was only being used as a signal to requestUpdate(); the actual entries were being generated on the fly in get navigateEntries().

We already had functions to generate the base entries and the enterprise entries, and putting the “just base or base + enterprise” function into the sidebar.ts file reduced the navigateEntries to two lines, and separates the “canEnterprise” from “what does that mean for sidebar” nicely.

@GirlBossRush, there’s a validateRoutes function in ./src/admin/navigation/sidebar.ts that I tried to make into a unit test, but I could not get to run under Vitest, mostly because Routes.ts has exactly one side-effect import and Vitest cannot handle that. I didn’t want to make it a browser test, however. Any suggestions?


Checklist

  • [⛕] The project has been linted, built, and tested (make all)
  • [⛕] The documentation has been updated and formatted (make docs)
  • [⛕] I have read the AI usage policy.

@kensternberg-authentik
kensternberg-authentik marked this pull request as ready for review October 22, 2026 16:33
@kensternberg-authentik
kensternberg-authentik requested a review from a team as a code owner October 22, 2026 16:33
@netlify

netlify Bot commented Oct 22, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 761b785
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6ada3ab41b0ddffc1e8f2499
😎 Deploy Preview https://deploy-preview-27112--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 Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.41%. Comparing base (94fd54e) to head (0204744).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27112      +/-   ##
==========================================
- Coverage   92.41%   92.41%   -0.01%     
==========================================
  Files        1192     1192              
  Lines       80462    80462              
  Branches     4351     4351              
==========================================
- Hits        74358    74356       -2     
- Misses       6038     6040       +2     
  Partials       66       66              
Flag Coverage Δ
conformance 32.29% <ø> (-0.01%) ⬇️
e2e 36.97% <ø> (+<0.01%) ⬆️
integration 29.19% <ø> (+<0.01%) ⬆️
rust 44.42% <ø> (ø)
unit 94.06% <ø> (+<0.01%) ⬆️
unit-migrate 94.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.

Comment thread web/src/admin/navigation/sidebar.ts Resolved
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Playwright e2e

Download this run's HTML report and traces, then open the report:

gh run download 40443675205 -D playwright-artifacts
npx playwright show-report playwright-artifacts/playwright-report

Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-0204744023a8b7ccafd6227f83b17ff64cba3249
# Distroless image: AUTHENTIK_TAG=gh-0204744023a8b7ccafd6227f83b17ff64cba3249-distroless
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-0204744023a8b7ccafd6227f83b17ff64cba3249
        # Distroless image: tag: gh-0204744023a8b7ccafd6227f83b17ff64cba3249-distroless

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

@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

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

@kensternberg-authentik
kensternberg-authentik force-pushed the web/sidebar/validate-sidebar-entries branch from f8d45af to e3f821b Compare October 23, 2026 13:36
This commit streamlines how sidebar entries are generated and validated. The `entries` field was only being used as a signal to `requestUpdate()`; the actual entries were being generated on the fly in `get navigateEntries()`.

We already had functions to generate the base entries and the enterprise entries, and putting the “just base or base + enterprise” function into the `sidebar.ts` file reduced the `navigateEntries` to two lines, and separates the “canEnterprise” from “what does that mean for sidebar” nicely.

@GirlBossRush, there’s a `validateRoutes` function in `./src/admin/navigation/sidebar.ts` that I tried to make into a unit test, but I could not get to run under Vitest, mostly because `Routes.ts` has exactly one side-effect import and Vitest cannot handle that. I didn’t want to make it a browser test, however. Any suggestions?
…is to have the dashboard as live as possible as early as possible. Putting into Routes made Routes into a browser-only feature, and it could not be unit tested without this move.
@GirlBossRush
GirlBossRush force-pushed the web/sidebar/validate-sidebar-entries branch from e3f821b to 7114599 Compare October 27, 2026 02:48
@GirlBossRush
GirlBossRush merged commit ef82977 into main Oct 27, 2026
171 checks passed
@GirlBossRush
GirlBossRush deleted the web/sidebar/validate-sidebar-entries branch October 27, 2026 04:13
kensternberg-authentik added a commit that referenced this pull request Oct 30, 2026
…estamp' into web/elements/ak-timestamp

* refs/remotes/origin/web/elements/ak-timestamp: (119 commits)
  Potential fix for pull request finding 'Implicit operand conversion'
  Move constant to be, y'know, a constant.
  web/elements: formalize the timestamp display
  web/elements: rebuild ak-checkbox-group as a form-associated element (#27048)
  web/elements: re-arrange sidebar footer dependency (#27033)
  web/elements: rebuild ak-array-input as a form-associated element (#27046)
  web/admin: Simplify sidebar entries handling (#27112)
  revert: core: bump paramiko from 5.0.1 to 5.1.0 (#27258)
  web: Flow overlays cleanup (#27028)
  website/integrations: add agent-claude code doc (#27195)
  providers/oauth2: support saml token exchange (#27135)
  root: bump rust deps (#27190)
  root: bump Go to 1.27.3 (#27151)
  website/docs: update ha and LDAP provider docs (#27119)
  website/docs: events: change sidebar title and ordering (#27130)
  core: bump library/golang from `1896654` to `fbb7ae4` in /lifecycle/container (#27157)
  core: bump library/node from `1653c74` to `36793bc` in /lifecycle/container (#27158)
  core: bump library/node from `62314d9` to `a98e6fd` in /website (#27159)
  core: bump library/nginx from 1.31.6-trixie to 1.31.8-trixie in /website (#27160)
  ci: bump the codeql group across 1 directory with 3 updates (#27165)
  ...
kensternberg-authentik added a commit that referenced this pull request Oct 30, 2026
…ntab' into web/elements/ak-crontab

* refs/remotes/origin/web/elements/ak-crontab: (221 commits)
  web/elements: introduce the crontab component
  Potential fix for pull request finding 'Implicit operand conversion'
  Move constant to be, y'know, a constant.
  web/elements: formalize the timestamp display
  web/elements: rebuild ak-checkbox-group as a form-associated element (#27048)
  web/elements: re-arrange sidebar footer dependency (#27033)
  web/elements: rebuild ak-array-input as a form-associated element (#27046)
  web/admin: Simplify sidebar entries handling (#27112)
  revert: core: bump paramiko from 5.0.1 to 5.1.0 (#27258)
  web: Flow overlays cleanup (#27028)
  website/integrations: add agent-claude code doc (#27195)
  providers/oauth2: support saml token exchange (#27135)
  root: bump rust deps (#27190)
  root: bump Go to 1.27.3 (#27151)
  website/docs: update ha and LDAP provider docs (#27119)
  website/docs: events: change sidebar title and ordering (#27130)
  core: bump library/golang from `1896654` to `fbb7ae4` in /lifecycle/container (#27157)
  core: bump library/node from `1653c74` to `36793bc` in /lifecycle/container (#27158)
  core: bump library/node from `62314d9` to `a98e6fd` in /website (#27159)
  core: bump library/nginx from 1.31.6-trixie to 1.31.8-trixie in /website (#27160)
  ...
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