Skip to content

Web: Controllers cleanup#14616

Merged
GirlBossRush merged 8 commits intomainfrom
controllers-cleanup
May 26, 2025
Merged

Web: Controllers cleanup#14616
GirlBossRush merged 8 commits intomainfrom
controllers-cleanup

Conversation

@GirlBossRush
Copy link
Contributor

@GirlBossRush GirlBossRush commented May 21, 2025

Details

This PR addresses a related category of issues surrounding Lit's context controllers.

  • Controllers are now consistently mounted via this.addController, ensuring their host callbacks are invoked when changes occur.
  • Initial values provided by the server are synchronously to the controller's host,
    resulting in immediate access the context and fewer re-renders.
  • Changes applied to context such as branding propagate now consistently propagate to the host.
  • Controllers now abort requests when the host is disconnected

Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

@GirlBossRush GirlBossRush self-assigned this May 21, 2025
@GirlBossRush GirlBossRush requested a review from a team as a code owner May 21, 2025 13:53
@netlify
Copy link

netlify bot commented May 21, 2025

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit caf671d
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/683443b822c6f70008c33f87

@GirlBossRush GirlBossRush force-pushed the sidebar-version-regression-v1 branch from a2c27cb to a0145c7 Compare May 21, 2025 16:27
@GirlBossRush GirlBossRush force-pushed the controllers-cleanup branch from 721ed97 to 295ddae Compare May 21, 2025 16:28
@GirlBossRush GirlBossRush force-pushed the sidebar-version-regression-v1 branch from a0145c7 to d5f3bb4 Compare May 21, 2025 19:38
@GirlBossRush GirlBossRush force-pushed the controllers-cleanup branch from 295ddae to 1b6f9f2 Compare May 21, 2025 19:38
@GirlBossRush GirlBossRush force-pushed the sidebar-version-regression-v1 branch from d5f3bb4 to 2e3cd09 Compare May 21, 2025 20:13
@GirlBossRush GirlBossRush force-pushed the controllers-cleanup branch from 1b6f9f2 to c1fdcdf Compare May 21, 2025 20:13
Base automatically changed from sidebar-version-regression-v1 to main May 22, 2025 15:00
@GirlBossRush GirlBossRush force-pushed the controllers-cleanup branch from c1fdcdf to 2f59a75 Compare May 23, 2025 13:54
@netlify
Copy link

netlify bot commented May 23, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit caf671d
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/683443b886efca00084047a9
😎 Deploy Preview https://deploy-preview-14616--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.

@codecov
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.77%. Comparing base (620c95d) to head (caf671d).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14616      +/-   ##
==========================================
+ Coverage   92.75%   92.77%   +0.01%     
==========================================
  Files         814      814              
  Lines       41901    41901              
==========================================
+ Hits        38867    38872       +5     
+ Misses       3034     3029       -5     
Flag Coverage Δ
e2e 47.77% <ø> (+<0.01%) ⬆️
integration 24.42% <ø> (ø)
unit 90.58% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented May 23, 2025

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-caf671d7865402666224fd7b55230c9947a01ee4
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-caf671d7865402666224fd7b55230c9947a01ee4

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

Copy link
Contributor

@kensternberg-authentik kensternberg-authentik left a comment

Choose a reason for hiding this comment

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

This is actually very good. I would have Jens double check the FlowExecutor, just because I'm less familiar with it than I should be.

}
this.flowSlug = this.brand.flowUserSettings;

if (!this.flowSlug) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, no. Naked if statements should be forbidden by Prettier.

public brand!: CurrentBrand;

public get brandingTitle(): string {
return this.brand.brandingTitle || DefaultBrand.brandingTitle;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would ?? make more sense here (and there, and there, too)?

@GirlBossRush GirlBossRush force-pushed the controllers-cleanup branch 3 times, most recently from 77da31a to 2b233ec Compare May 24, 2025 20:42
@GirlBossRush GirlBossRush force-pushed the controllers-cleanup branch from 2b233ec to 35d4d0d Compare May 26, 2025 10:21
@GirlBossRush GirlBossRush merged commit c28b65a into main May 26, 2025
94 checks passed
@GirlBossRush GirlBossRush deleted the controllers-cleanup branch May 26, 2025 11:06
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