Skip to content

web/admin: maintenance: centralize types that are used across stages#20398

Merged
kensternberg-authentik merged 1 commit intomainfrom
web/maint/cleanup-type-files
Feb 18, 2026
Merged

web/admin: maintenance: centralize types that are used across stages#20398
kensternberg-authentik merged 1 commit intomainfrom
web/maint/cleanup-type-files

Conversation

@kensternberg-authentik
Copy link
Contributor

What

Re-arranges where types are declared and how they’re accessed. In some cases, refine the types to provide stronger build-time guarantees.

Why

A lot of our stages use bits and pieces of types from a base state, from the executor, and in some cases from redundant sources.

Union types are great for some things, but Typescript can get really hung up on passing a union type as a function parameter when there’s some low-level non-conformance across all the types in the union. Because OpenAPI doesn’t do abstractions, this commit introduces a StageChallengeLike, which abstracts all of the Challenge types, asserting that there is a unifying parent class that contains the minimum collection fields found across all challenges, and this lets us address the different challenge types and their corresponding components before worrying about refining the type for construction and deployment.

On the other hand, sometimes you want to be able to assert that all of the member of a union correspond to some shape of data, and you can always use Pick<> on the FormChallenge type to assert that at build time.

Other than that, this centralizes the types into locations in the codebase with well-known names.

  • The code has been formatted (make web)

## What

Re-arranges where types are declared and how they’re accessed. In some cases, refine the types to provide stronger build-time guarantees.

## Why

A lot of our stages use bits and pieces of types from a base state, from the executor, and in some cases from redundant sources.

Union types are great for some things, but Typescript can get really hung up on passing a union type as a function parameter when there’s some low-level non-conformance across all the types in the union. Because OpenAPI doesn’t do abstractions, this commit introduces a `StageChallengeLike`, which abstracts all of the Challenge types, asserting that there is a unifying parent class that contains the minimum collection fields found across all challenges, and this lets us address the different challenge types and their corresponding components before worrying about refining the type for construction and deployment.

On the other hand, sometimes you want to be able to assert that *all* of the member of a union correspond to some shape of data, and you can always use `Pick<>` on the FormChallenge type to assert that at build time.

Other than that, this centralizes the types into locations in the codebase with well-known names.
@kensternberg-authentik kensternberg-authentik marked this pull request as ready for review February 18, 2026 19:00
@kensternberg-authentik kensternberg-authentik requested a review from a team as a code owner February 18, 2026 19:00
@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 8402c49
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69960c4be1e9e70008e4b8af
😎 Deploy Preview https://deploy-preview-20398--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.

@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 8402c49
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69960c4b147f4a00086bc818
😎 Deploy Preview https://deploy-preview-20398--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
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.26%. Comparing base (1df5401) to head (8402c49).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20398      +/-   ##
==========================================
- Coverage   93.30%   93.26%   -0.04%     
==========================================
  Files         981      981              
  Lines       55161    55161              
==========================================
- Hits        51468    51447      -21     
- Misses       3693     3714      +21     
Flag Coverage Δ
conformance 37.45% <ø> (+<0.01%) ⬆️
e2e 43.27% <ø> (+<0.01%) ⬆️
integration 22.38% <ø> (-0.05%) ⬇️
unit 91.50% <ø> (ø)
unit-migrate 91.54% <ø> (ø)

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.

@kensternberg-authentik kensternberg-authentik added area:frontend Features or issues related to the browser, TypeScript, Node.js, etc labels Feb 18, 2026
@github-actions
Copy link
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-8402c4955d23995c3ca059df27001286cefb0106
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-8402c4955d23995c3ca059df27001286cefb0106

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

@kensternberg-authentik kensternberg-authentik merged commit 2eedae7 into main Feb 18, 2026
105 checks passed
@kensternberg-authentik kensternberg-authentik deleted the web/maint/cleanup-type-files branch February 18, 2026 21:40
kensternberg-authentik added a commit that referenced this pull request Feb 18, 2026
…ionship

* main:
  web/admin: maintenance: centralize types that are used across stages (#20398)
  website/integrations: beszel: remove slug reference (#20393)
kensternberg-authentik added a commit that referenced this pull request Feb 18, 2026
…to web/flow/tablize-token-component-relationship-v3-error-handling

* web/flow/19999-tablize-token-component-relationship: (58 commits)
  web/admin: maintenance: centralize types that are used across stages (#20398)
  website/integrations: beszel: remove slug reference (#20393)
  web/admin: maintenance: give dialogs default exports (#20397)
  web: Fix element property names with custom attributes. (#20396)
  enterprise/providers/microsoft_entra: fix dangling comma (#20391)
  web/admin: bug: stage update forms not rendering, several modal form buttons missing (#20373)
  lifecycle: bump rac guacd base image (#20390)
  web: revert `tree-sitter` removal from lockfile (#20377)
  root: fix dependabot config for docker (#20380)
  website/docs: Fix broken link to flow executor (#20364)
  core: add cause to `ak_groups` deprecation event and logs (#20361)
  rbac: fix object permission request (#20304)
  enterprise/providers/ws_federation: fix incorrect metadata download URL (#20173)
  core, web: update translations (#20303)
  stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#20305)
  core: bump django-countries from 7.6.1 to 8.2.0 (#19459)
  web: bump the storybook group across 1 directory with 5 updates (#20130)
  web: bump pino from 10.3.0 to 10.3.1 in /web (#20133)
  core: bump github.com/pires/go-proxyproto from 0.10.0 to 0.11.0 (#20182)
  web: bump @patternfly/elements from 4.2.0 to 4.3.1 in /web (#20185)
  ...
kensternberg-authentik added a commit that referenced this pull request Feb 21, 2026
…to web/flow/20030-one-true-api

* web/flow/19999-tablize-token-component-relationship: (58 commits)
  web: Flesh out stage mapping error handling. (#20292)
  web/admin: maintenance: centralize types that are used across stages (#20398)
  website/integrations: beszel: remove slug reference (#20393)
  web/admin: maintenance: give dialogs default exports (#20397)
  web: Fix element property names with custom attributes. (#20396)
  enterprise/providers/microsoft_entra: fix dangling comma (#20391)
  web/admin: bug: stage update forms not rendering, several modal form buttons missing (#20373)
  lifecycle: bump rac guacd base image (#20390)
  web: revert `tree-sitter` removal from lockfile (#20377)
  root: fix dependabot config for docker (#20380)
  website/docs: Fix broken link to flow executor (#20364)
  core: add cause to `ak_groups` deprecation event and logs (#20361)
  rbac: fix object permission request (#20304)
  enterprise/providers/ws_federation: fix incorrect metadata download URL (#20173)
  core, web: update translations (#20303)
  stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#20305)
  core: bump django-countries from 7.6.1 to 8.2.0 (#19459)
  web: bump the storybook group across 1 directory with 5 updates (#20130)
  web: bump pino from 10.3.0 to 10.3.1 in /web (#20133)
  core: bump github.com/pires/go-proxyproto from 0.10.0 to 0.11.0 (#20182)
  ...
kensternberg-authentik added a commit that referenced this pull request Feb 23, 2026
…t-flow-inspector

* web/flow/20030-one-true-api: (58 commits)
  web: Flesh out stage mapping error handling. (#20292)
  web/admin: maintenance: centralize types that are used across stages (#20398)
  website/integrations: beszel: remove slug reference (#20393)
  web/admin: maintenance: give dialogs default exports (#20397)
  web: Fix element property names with custom attributes. (#20396)
  enterprise/providers/microsoft_entra: fix dangling comma (#20391)
  web/admin: bug: stage update forms not rendering, several modal form buttons missing (#20373)
  lifecycle: bump rac guacd base image (#20390)
  web: revert `tree-sitter` removal from lockfile (#20377)
  root: fix dependabot config for docker (#20380)
  website/docs: Fix broken link to flow executor (#20364)
  core: add cause to `ak_groups` deprecation event and logs (#20361)
  rbac: fix object permission request (#20304)
  enterprise/providers/ws_federation: fix incorrect metadata download URL (#20173)
  core, web: update translations (#20303)
  stages/authenticator_webauthn: Update FIDO MDS3 & Passkey aaguid blobs (#20305)
  core: bump django-countries from 7.6.1 to 8.2.0 (#19459)
  web: bump the storybook group across 1 directory with 5 updates (#20130)
  web: bump pino from 10.3.0 to 10.3.1 in /web (#20133)
  core: bump github.com/pires/go-proxyproto from 0.10.0 to 0.11.0 (#20182)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Features or issues related to the browser, TypeScript, Node.js, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants