Skip to content

web: fix table fetch races and search select e2e lookups - #27059

Merged
GirlBossRush merged 4 commits into
mainfrom
web/table-loading-before-first-fetch
Oct 20, 2026
Merged

GirlBossRush merged 4 commits into
mainfrom
web/table-loading-before-first-fetch

Conversation

@GirlBossRush

@GirlBossRush GirlBossRush commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes two table fetch bugs that both showed up as e2e flakes. First, since #26423 took the visibility check out of `renderRows`, a table whose first fetch is deferred until it's visible falls through to "no results" -- along with the empty state's own create button -- until the request starts. That duplicate button made the CAPTCHA e2e's "New Flow" click fail strict mode now and then. The loading state now shows whenever there's no data yet, which is what #26423 describes, and tables still don't flip back to loading once they have data.

Second, `fetch()` just returned while a request was in flight, so a search typed during the first load got dropped -- the box shows your query, the table shows everything. Now the request is queued and runs once the in-flight one settles, with whatever search and page are current by then, and repeated calls collapse into one follow-up.

While I was in there, the e2e `selectSearchValue` helper now types a filter for plain-text RegExp patterns too, not just strings. Pickers only load their first page, so on a dev instance with enough leftover test flows the stock defaults fell off it and the provider wizard tests failed for no reason. Options the server doesn't search, like the blank choice, still fall back to the unfiltered list.

Testing: new browser tests for both table fixes (they fail on main), unit and browser suites pass, and the full e2e suite passes locally apart from the known user switching flake. The provider tests fail on the old helper with 40 extra flows ahead of the defaults and pass on the new one.

Since #26423 dropped the visibility check from renderRows, a table whose
first fetch is deferred until it scrolls into view rendered its empty
state, including the empty state's own create button, until that fetch
started. Render the loading state whenever there's no data yet, which is
what #26423 describes, while still not reverting to it once data exists.
@netlify

netlify Bot commented Oct 20, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

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

@kensternberg-authentik kensternberg-authentik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good. Let's see if that works.

@GirlBossRush
GirlBossRush marked this pull request as ready for review October 20, 2026 15:48
@GirlBossRush
GirlBossRush requested a review from a team as a code owner October 20, 2026 15:48
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.38%. Comparing base (9896137) to head (1e23c48).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27059      +/-   ##
==========================================
+ Coverage   92.36%   92.38%   +0.02%     
==========================================
  Files        1188     1189       +1     
  Lines       80059    80129      +70     
  Branches     4351     4351              
==========================================
+ Hits        73944    74027      +83     
+ Misses       6049     6036      -13     
  Partials       66       66              
Flag Coverage Δ
conformance 32.31% <ø> (+<0.01%) ⬆️
e2e 37.00% <ø> (+<0.01%) ⬆️
integration 29.20% <ø> (+<0.01%) ⬆️
rust 44.42% <ø> (ø)
unit 94.02% <ø> (+0.01%) ⬆️
unit-migrate 94.02% <ø> (+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.

Table.fetch() returned early while a request was in flight, so a search
typed during the first load was silently dropped: the box showed the
query while the table kept the unfiltered results. Queue the request
instead and run it once the in-flight one settles, with whatever
parameters are current by then. Repeated requests collapse into one
follow-up.
@GirlBossRush GirlBossRush changed the title web/elements: show the table loading state until the first response web/elements: fix table empty-state flash and dropped searches Oct 20, 2026
@GirlBossRush GirlBossRush self-assigned this Oct 20, 2026
@GirlBossRush GirlBossRush added the area:frontend Features or issues related to the browser, TypeScript, Node.js, etc label Oct 20, 2026
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Playwright e2e

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

gh run download 39476718234 -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-1e23c483cd17fbea30e63e7b181a7a76eee60578
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-1e23c483cd17fbea30e63e7b181a7a76eee60578

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

selectSearchValue only typed a filter for string patterns, so a RegExp
like /default-authentication-flow/ searched the picker's first page of
options. Once a dev instance accumulates enough test flows, the stock
defaults drop off that page and unrelated provider and brand tests fail.
Type the pattern's text as a filter when it's plain, and fall back to
the unfiltered list for options the server doesn't search, such as the
blank choice.
@GirlBossRush GirlBossRush changed the title web/elements: fix table empty-state flash and dropped searches web: fix table fetch races and search select e2e lookups Oct 20, 2026
@GirlBossRush
GirlBossRush merged commit 1b68f3c into main Oct 20, 2026
147 checks passed
@GirlBossRush
GirlBossRush deleted the web/table-loading-before-first-fetch branch October 20, 2026 19:56
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Oct 20, 2026
kensternberg-authentik added a commit that referenced this pull request Oct 21, 2026
* main:
  lib/tracing: fix sentry tracing when otel is enabled (#27066)
  website/integrations: audiobookshelf: Fix Post Logout URI (#27074)
  web/user: fix agents tab flashing without license (#27069)
  root: bump cert-related deps due to emudhra (#27068)
  web: fix table fetch races and search select e2e lookups (#27059)
  core: bump astral-sh/uv from 0.13.1 to 0.13.3 in /lifecycle/container (#27037)
kensternberg-authentik added a commit that referenced this pull request Oct 21, 2026
* main: (27 commits)
  lib/tracing: fix sentry tracing when otel is enabled (#27066)
  website/integrations: audiobookshelf: Fix Post Logout URI (#27074)
  web/user: fix agents tab flashing without license (#27069)
  root: bump cert-related deps due to emudhra (#27068)
  web: fix table fetch races and search select e2e lookups (#27059)
  core: bump astral-sh/uv from 0.13.1 to 0.13.3 in /lifecycle/container (#27037)
  policies: fix warning from setting non-string tracing data (#27062)
  root: annotate hot paths (#27052)
  website/docs: contributing: add guidelines for vendor contributions (#27032)
  providers/saml: Add ability to select encryption algorithm (#27009)
  lib: set postgres timezone on connection (#27053)
  core: add postgres connection info (#27024)
  ci: fix cargo deny for basic-toml (#27054)
  web/elements: keep ak-array-input edits through form submission (#27045)
  enterprise: optimize middleware (#27015)
  core: bump goauthentik/platform-ssh from 26.04-ak-0.72.0 to 26.04-ak-0.72.1 in /tests/e2e (#27038)
  core: bump ruff from 0.16.10 to 0.17.0 (#27044)
  core: bump sentry-sdk from 2.71.0 to 2.72.0 (#27043)
  core: bump django-postgres-extra from 3.0.0 to 3.0.1 (#27042)
  core: bump python-kadmin-rs from 0.7.4 to 0.7.5 (#27040)
  ...
kensternberg-authentik added a commit that referenced this pull request Nov 5, 2026
* main: (1416 commits)
  lifecycle/container: add a distroless version of the server image (#26321)
  ci: run tests in the server image (#26510)
  packages/client-ts: Generate imports with `.js` extensions (#27029)
  core: bump djangorestframework from 3.18.1 to 3.18.3 (#26838)
  website/docs: add release notes for `2026.8.5` (#27084)
  website/docs: add release notes for `2026.5.8` (#27083)
  core, web: update translations (#27035)
  core: bump twilio from 9.11.2 to 9.12.0 (#27081)
  core: bump cachetools from 7.2.2 to 7.2.3 (#27082)
  core: bump paramiko from 5.0.0 to 5.0.1 (#27080)
  core: bump ruff from 0.17.0 to 0.17.1 (#27077)
  lib/tracing: fix sentry tracing when otel is enabled (#27066)
  website/integrations: audiobookshelf: Fix Post Logout URI (#27074)
  web/user: fix agents tab flashing without license (#27069)
  root: bump cert-related deps due to emudhra (#27068)
  web: fix table fetch races and search select e2e lookups (#27059)
  core: bump astral-sh/uv from 0.13.1 to 0.13.3 in /lifecycle/container (#27037)
  policies: fix warning from setting non-string tracing data (#27062)
  root: annotate hot paths (#27052)
  website/docs: contributing: add guidelines for vendor contributions (#27032)
  ...
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

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants