Repository navigation
Fixes #27257: Test library improvement - #33620
Conversation
The Test Library listing paged through test definitions in `name` order with no way to look one up, which stops scaling once a deployment adds its own rules on top of the shipped catalog. Adds a `q` query param to `GET /v1/dataQuality/testDefinitions` that reuses the existing `nameFilter` condition (name OR display name, case-insensitive) so the search runs in SQL and combines with the entity-type / test-platform filters. Filtering client side would only ever search the page already fetched, since the listing is cursor-paged. Orders the listing by display name, falling back to name. The keyset comparisons in TestDefinitionDAO and the page cursors built by TestDefinitionRepository.getCursorValue move to that key together, and getCursorAtOffset is re-pointed at it so keyset partitioning still seeds itself on the same sequence. On the UI side both Test Library surfaces (the app-mode filter bar and the classic list) grow a debounced search box backed by a `q` url param, and "clear all" now drops the search term in the same url update as the quick filters. Co-Authored-By: Claude Opus 5 <[email protected]>
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
Comments Outside DiffThese findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.
|
EntityRepository seeds an uncursored first page with an empty cursor name. That is an ascending-only sentinel: `key > ''` admits every row but its descending mirror `key < ''` admits none, so every descending listing came back empty. The keyset predicate is now dropped entirely when there is no cursor to walk past, which also stops ascending from silently skipping rows whose sort key really is the empty string - a definition declaring no test platforms. The testPlatforms fixtures gave two rows the same platform, so they tied on the sort key and fell back to a random UUID; the assertion over that pair passed or failed by chance. Each fixture now carries a distinct value for every sortable column. Also guards the paging walk against comparing two empty lists, which is how the empty descending listing slipped past it.
Every sort, filter and search change set isLoading, and the table
rendered items={isLoading ? [] : rows} with skeletons as the empty
state - so the rows were torn out and replaced by five grey bars on
each interaction. Nothing reloads (useTableFilters navigates with
replace), but three things blanking at once read as a page reload.
The data hook now distinguishes the first load, which genuinely has
nothing to show, from a refetch. Skeletons are for the first load only;
a refetch dims the existing rows in place and marks the container
aria-busy, so the state still reaches a screen reader without a visual
placeholder.
This covers filtering and searching too, not just sorting - they go
through the same refetch path.
Keeping the previous rows mounted left their enable, edit and delete controls live while the next query was in flight. Acting on one patches a definition the list has already moved on from, and the arriving response overwrites the toggle, so a successful edit reads as if it had reverted. Disabled rather than pointer-events-none, so the controls leave the tab order too instead of staying keyboard-reachable while looking inert. Addresses the 'Stale Rows Stay Actionable' review finding, which the previous commit introduced.
Covers the listing end to end: server-side search, sorting by Name, Entity Type and Test Platforms in both directions, the URL backing all of it, pagination resetting on a sort change, and the rows staying visible but inert while a refetch is in flight. Three fixtures are created via the API sharing a uuid marker, and the search narrows the listing to exactly those rows so the order can be asserted absolutely rather than against the seeded catalog. Their display names sort the opposite way to their internal names, so an ordering that fell back to the name column fails rather than passing by coincidence. The entity type assertions read the entity type column rather than the row names, because two fixtures tie on that key and break on a random id. The refetch test gates the listing response behind a promise it releases itself, so the in-flight state is observed without a timer.
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
| for (const id of createdIds) { | ||
| await apiContext.delete( | ||
| `${TEST_DEFINITION_API}/${id}?hardDelete=true&recursive=false` | ||
| ); | ||
| } |
There was a problem hiding this comment.
Each hard-delete response is discarded, so a non-2xx response is treated as successful cleanup. This can leave test definitions in the shared Test Library catalog and contaminate later pagination or permissions tests. Assert that every cleanup request succeeds so fixture leaks fail visibly.
|
| Count | Rule |
|---|---|
| 2 | react-hooks/exhaustive-deps |
| 1 | openmetadata-imports/no-circular-imports |
| 1 | openmetadata-imports/no-lower-layer-page-imports |
| 1 | openmetadata-imports/no-rest-ui-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/TestLibrary/TestDefinitionList/useTestDefinitionData.ts:145:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchTestDefinitions'. Either include it or remove the dependency array. |
| 🟡 | src/components/TestLibrary/TestDefinitionList/useTestDefinitionListPage.ts:144:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'handlePageChangeCallback'. Either include it or remove the dependency array. |
| 🟡 | src/rest/testAPI.ts:47:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/rest/testAPI.ts:47:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/rest/testAPI.ts:47:1 |
openmetadata-imports/no-rest-ui-imports |
REST clients must not import UI or state-layer modules. Move shared request/response types to the interface layer. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changedThe refetch is supposed to hold the retained rows' controls shut, but the row cells live in a react-aria collection that serves cached nodes unless `items` or `dependencies` change. A refetch changes neither - the rows are the previous query's - so the cells kept the `disabled` value they were built with and the edit/delete buttons stayed live for the whole refetch. Add `isRefetching` to the Table.Body dependencies so the collection is rebuilt when the flag flips. The Playwright test caught this; the jest tests did not, because every one of them mounted straight into the refetching state, where the rows are built disabled on the first render. Cover the transition instead, in both directions. Also move the E2E control assertions onto `_aaa`. `_zzz` runs on the Soda platform, so its Enabled toggle is disabled either way - the assertion passed without the refetch, and the matching `toBeEnabled()` after the response landed could never have passed.
| import { FileShield02 } from '@untitledui/icons'; | ||
| import { Button, Space, Switch, Tooltip, Typography } from 'antd'; | ||
| import { useMemo } from 'react'; | ||
| import { useCallback, useMemo } from 'react'; |
There was a problem hiding this comment.
This table imports FileShield02 directly from @untitledui/icons and imports the edit and delete icons directly from SVG asset paths. The repository requires application icons and assets to go through the design-system layer so their dependencies remain consistent across upgrades. This requirement must be satisfied before merging. The same direct-import pattern also remains in the changed filter bar and Test Library page.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
… a request
Dropping an interceptor makes Playwright auto-continue the route that handler
still owns (Page.removeRequestInterceptor ->
notifyRoutesInFlightAboutRemovedHandler -> Route.continue({isFallback: true})),
so the handler's own continue() then hit "Route is already handled!". Wait for
the released response instead and leave the handler installed - with the gate
resolved it passes every request straight through.
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Server-side search and cursor sorting change Test Definition listing and pagination behavior. Adds server-side search and sortable cursor-paginated Test Library listings with debounced UI controls and comprehensive test coverage. The search refetch does not cancel stale in-flight responses, but this is accepted without a fix for this PR. ✅ 1 closedClosed: Bug: Search refetch does not cancel stale in-flight responses
OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
|



Screen.Recording.2026-09-21.at.8.58.13.PM.mov
What olivaw checked (machine-observed, §8.2/A.1)
c50cee57038cf9d67b3bb40a5f8fce3829e3c0ad4b50b1baeea260a7b3ea0063adf1b79c1d58c816No build or test command is configured for this workspace, so only the diff's existence was checked. Set
run_config.build_cmd/test_cmdto have olivaw verify its own work.What the agent says it did (unverified)
The behavioral changes appear sound, but the explicit design-system icon-import requirement must be satisfied before merging.
Findings
Summary
This PR adds server-side search and configurable sorting for Test Library definitions, aligns keyset cursors with each selected ordering, and connects the behavior to both Test Library interfaces.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR UI[Test Library search and sort controls] --> API[Test Definition list API] API --> Filter[ListFilter search and sort parameters] Filter --> DAO[Dialect-specific filtering and ordering] DAO --> Page[Keyset-paged definitions] Page --> Cursor[Repository cursor from active sort key] Cursor --> UIReviews (11) · Last reviewed commit: "fix(playwright): stop unrouting a route ..."