Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Several readiness signals can report completion prematurely or never appear, and the loading overlay ignores its supplied skeleton.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Improves Admin UI E2E stability by exposing loading/readiness signals and simplifying Playwright interactions.
Changes:
- Adds shared loading overlays and stable table DOM behavior.
- Disables switches during asynchronous updates.
- Replaces retry-heavy Playwright helpers with readiness-based waits.
File summaries
| File | Description |
|---|---|
js/libs/ui-shared/src/main.ts |
Exports loading components. |
js/libs/ui-shared/src/controls/table/KeycloakDataTable.tsx |
Adds overlays, readiness marker, and stable row keys. |
js/libs/ui-shared/src/controls/SwitchControl.tsx |
Adds switch IDs and disabled state. |
js/libs/ui-shared/src/controls/LoadingOverlay.tsx |
Introduces loading overlay and skeleton. |
js/libs/ui-shared/src/controls/loading-overlay.module.css |
Styles loading overlays. |
js/libs/ui-shared/src/controls/KeycloakSpinner.tsx |
Adds a test selector. |
js/libs/ui-shared/src/continue-cancel/ContinueCancelModal.tsx |
Adds modal action selectors. |
js/libs/ui-shared/src/buttons/FormSubmitButton.tsx |
Exposes submission state. |
js/apps/admin-ui/test/workflows/main.spec.ts |
Removes forced switch click. |
js/apps/admin-ui/test/utils/table.ts |
Simplifies table helpers. |
js/apps/admin-ui/test/utils/modal.ts |
Adds modal visibility assertions. |
js/apps/admin-ui/test/utils/loading.ts |
Adds loading wait helper. |
js/apps/admin-ui/test/utils/form.ts |
Simplifies form and switch interactions. |
js/apps/admin-ui/test/realm-settings/userprofile.ts |
Uses stable switch and user-table helpers. |
js/apps/admin-ui/test/identity-providers/saml.spec.ts |
Reuses table assertion helper. |
js/apps/admin-ui/test/identity-providers/main.ts |
Waits for mapper loading. |
js/apps/admin-ui/test/autentication/flow.ts |
Uses deterministic keyboard reordering. |
js/apps/admin-ui/src/workflows/WorkflowsSection.tsx |
Stabilizes workflow toggles and refreshes. |
js/apps/admin-ui/src/user/EditUser.tsx |
Adds tab readiness marker. |
js/apps/admin-ui/src/realm-settings/PoliciesTab.tsx |
Correctly places switch test selector. |
js/apps/admin-ui/src/realm-settings/LoginTab.tsx |
Disables switches during saves. |
js/apps/admin-ui/src/identity-providers/component/SwitchField.tsx |
Normalizes switch IDs and selectors. |
js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx |
Refreshes mapper data after navigation. |
js/apps/admin-ui/src/components/users/UserDataTable.tsx |
Adds users-table readiness marker. |
js/apps/admin-ui/src/clients/keys/SamlKeys.tsx |
Restores switch state on cancellation. |
js/apps/admin-ui/src/clients/ClientDetails.tsx |
Adds tab readiness marker. |
js/apps/admin-ui/src/authentication/FlowDetails.tsx |
Signals reorder completion. |
js/apps/admin-ui/src/authentication/components/FlowRow.tsx |
Adds drag-handle selector. |
js/apps/admin-ui/README.md |
Documents Playwright loading conventions. |
Review details
Suppressed comments (1)
js/libs/ui-shared/src/controls/LoadingOverlay.tsx:49
- The supplied
skeletonis never rendered: any truthy value is replaced with a new defaultTableLoadingSkeleton, so callers' custom content androwssetting are ignored. Render the supplied node directly.
{skeleton ? <TableLoadingSkeleton /> : <KeycloakSpinner />}
- Files reviewed: 29/29 changed files
- Comments generated: 6
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
A critical test contract regression and several unresolved loading, concurrency, locator, and accessibility issues block approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (5)
Previously missed (4) — in code that hasn't changed since the last review.
js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx:356
- Entering
/mappersalready mounts a fresh table (RoutableTabsusesmountOnEnter/unmountOnExit, and mapper forms are separate routes), so this mount effect increments the signal and starts a second mapper request immediately after the first. Remove this route-driven refresh; the existing signal refresh used after deletion can remain.
js/apps/admin-ui/src/identity-providers/component/SwitchField.tsx:34 FormGroupFieldstill setsfieldId={label}, so changing the switch ID tofieldNamedisconnects the visible<label>from its control and clicking the label no longer toggles the switch. Keep the ID aligned withlabel, or extendFormGroupFieldto receive the same field ID.
js/apps/admin-ui/src/workflows/WorkflowsSection.tsx:143- Only disabling the matching row allows another workflow toggle to start and overwrite
togglingWorkflowId; when either request finishes, itsfinallycan then re-enable switches while the other save is still pending. Disable all workflow switches while one ID is set, or track pending IDs in a set.
js/apps/admin-ui/test/utils/table.ts:28 - The strict string match is case-sensitive and breaks the existing SPIFFE caller:
spiffe.spec.ts:31requestsSpiffe, while the provider created byAddSpiffeConnect.tsx:29-32is rendered as aliasspiffe. Keep a single deterministic click, but match an escaped, anchored case-insensitive regular expression.
js/apps/admin-ui/test/utils/loading.ts:18
- This only checks that loading signals are absent at the instant of polling. Post-action callers such as
searchItemandrefreshTablecan therefore return beforeKeycloakDataTable's effect setsloading=true, allowing interaction with stale rows; the helper needs to observe the new loading/readiness cycle (or wrap the triggering action) before waiting for completion.
await expect
.poll(async () => (await spinner.count()) + (await busy.count()), {
timeout,
})
.toBe(0);
- Files reviewed: 28/28 changed files
- Comments generated: 4
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Multiple readiness signals and cancellation or accessibility paths remain incorrect and can cause premature waits or inconsistent UI state.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (5)
Previously missed (4) — in code that hasn't changed since the last review.
js/apps/admin-ui/src/clients/ClientDetails.tsx:480
- This marker remains present while
RoutableTabsunmounts/mounts an active tab and while that tab performs its own asynchronous loading, so it cannot signal that the selected tab content is ready. Tie the marker to the active tab's actual load completion instead of the always-mounted page section.
js/apps/admin-ui/src/clients/keys/SamlKeys.tsx:270 - This rollback runs only for the Cancel button;
ConfirmDialogModalcloses via its X/EscapeonClosewithout invokingonCancel, leaving the form value set to disabled even though the user dismissed confirmation. Route every cancellation path through the rollback.
js/apps/admin-ui/src/identity-providers/component/SwitchField.tsx:34 FormGroupFieldstill renders its label withfieldId={label}, so changing the switch ID tofieldNamebreaks the label association whenever they differ (for examplestoreToken/storeTokens). Keep the matching ID, or update the parent field ID alongside this change.
js/apps/admin-ui/src/user/EditUser.tsx:362- This marker remains present while
RoutableTabsunmounts/mounts an active tab and while that tab performs its own asynchronous loading, so waiting for it after navigation does not establish that the selected user tab is ready. Tie readiness to the active tab's load completion instead of the always-mounted page section.
js/libs/ui-shared/src/controls/table/KeycloakDataTable.tsx:667
- On the initial render,
rowsis still undefined andloadingremains false until theuseFetcheffect runs, so this publishestable-ready(and the empty state) before the first request has even started. A readiness wait can therefore pass against an uninitialized table; only render this branch afterrowshas been populated.
{!loading && noData && !searching && (
<div data-testid="table-ready">{emptyState}</div>
)}
- Files reviewed: 28/28 changed files
- Comments generated: 3
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Critical table loading races and unresolved readiness, accessibility, and retry issues must be addressed.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (7)
Previously missed (3) — in code that hasn't changed since the last review.
js/apps/admin-ui/src/clients/ClientDetails.tsx:480
- This marker is on the persistent wrapper, while
RoutableTabsusesmountOnEnter/unmountOnExit; it therefore remains visible while the active tab content is being replaced and cannot signal that the new tab is ready. Place the marker inside the mounted tab content or make it identify the active tab after that content mounts.
js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx:356 - Entering the mappers route initially runs the table's normal load and then this effect increments the signal, causing a second request for the same list. Track an actual transition back to
/mappers(rather than the initial mount) so mapper creation refreshes without duplicating every initial fetch.
js/apps/admin-ui/src/user/EditUser.tsx:362 - This marker stays mounted around
RoutableTabsduring tab navigation, so a wait for it can pass using the previous tab before the newly selected lazy content mounts. Emit readiness from the active tab content (or include an active-tab-specific marker) instead.
js/apps/admin-ui/src/authentication/FlowDetails.tsx:452
flow-order-stablereappears when this outer promise resolves, butexecuteChangestarts nested execution updates without awaiting them at lines 131-137. Reordering an expandable flow can therefore be reported stable while child requests are still running; await all recursive updates before resolving or track all pending reorder work.
setIsReordering(true);
void executeChange(dragged, change).finally(() =>
setIsReordering(false),
);
js/apps/admin-ui/src/authentication/FlowDetails.tsx:452
executeChangecallsrefresh(), which only schedules the follow-up fetch, and then resolves; thisfinallyconsequently restoresflow-order-stablebefore the refreshed execution list arrives. Keep the busy state until the refresh callback has installed the server-confirmed order, otherwise tests can observe stale rows as stable.
setIsReordering(true);
void executeChange(dragged, change).finally(() =>
setIsReordering(false),
);
js/apps/admin-ui/test/utils/loading.ts:13
- This can succeed immediately when called just after a click or Enter, before React mounts the spinner, so callers can still race the fetch. Waiting needs to observe an operation-specific readiness transition (or the triggering response), rather than only sampling that the spinner is currently absent.
await expect.poll(async () => await spinner.count(), { timeout }).toBe(0);
js/libs/ui-shared/src/controls/LoadingOverlay.tsx:44
- Keeping the stale children mounted while only applying
pointer-events: noneleaves links, switches, and buttons keyboard-focusable and activatable during loading. Make the child subtree inert whileisLoadingso keyboard users cannot interact through the overlay.
{children}
- Files reviewed: 28/28 changed files
- Comments generated: 4
- Review effort level: Balanced
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.
Suppressed comments (1)
js/apps/admin-ui/test/utils/table.ts:1
clickTableToolbarItempreviously handled common UI states (partial matches and kebab/overflow menu). The new implementation only clicks an exact visible item, which can break when the toolbar overflows and actions move into the kebab (or when labels include additional text). Restoring the overflow/kebab fallback (or explicitly opening overflow when present) would keep tests robust across responsive layouts.
import { type Locator, type Page, expect } from "@playwright/test";
There was a problem hiding this comment.
🟡 Changes recommended
Multiple unresolved moderate issues can still cause races, premature readiness, redundant requests, and incorrect table expansion.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (8)
Previously missed (6) — in code that hasn't changed since the last review.
js/apps/admin-ui/src/authentication/FlowDetails.tsx:418
isReorderingonly removes the readiness marker; it does not prevent another mouse or keyboard reorder. OverlappingexecuteChangecalls can race, and the first reload can restoreflow-order-stablewhile the second is still running, so make the drag region inert (or otherwise disable DnD) until the reorder finishes.
js/apps/admin-ui/src/clients/ClientDetails.tsx:480- This marker stays mounted across every client tab change, including tabs whose children load data asynchronously, so it cannot signal that the newly selected tab is ready. Expose readiness from the active tab content rather than from the static
PageSection.
js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx:356 - Entering
/mappersalready mountsKeycloakDataTable, which starts its initial load; this effect then increments the signal and starts a second identical mapper/type request. Besides unnecessary API traffic, the extra aborted-but-not-cancelled loading cycle works against the stability this change is intended to provide; refresh only after an actual mapper mutation, not on the initial tab render.
js/apps/admin-ui/src/user/EditUser.tsx:362 - This marker is on the persistent wrapper around
RoutableTabs, so it remains visible whilemountOnEnterswitches to tab children that are still fetching. Tests waiting on it can proceed before the active tab content is ready; tie the marker to the active tab's actual loading completion instead.
js/apps/admin-ui/src/workflows/WorkflowsSection.tsx:145 - Only the active row is disabled, so another workflow can be toggled while its request is pending; that overwrites the scalar ID, and the first request's
finallythen re-enables the second switch before its save completes. Disable all workflow switches while this scalar state is set, or track pending IDs in a Set.
js/libs/ui-shared/src/controls/table/KeycloakDataTable.tsx:634 - Keeping
DataTablemounted also preserves its index-basedexpandedRowsstate. After pagination, filtering, or refresh replacesrows, an expanded index can therefore expand a different record; reset expansion when the row set changes or key expansion by row ID.
js/apps/admin-ui/test/autentication/flow.ts:191
- This still adds a role-based selector fallback, and the same helper continues through multiple pointer,
dragTo, row, and keyboard fallback paths below. That contradicts the PR's stated replacement of authentication-flow drag fallbacks with a deterministic readiness-based interaction.
row
.locator("[data-testid^='drag-handle-']")
.first()
.or(row.getByRole("button", { name: /draggable row/i }).first());
js/apps/admin-ui/test/utils/loading.ts:22
- This snapshots the current marker count and only asserts candidates already visible, so it never waits for a
table-readymarker that appears later. On initial navigation it can return immediately before the table's loading effect starts; wait for the first readiness marker before checking spinner absence.
const readyCount = await tableReady.count();
for (let index = 0; index < readyCount; index++) {
const candidate = tableReady.nth(index);
if (await candidate.isVisible()) {
await expect(candidate).toBeVisible({ timeout });
break;
}
}
- Files reviewed: 28/28 changed files
- Comments generated: 1
- Review effort level: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Seven moderate issues remain in readiness signaling, switch state handling, accessibility, and deterministic test behavior.
Review details
Suppressed comments (8)
Previously missed (5) — in code that hasn't changed since the last review.
js/apps/admin-ui/src/clients/ClientDetails.tsx:480
- This marker is on a persistent wrapper outside the
mountOnEntertabs, so it is already visible when a different tab is selected and cannot signal that the new tab content is ready. Move or control the marker using the active tab's actual mount/loading state.
js/apps/admin-ui/src/identity-providers/component/SwitchField.tsx:34 FormGroupFieldstill associates its visible label withfieldId={label}, so changing the switch ID tofieldNamedisconnects every label where those values differ. Keep the matching ID (the newdata-testidcan remain field-based), or updateFormGroupFieldto receive the same field ID.
js/apps/admin-ui/src/user/EditUser.tsx:362- This marker wraps
RoutableTabsand remains visible whilemountOnEnterswitches tabs, so waiting for it after a tab click can resolve before the newly active tab has mounted or loaded. Tie readiness to the active tab's content/loading state instead of the persistent page wrapper.
js/apps/admin-ui/src/workflows/WorkflowsSection.tsx:143 - Only disabling the workflow currently recorded permits another row to start saving and overwrite
togglingWorkflowId; when either request finishes, itsfinallyclears the state and can re-enable a switch whose request is still pending. Disable all workflow switches while this value is set, or track pending IDs in aSet.
js/apps/admin-ui/test/autentication/flow.ts:191 - The PR says authentication-flow reordering no longer needs drag fallbacks, but this helper still combines a fallback locator here and then tries pointer,
dragTo, row drag, and keyboard strategies. Select the intended deterministic keyboard/handle path and remove the fallback chain so the test validates that path directly.
js/apps/admin-ui/test/utils/loading.ts:22
- This readiness check cannot actually wait: it snapshots the current marker count and calls
toBeVisibleonly afterisVisible()has already returned true, before spinner completion is awaited. A caller that runs before the loading/ready markers mount can therefore return immediately; wait for spinner completion first and explicitly poll for a visibletable-readymarker for table operations.
const tableReady = root.locator("[data-testid='table-ready']");
const readyCount = await tableReady.count();
for (let index = 0; index < readyCount; index++) {
const candidate = tableReady.nth(index);
if (await candidate.isVisible()) {
await expect(candidate).toBeVisible({ timeout });
break;
}
}
js/apps/admin-ui/test/utils/table.ts:44
- Adding this readiness wait does not implement the PR's stated replacement of multi-attempt table helpers: the function still executes the six-attempt, four-selector fallback loop below. After readiness, use one exact locator/assertion/click so failures remain deterministic rather than being masked by retries.
export async function clickTableRowItem(page: Page, itemName: string) {
await waitForLoadingComplete(page);
js/apps/admin-ui/test/workflows/main.spec.ts:126
- This still routes the workflow test through
clickSwitch, which falls back to forced label/input clicks inutils/form.ts; that masks the interaction race this PR is intended to eliminate. Since the switch is already asserted enabled immediately above, use Playwright's normal click and let actionability failures surface.
await clickSwitch(page, toggleLocator);
- Files reviewed: 28/28 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.forms.BruteForceTest#testExceedMaxTemporaryLockouts |
afc6631 to
fe2d8d3
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Expansion state can leak between unrelated rows, and nested flow-update failures can be reported as successful.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
js/libs/ui-shared/src/controls/table/KeycloakDataTable.tsx:140
- Rows without an
idare represented only by their index, so a reload or page change with the same row count leavesrowIdentityKeyunchanged and carries expansion state onto unrelated rows. This occurs for the expandable user/admin event tables because their representations have noid; reset expansion from the actual fetched row set rather than the index fallback.
const rowIdentityKey = useMemo(
() =>
rows
.map((row, index) =>
"data" in row && row.data != null
? String(get(row.data, "id", index))
: String(index),
)
.join("\0"),
- Files reviewed: 26/26 changed files
- Comments generated: 1
- Review effort level: Balanced
| if (ex.executionList?.length) { | ||
| await Promise.all( | ||
| ex.executionList.map((e, i) => | ||
| executeChange(e, { | ||
| parent: { ...ex, id: result.id }, | ||
| newIndex: i, | ||
| oldIndex: i, | ||
| }), | ||
| ), | ||
| ); | ||
| } |
There was a problem hiding this comment.
🟡 Changes recommended
Expansion identity, concurrent flow reconstruction, row-link precedence, and skeleton overflow remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
js/libs/ui-shared/src/controls/table/KeycloakDataTable.tsx:138
- The index fallback does not detect dataset changes for expandable rows without an
id. Both event representations used by expandable event tables have noid, so paging between equally sized result sets leavesexpandedRowsattached to the same indexes and expands unrelated rows; use a caller-supplied stable row identity or reset expansion when fetched rows are replaced.
"data" in row && row.data != null
? String(get(row.data, "id", index))
: String(index),
js/apps/admin-ui/test/utils/table.ts:17
Locator.or(...).first()merges all candidates in DOM order; it does not prioritize the exact-name branch. If bothfooandfoobarlinks exist and the latter appears first, requestingfoocan click the wrong row, so resolve the exact candidate first and only then fall back to partial/provider matching.
return tableBody
.getByRole("link", { name: exactNameRegex })
.or(tableBody.getByRole("link", { name: itemName }))
.or(
tableBody.getByTestId("provider-name-link").filter({ hasText: itemName }),
- Files reviewed: 26/26 changed files
- Comments generated: 2
- Review effort level: Balanced
| if (ex.executionList?.length) { | ||
| await Promise.all( | ||
| ex.executionList.map((e, i) => | ||
| executeChange(e, { | ||
| parent: { ...ex, id: result.id }, | ||
| newIndex: i, | ||
| oldIndex: i, | ||
| }), | ||
| ), | ||
| ); | ||
| } |
| position: absolute; | ||
| inset: 0; | ||
| z-index: 1; | ||
| display: flex; | ||
| flex-direction: column; |
Add LoadingOverlay with PatternFly Skeleton and testable loading signals. Keep KeycloakDataTable DOM mounted during reload, normalize switch handling, and add readiness markers for tabs, users list, and auth flow reordering. Simplify Playwright helpers to use waitForLoadingComplete instead of multi-attempt retry loops. Closes keycloak#52322 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Render the supplied loading skeleton, fix screen-reader class, emit table-ready on empty results, disable all login switches during any save, poll until loading indicators clear, and tie create-user waits to table-ready. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Restore PatternFly switch label force-click fallback, multi-strategy flow drag helpers, and scope waitForLoadingComplete to loading-spinner only so save-button aria-busy does not block table interactions. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Restore robust switch interactions, retry table row clicks, wait for rows instead of global spinners in assertRowExists, and clear KeycloakDataTable loading state on fetch errors and dependency changes. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Make overlay content inert while loading, gate table-ready on first fetch, fix abort-aware loading state, clear flow-order-stable after refresh, and improve Playwright loading cycle waits. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Only wait on visible table-ready elements and restore row-link click retries so identity-provider and user list navigation works on CI. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
PatternFly switch inputs require the shared click fallback instead of a direct locator click when disabling Use JWKS URL during provider setup. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Stop polling table-ready in waitForLoadingComplete to avoid flakes when markers briefly appear during reload or on unmounted tabs. Add waitForTableReady for KeycloakDataTable-only cases and harden row clicks. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Wait for add-user or empty-state action instead of table-ready, which returned early while UserDataTable still showed KeycloakSpinner. Require visible table-ready in waitForTableReady rather than treating absence as ready. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Fix drag-handle and switch label associations, drop unused readiness signals, simplify table row waits, and tighten save/disable behavior on LoginTab, WorkflowsSection, FlowDetails, and mapper refresh. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Scope flow drag handles to the draggable button inside the marked cell, wait for flow-order-stable after reorder, prefer add-user over empty-state union locators, and click workflow toggles directly. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Restore flexible row link matching for badges and provider tables, poll for users page actions, refresh realm on LoginTab save failure, use clickSwitch for workflow toggles, and fix LoadingOverlay inert typing. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Only treat visible loading-spinner markers as busy so collapsed table rows do not block assertRowExists. Refresh mapper table when returning from a mapper detail route without refetching on initial tab mount. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Use table-loading-overlay and page-loading-spinner instead of a shared loading-spinner test id. Refactor table helpers to wait on rows, links, and toolbars directly; only render scope detail spinners when expanded. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Guard KeycloakDataTable success callbacks against stale responses, tighten Playwright table waits, and restore toolbar overflow fallback. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Resolve the correct table-toolbar when multiple are visible by preferring the active tab panel or the toolbar tied to the selected row. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
fe2d8d3 to
7ffcfc7
Compare
Wait for table idle before toolbar interactions and after mapper saves, reset expanded rows when paginated data changes, and await nested flow execution moves before refetching. Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
7ffcfc7 to
64fcd96
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved state and refresh issues allow overlapping workflow saves, stale filtered rows, duplicate mapper keys, and premature flow-reorder completion, while the test helper can capture old rows before loading finishes.
8 open issues
executeChangecatches child failures and resolvesfalse, so thisPromise.allnever rejects… Nested reordering refreshes before all mutations finish · New Filtered rows stay stale after reloads · New Toggle switches remain enabled while a PUT is in progress · New Row capture can return before loading finishes · New Mapper rows use non-unique IDs as React keys · New The absolutely positioned skeleton does not contribute to the overlay container's height. Reloading…Promise.allrecreates child executions concurrently, but eachexecuteChangedeletes and re-adds…
Review effort: Balanced
| ({ flow, executions }) => { | ||
| setFlow(flow); | ||
| setExecutionList(new ExecutionList(executions)); | ||
| setIsReordering(false); |
| } | ||
| loader={loader} | ||
| key={key} | ||
| loader={{ signal: key, loader }} |
| isDisabled={togglingWorkflowId !== undefined} | ||
| aria-busy={togglingWorkflowId === workflow.id} |
| export async function getTableData(page: Page, name: string) { | ||
| // Retry the complete data capture so the wait and read cannot race each other | ||
| // during React re-renders that momentarily empty the table. 10BC8 | ||
| // getTableRows already waits for loading to complete. |
| <Tr key={index} isExpanded={expandedRows[index]}> | ||
| <Tr | ||
| // SubRow entries have no `data`; they key on index while parent rows use id. | ||
| key={get(row.data, "id") ?? index} |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved regressions leave filtered rows and workflow save controls stale, allow keyboard interaction during loading, and mark flow reordering complete while updates are still pending.
11 open issues
executeChangecatches child failures and resolvesfalse, so thisPromise.allnever rejects… Filtered rows do not update after workflow reloads · New Boolean inert is dropped, leaving loading content focusable · New Initial loading state exposes the empty state before fetching · New Mapper rows use non-unique IDs as React keys Row capture can return before loading finishes Toggle switches remain enabled while a PUT is in progress Filtered rows stay stale after reloads Nested reordering refreshes before all mutations finish The absolutely positioned skeleton does not contribute to the overlay container's height. Reloading…Promise.allrecreates child executions concurrently, but eachexecuteChangedeletes and re-adds…
Review effort: Balanced
| <DeleteConfirm /> | ||
| <KeycloakDataTable | ||
| key={key} | ||
| loader={{ signal: refreshSignal, loader }} |
| > | ||
| <div | ||
| className={style.overlayContent} | ||
| {...(isLoading ? { inert: true } : {})} |
| const [rows, setRows] = useState<(Row<T> | SubRow<T>)[]>(); | ||
| const [unPaginatedData, setUnPaginatedData] = useState<T[]>(); | ||
| const [loading, setLoading] = useState(true); | ||
| const [loading, setLoading] = useState(false); |


Closes #52322
Summary
LoadingOverlaywith PatternFlySkeletonand testable loading signals (loading-spinner,table-ready) inui-sharedKeycloakDataTableDOM mounted during reload instead of unmountingtbodyon every fetchwaitForLoadingCompleteand simple assertionsTest plan
./mvnw -pl quarkus/deployment,quarkus/dist -am -DskipTests clean install(or JS CI equivalent)