Repository navigation
web: fix table fetch races and search select e2e lookups - #27059
Conversation
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.
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
kensternberg-authentik
left a comment
There was a problem hiding this comment.
Good. Let's see if that works.
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
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.
Playwright e2eDownload 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-reportInstallation instructionsInstructions for docker-composeAdd the following block to your 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)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your 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-1e23c483cd17fbea30e63e7b181a7a76eee60578Afterwards, 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.
* 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)
* 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) ...
* 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) ...
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.