Skip to content

web/table: fetch on first render when already visible - #22376

Merged
GirlBossRush merged 15 commits into
goauthentik:mainfrom
GirlBossRush:task-triage-rac-endpoint-modal
May 18, 2026
Merged

GirlBossRush merged 15 commits into
goauthentik:mainfrom
GirlBossRush:task-triage-rac-endpoint-modal

Conversation

@GirlBossRush

@GirlBossRush GirlBossRush commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Tables inside <ak-modal> rendered empty until the user clicked the refresh button — surfaced by a beta tester on the 2026.5 RC against the RAC endpoint launcher in the user library.

Root cause

The native-<dialog> modal migration (#21336) taught AKModal.updated() to force visible = true on its slotted child. Table.firstUpdated() was delegating to #synchronizeRefreshSchedule(), which only flushes a previously deferred refresh. With visibility forced on before the first update cycle, no deferred refresh was ever queued — so the synchronizer no-op'd and nothing fetched.

Fix

Call fetch() directly from Table.firstUpdated(). fetch() already handles both states correctly:

  • table visible → issue the request immediately.
  • table not yet visible → queue the deferred refresh that the synchronizer flushes on visibility flip.

The change therefore also covers any future caller that mounts a Table already-visible, not just the modal path.

 protected override firstUpdated(changedProperties: PropertyValues<this>): void {
     super.firstUpdated(changedProperties);
-    this.#synchronizeRefreshSchedule();
+    this.fetch();
 }

Test plan

  • Manually reproduced against the user-library RAC endpoint launcher in the playpen dev stack: modal opens empty on main, populates without a manual refresh with this change.
  • Playwright e2e regression test added at web/test/browser/rac-launch-modal.test.ts — seeds a RAC provider + two endpoints via the API, opens the launcher modal, asserts the endpoint rows appear without any user interaction. Fails on main, passes with this change.
  • make lint-fix clean.

Disclosure

Triaged and authored end-to-end by an agent running in a sandbox against goauthentik/authentik@main. Reviewed and shipped by @GirlBossRush.

@GirlBossRush
GirlBossRush requested a review from a team as a code owner May 15, 2026 04:07
@netlify

netlify Bot commented May 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

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

netlify Bot commented May 15, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 5ecdf74
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a069c1b0db0570008d93bf8
😎 Deploy Preview https://deploy-preview-22376--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 May 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.24%. Comparing base (d1baf98) to head (05ae64a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #22376       +/-   ##
===========================================
+ Coverage   80.97%   93.24%   +12.26%     
===========================================
  Files        1032     1032               
  Lines       60055    60057        +2     
  Branches      400      400               
===========================================
+ Hits        48632    56001     +7369     
+ Misses      11423     4056     -7367     
Flag Coverage Δ
conformance 36.61% <ø> (+<0.01%) ⬆️
e2e 41.85% <ø> (+<0.01%) ⬆️
integration 32.55% <ø> (-0.50%) ⬇️
rust 0.00% <ø> (ø)
unit 92.20% <ø> (+13.47%) ⬆️
unit-migrate 92.25% <ø> (+13.47%) ⬆️

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.

Comment thread web/e2e/fixtures/FormFixture.ts Resolved
Comment thread web/src/elements/table/Table.ts Resolved
GirlBossRush and others added 8 commits May 17, 2026 20:31
Tables inside `<ak-modal>` rendered empty until the user clicked the
refresh button. The 2026.5 RC native-`<dialog>` migration taught
`AKModal.updated()` to force `visible = true` on its slotted child, but
`Table.firstUpdated()` was delegating to `#synchronizeRefreshSchedule()`,
which only flushes a *previously deferred* refresh. With visibility
forced on before the first update cycle, no deferred refresh was ever
queued, so the synchronizer no-op'd and nothing fetched.

Switch the first-update hook to call `fetch()` directly. `fetch()`
already handles both states correctly: if the table is visible it
issues the request immediately, and if it isn't it queues the deferred
refresh that the synchronizer flushes when visibility flips on. Beyond
the modal case this also covers any future caller that mounts a Table
already-visible.

Reproduced and verified against the user-library RAC endpoint launcher
(the surface from the beta report). Added a Playwright e2e
(`rac-launch-modal.test.ts`) that seeds a RAC provider + two endpoints
via the API, opens the launcher, and asserts the endpoint rows appear
without a manual refresh — fails on `main`, passes with this change.

A 2026.5 backport will follow as a separate PR.

Co-Authored-By: Agent (authentik-m-triage-rac-proper-shared-lilac) <[email protected]>
`changeme` in the playpen-specific default for `AK_TEST_BOOTSTRAP_TOKEN`
trips the spellcheck lint job. Add an inline `cspell:ignore` directive
so the fallback can stay (CI sets the env var so the default is only
used locally inside playpen sandboxes).
@GirlBossRush
GirlBossRush force-pushed the task-triage-rac-endpoint-modal branch from 2eed554 to c12173c Compare May 17, 2026 18:38
@netlify

netlify Bot commented May 18, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

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

@GirlBossRush
GirlBossRush enabled auto-merge (squash) May 18, 2026 03:47
@GirlBossRush
GirlBossRush merged commit 1c82199 into goauthentik:main May 18, 2026
210 of 217 checks passed
@authentik-automation

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.5 created: #22438

kensternberg-authentik added a commit that referenced this pull request May 18, 2026
* main: (31 commits)
  core: bump aws-cdk-lib from 2.253.0 to 2.253.1 (#22378)
  website: Docs and README new screenshots (#22341)
  root: Update CODEOWNERS for spellcheck dictionaries (#22408)
  core, web: update translations (#22372)
  translate: Updates for project authentik and language fr_FR (#22366)
  core: align django-channels-postgres psycopg[pool] floor with #22201 (#22363)
  core: bump msgraph-sdk from 1.56.0 to 1.57.0 (#22379)
  ci: bump actions/create-github-app-token from 3.1.1 to 3.2.0 (#22381)
  core: bump types-docker from 7.1.0.20260409 to 7.1.0.20260508 (#22417)
  core: bump types-ldap3 from 2.9.13.20260408 to 2.9.13.20260508 (#22423)
  core: bump types-zxcvbn from 4.5.0.20260408 to 4.5.0.20260508 (#22418)
  web/table: fetch on first render when already visible (#22376)
  web: bump stylelint from 17.11.0 to 17.11.1 in /web (#22430)
  web: bump @typescript/native-preview from 7.0.0-dev.20260507.1 to 7.0.0-dev.20260510.1 in /web (#22426)
  web: bump lit from 3.3.2 to 3.3.3 in /web (#22427)
  web: bump @lit/localize-tools from 0.8.1 to 0.8.2 in /web (#22428)
  web: bump dompurify from 3.4.2 to 3.4.3 in /web (#22429)
  core: bump types-channels from 4.3.0.20260421 to 4.3.0.20260508 (#22419)
  web: bump @codemirror/legacy-modes from 6.5.2 to 6.5.3 in /web (#22431)
  core: bump types-requests from 2.33.0.20260503 to 2.33.0.20260508 (#22420)
  ...
kensternberg-authentik added a commit that referenced this pull request May 18, 2026
* main: (53 commits)
  core: bump aws-cdk-lib from 2.253.0 to 2.253.1 (#22378)
  website: Docs and README new screenshots (#22341)
  root: Update CODEOWNERS for spellcheck dictionaries (#22408)
  core, web: update translations (#22372)
  translate: Updates for project authentik and language fr_FR (#22366)
  core: align django-channels-postgres psycopg[pool] floor with #22201 (#22363)
  core: bump msgraph-sdk from 1.56.0 to 1.57.0 (#22379)
  ci: bump actions/create-github-app-token from 3.1.1 to 3.2.0 (#22381)
  core: bump types-docker from 7.1.0.20260409 to 7.1.0.20260508 (#22417)
  core: bump types-ldap3 from 2.9.13.20260408 to 2.9.13.20260508 (#22423)
  core: bump types-zxcvbn from 4.5.0.20260408 to 4.5.0.20260508 (#22418)
  web/table: fetch on first render when already visible (#22376)
  web: bump stylelint from 17.11.0 to 17.11.1 in /web (#22430)
  web: bump @typescript/native-preview from 7.0.0-dev.20260507.1 to 7.0.0-dev.20260510.1 in /web (#22426)
  web: bump lit from 3.3.2 to 3.3.3 in /web (#22427)
  web: bump @lit/localize-tools from 0.8.1 to 0.8.2 in /web (#22428)
  web: bump dompurify from 3.4.2 to 3.4.3 in /web (#22429)
  core: bump types-channels from 4.3.0.20260421 to 4.3.0.20260508 (#22419)
  web: bump @codemirror/legacy-modes from 6.5.2 to 6.5.3 in /web (#22431)
  core: bump types-requests from 2.33.0.20260503 to 2.33.0.20260508 (#22420)
  ...
GirlBossRush added a commit that referenced this pull request May 18, 2026
…2376 to version-2026.5) (#22438)

web/table: fetch on first render when already visible (#22376)

* web/table: fetch on first render when already visible

Tables inside `<ak-modal>` rendered empty until the user clicked the
refresh button. The 2026.5 RC native-`<dialog>` migration taught
`AKModal.updated()` to force `visible = true` on its slotted child, but
`Table.firstUpdated()` was delegating to `#synchronizeRefreshSchedule()`,
which only flushes a *previously deferred* refresh. With visibility
forced on before the first update cycle, no deferred refresh was ever
queued, so the synchronizer no-op'd and nothing fetched.

Switch the first-update hook to call `fetch()` directly. `fetch()`
already handles both states correctly: if the table is visible it
issues the request immediately, and if it isn't it queues the deferred
refresh that the synchronizer flushes when visibility flips on. Beyond
the modal case this also covers any future caller that mounts a Table
already-visible.

Reproduced and verified against the user-library RAC endpoint launcher
(the surface from the beta report). Added a Playwright e2e
(`rac-launch-modal.test.ts`) that seeds a RAC provider + two endpoints
via the API, opens the launcher, and asserts the endpoint rows appear
without a manual refresh — fails on `main`, passes with this change.

A 2026.5 backport will follow as a separate PR.



* web/test: silence cspell on AK_TEST_BOOTSTRAP_TOKEN fallback

`changeme` in the playpen-specific default for `AK_TEST_BOOTSTRAP_TOKEN`
trips the spellcheck lint job. Add an inline `cspell:ignore` directive
so the fallback can stay (CI sets the env var so the default is only
used locally inside playpen sandboxes).

* Flesh out RAC test coverage.

* Use simple search for applications list.

* Add order.

* Ignore playwright result.

* Remove unused.

* Tidy for test.

* Fix test selectors.

* Fix overlap.

* Defer to connected callback.

* Use consistent Patternfly input outline.

* Clean up labels.

* Only trigger navigation on non-current entries.

* Ensure that selected type is retained.

---------

Co-authored-by: Teffen Ellis <[email protected]>
Co-authored-by: Agent (authentik-m-triage-rac-proper-shared-lilac) <[email protected]>
kensternberg-authentik added a commit that referenced this pull request May 18, 2026
…ken-content-stylings

* web/flow/expose-flow-in-lightdom: (34 commits)
  Fix spacing and arrangement of 'Remember Me', now that it's in the lightDOM.
  Some minor nitpicking and cleanup.  Lots of comments; removed some dead code.
  Merge mess.
  core: bump aws-cdk-lib from 2.253.0 to 2.253.1 (#22378)
  website: Docs and README new screenshots (#22341)
  root: Update CODEOWNERS for spellcheck dictionaries (#22408)
  core, web: update translations (#22372)
  translate: Updates for project authentik and language fr_FR (#22366)
  core: align django-channels-postgres psycopg[pool] floor with #22201 (#22363)
  core: bump msgraph-sdk from 1.56.0 to 1.57.0 (#22379)
  ci: bump actions/create-github-app-token from 3.1.1 to 3.2.0 (#22381)
  core: bump types-docker from 7.1.0.20260409 to 7.1.0.20260508 (#22417)
  core: bump types-ldap3 from 2.9.13.20260408 to 2.9.13.20260508 (#22423)
  core: bump types-zxcvbn from 4.5.0.20260408 to 4.5.0.20260508 (#22418)
  web/table: fetch on first render when already visible (#22376)
  web: bump stylelint from 17.11.0 to 17.11.1 in /web (#22430)
  web: bump @typescript/native-preview from 7.0.0-dev.20260507.1 to 7.0.0-dev.20260510.1 in /web (#22426)
  web: bump lit from 3.3.2 to 3.3.3 in /web (#22427)
  web: bump @lit/localize-tools from 0.8.1 to 0.8.2 in /web (#22428)
  web: bump dompurify from 3.4.2 to 3.4.3 in /web (#22429)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants