Skip to content

web/admin: QOL: Add "Expiring in n days" and "Expiring today" notices to LicenseStatusCard - #24300

Merged
kensternberg-authentik merged 23 commits into
mainfrom
web/qol/better-expiration-date
Jul 23, 2026
Merged

kensternberg-authentik merged 23 commits into
mainfrom
web/qol/better-expiration-date

Conversation

@kensternberg-authentik

Copy link
Copy Markdown
Contributor

web/admin: QOL: Add “Expiring in n days” and “Expiring today” notices to LicenseStatusCard

This was pretty straightforward, and it’s a nice thing that people will notice.

Updated the Storybook stories: for the sake of testability, the dates are stable with respect to the current date: “Expiring Soon” is always 14 days out and “Expiring Today” is always 12 hours out.

image

Checklist

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

## What

This commit updates ak-enterprise-status-card with the following improvements:

- `@state()` replaced with `@property({ attribute: false })`, which gets us better linting and typechecking for client code
- `renderSummaryBadge()` uses a map expression instead of switch statement. Removes some boilerplate and clutter
- Slightly adjusted some margins, cleaning up the card. It’s a little shorter now, too.
- Fixed some misconceptions around what `msg(str` actually does. The remaining `msg` strings are all that lit-localize actually uses.
- Duplicate progress bars replaced with a single function that does the percentage and severity in a new scope, creating a tighter and more visually appealing codebase.
- Includes a complete Storybook story file with multiple stories for Valid, Expiring, Exceeded, Unlicensed and Loading

## Why

This mostly started as a test-case for ak-progress-bar. I needed a case where I could see the progress bar in use, and we didn’t have many of them. I decided to add a Storybook story for the Enterprise Status card, because it was a standalone component that used two of them, so it would be a good place to see how they looked stacked one atop another.

While I was rigging the Storybook, the linter complained that `@state()` wasn’t appropriate for properties that were being passed to the component. So I cleaned those. While trying to balance the whitespace around the `∞` symbol, I got frustrated with all the repetition and unbalanced code, and, well, things sorta spiraled out from there.

Anyway, it’s nicer now.
…ally the progressBar expression uses 'allowed' for the number of licensed users, and 'licensed' for the overall state of the product.
* main:
  policies: filter policy engine (#24025)
  endpoints/connectors/agent: fix auth schema for device endpoints (#24164)
  core, web: update translations (#24137)
  packages/django-dramatiq-postgres/broker: use positive state filter for pending messages (#24074)
  events: fix typo (#24161)
  root: fix agents test instructions (#24119)
  enterprise: fix enterprise_test skipping tests when used as class decorator (#24138)
  core: bump library/nginx from `ec4ed8b` to `b5a9a3c` in /website (#24146)
  core: bump github.com/pires/go-proxyproto from 0.14.0 to 0.15.0 (#24139)
  core: bump library/node from `ffc7838` to `715e55e` in /lifecycle/container (#24142)
  core: bump pnpm/pnpm from 11.12.0 to 11.13.0 in /lifecycle/container (#24144)
  core: bump library/golang from `ee5a795` to `3f1e064` in /lifecycle/container (#24143)
  core: bump pnpm/pnpm from 11.12.0 to 11.13.0 in /website (#24147)
  core: bump kubernetes from 36.0.2 to 36.0.3 (#24145)
  core: bump docker from 7.1.0 to 7.2.0 (#24149)
  web: bump webcomponent-qr-code from 1.3.0 to 2.0.0 in /web (#24152)
  core: bump regex from 1.12.4 to 1.13.0 (#24150)
  core: bump rust-toolchain from 1.97.0 to 1.97.1 (#24148)
  website/docs: cleanup 07-12: refresh contributor guidance (#23969)
  packages/ak-common/db: ignore empty passwords (#24127)
…es to LicenseStatusCard

This was pretty straightforward, and it’s a nice thing that people will notice.

Updated the Storybook stories: for the sake of testability, the dates are stable with respect to the current date: “Expiring Soon” is always 14 days out and “Expiring Today” is always 12 hours out.
@netlify

netlify Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit eb026d0
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a610616b5d6880008c01500
😎 Deploy Preview https://deploy-preview-24300--authentik-integrations.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

netlify Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 5b5aa4f
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a623a16bda0710008a92545
😎 Deploy Preview https://deploy-preview-24300--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 changed the base branch from main to web/typo/enterprise-status-card-properties July 22, 2026 17:57
@kensternberg-authentik
kensternberg-authentik marked this pull request as ready for review July 22, 2026 17:57
@kensternberg-authentik
kensternberg-authentik requested a review from a team as a code owner July 22, 2026 17:57
@netlify

netlify Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit eb026d0
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a61061661c9130008c303e3
😎 Deploy Preview https://deploy-preview-24300--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.

const today = new Date();
if (summary === LicenseSummaryStatusEnum.ExpirySoon && valid) {
const gap = differenceInSeconds(valid, today);
// prettier-ignore

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someday I'm gonna figure out why prettier hates the when/with syntax so damn much.

## What

This commit updates ak-enterprise-status-card with the following improvements:

- `@state()` replaced with `@property({ attribute: false })`, which gets us better linting and typechecking for client code
- `renderSummaryBadge()` uses a map expression instead of switch statement. Removes some boilerplate and clutter
- Slightly adjusted some margins, cleaning up the card. It’s a little shorter now, too.
- Fixed some misconceptions around what `msg(str` actually does. The remaining `msg` strings are all that lit-localize actually uses.
- Duplicate progress bars replaced with a single function that does the percentage and severity in a new scope, creating a tighter and more visually appealing codebase.
- Includes a complete Storybook story file with multiple stories for Valid, Expiring, Exceeded, Unlicensed and Loading

## Why

This mostly started as a test-case for ak-progress-bar. I needed a case where I could see the progress bar in use, and we didn’t have many of them. I decided to add a Storybook story for the Enterprise Status card, because it was a standalone component that used two of them, so it would be a good place to see how they looked stacked one atop another.

While I was rigging the Storybook, the linter complained that `@state()` wasn’t appropriate for properties that were being passed to the component. So I cleaned those. While trying to balance the whitespace around the `∞` symbol, I got frustrated with all the repetition and unbalanced code, and, well, things sorta spiraled out from there.

Anyway, it’s nicer now.
…ally the progressBar expression uses 'allowed' for the number of licensed users, and 'licensed' for the overall state of the product.
…es to LicenseStatusCard

This was pretty straightforward, and it’s a nice thing that people will notice.

Updated the Storybook stories: for the sake of testability, the dates are stable with respect to the current date: “Expiring Soon” is always 14 days out and “Expiring Today” is always 12 hours out.
@BeryJu
BeryJu force-pushed the web/qol/better-expiration-date branch from 629f716 to eb026d0 Compare July 22, 2026 18:04
@github-actions

github-actions Bot commented Jul 22, 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-5b5aa4f46f802127b03b70d7a2b949fdbcaf2a8b
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-5b5aa4f46f802127b03b70d7a2b949fdbcaf2a8b

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

@codecov

codecov Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.50%. Comparing base (539da39) to head (5b5aa4f).
⚠️ Report is 14 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24300      +/-   ##
==========================================
- Coverage   93.51%   93.50%   -0.02%     
==========================================
  Files        1062     1063       +1     
  Lines       63854    64087     +233     
  Branches      424      424              
==========================================
+ Hits        59716    59924     +208     
- Misses       4138     4163      +25     
Flag Coverage Δ
conformance 35.44% <ø> (-0.06%) ⬇️
e2e 40.39% <ø> (-0.07%) ⬇️
integration 31.97% <ø> (-0.05%) ⬇️
rust 0.00% <ø> (ø)
unit 91.87% <ø> (-0.83%) ⬇️
unit-migrate 92.71% <ø> (-0.02%) ⬇️

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.

Base automatically changed from web/typo/enterprise-status-card-properties to main July 23, 2026 01:05
…ration-date' into web/qol/better-expiration-date

* refs/remotes/origin/web/qol/better-expiration-date: (104 commits)
  web/admin: QOL: Add “Expiring in `n` days” and “Expiring today” notices to LicenseStatusCard
  Adding the '@file' comment.
  The language between licensed and isLicensed was confusing, so internally the progressBar expression uses 'allowed' for the number of licensed users, and 'licensed' for the overall state of the product.
  The severities ought to be in order, otherwise it's a mental pause.
  Another typo.
  Noticed a typo; prettier had an opinion.
  web/maint: clean-up ak-enterprise-status-card
  Some revisions to the enterprise status card.
  web: exclude dependabot-materialized link deps from workspace glob (#24297)
  core: fix object attributes not setting allow_blank (#24298)
  web: add build start/end log to build script (#24296)
  root: fix CODEOWNERS paths (#24259)
  core: object attributes - minor fixes (#24292)
  core: bump thiserror from 2.0.18 to 2.0.19 (#24281)
  core: bump serde from 1.0.228 to 1.0.229 (#24282)
  website/docs: update release notes for 2026.5.6 (#24293)
  ci: bump actions/setup-python from 6.3.0 to 7.0.0 in /.github/actions/setup (#24286)
  core, web: update translations (#24276)
  core: bump github.com/getsentry/sentry-go from 0.47.0 to 0.48.0 (#24277)
  core: bump pnpm/pnpm from 11.14.0 to 11.15.0 in /lifecycle/container (#24278)
  ...
* main:
  web/admin: enterprise status card properties (#24170)
  web/elements: update the progress bar (#24134)
  web/maint: upgrade ak-divider (#24082)
  web/bug: harmonize and make routine the display of tasks (part 6: sch… (#23859)
  web/maint: upgrade ak-toggle-group (#24038)
  web/bug: harmonize and make routine the display of schedules, part 2: Description lists (#23856)
@kensternberg-authentik
kensternberg-authentik merged commit f6e4c5f into main Jul 23, 2026
194 of 196 checks passed
@kensternberg-authentik
kensternberg-authentik deleted the web/qol/better-expiration-date branch July 23, 2026 16:51
kensternberg-authentik added a commit that referenced this pull request Jul 23, 2026
* main: (172 commits)
  web/admin: QOL: Add "Expiring in `n` days" and "Expiring today" notices to LicenseStatusCard (#24300)
  stages/authenticator: protect devices from stage deletion (#24324)
  core: prompt securely when hashing passwords (#24126)
  events: show account changes in user event history (#24323)
  website/integrations: The Lounge: cleanup (#23628)
  ci: bump taiki-e/install-action from 2.83.4 to 2.84.0 in /.github/actions/setup (#24312)
  ci: add working dir prefix to file paths (#24319)
  core, web: update translations (#24304)
  packages/ak-common/tracing: make console subscriber optional (#24219)
  website: bump the build group in /website with 6 updates (#24305)
  core: bump pnpm/pnpm from 11.15.0 to 11.15.1 in /lifecycle/container (#24308)
  core: bump pnpm/pnpm from 11.15.0 to 11.15.1 in /website (#24309)
  core: bump constructs from 10.6.0 to 10.7.0 (#24310)
  core: bump uuid from 1.23.5 to 1.24.0 (#24311)
  enterprise/providers/ws_fed: add SAML 1.1 support (#23851)
  web/admin: enterprise status card properties (#24170)
  web/elements: update the progress bar (#24134)
  web/maint: upgrade ak-divider (#24082)
  web/bug: harmonize and make routine the display of tasks (part 6: sch… (#23859)
  web/maint: upgrade ak-toggle-group (#24038)
  ...
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