Repository navigation
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
AI mode now opens the same slide-out drawer as classic mode for the Add/Edit Test Definition form, replacing the centered AiFormModal. The drawer swaps its ServiceDocPanel for the Show Hint toggle and the per-field Form Hint column (HookForm panel mode), as the test case drawer does. It opens at 80vw with the hint and 60vw without it. - Drop the `variant` prop; every caller now gets the drawer. - Remove the active-field reporting that only fed ServiceDocPanel (`onActiveFieldChange` and its focus and click handlers). The Form Hint tracks the focused field through useFieldDoc. - Playwright: check the Show Hint toggle and the Form Hint instead of the removed doc panel, and save through the drawer's Save button.
The generated map reached only TestDefinitionFormBody, so a change to the Test Definition drawer or the AI-mode Test Library page selected the full suite. Route both folders to the Test Library and Test Definition specs and the AI-mode Observability spec, and regenerate the generated map: it picks up the two specs that now import the shared Form Hint helper, and the FailureThreshold spec main had not regenerated for.
df37784 to
5b7cc1e
Compare
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
In AI mode the form stays mounted between opens. After editing a definition, Add Test Definition opened pre-filled with that definition, and saving it failed with "Entity already exists". The form was reset when the edit closed, but the drawer keeps its fields mounted while it slides out, and react-hook-form's useController re-registers each field with its last value on every render, which wrote the edited values back. Reset the form when the drawer opens, before its fields mount, as well as when the target definition changes. Classic mode was not affected because it unmounts the form on close.
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Resolve the .github/playwright/impact-map.json conflict by keeping both appended entries: the Test Library drawer mapping from this branch and the Suggestions mapping from main.
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ Approved🟡 Medium risk · Moving Test Definition creation and editing into a persistent drawer changes form lifecycle; incorrect reseeding could submit stale values or block creation. Moves the Test Definition form into the same right-side drawer in both AI and classic app modes, with the Form Hint column replacing the static doc panel and the form reseeding on each open so Add no longer pre-fills with the last edited definition. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. 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-10-15.at.5.46.35.PM.mov
Screen.Recording.2026-10-15.at.5.47.19.PM.mov
Describe your changes:
Fixes #35543
The Add / Edit Test Definition form in the Test Library now opens in the same right-side drawer in both app modes, and the drawer shows the same Form Hint as the Data Quality test case drawer.
/observability/test-library): the centeredAiFormModalis replaced by the drawer that classic mode already used./test-library): the drawer's static documentation panel (ServiceDocPanel, the fullTestDefinitionForm.md) is replaced by the Show Hint toggle in the header and the per-field Form Hint column. The column shows the doc for the focused field and opens on the first field.The Show Hint toggle here is built the same way as the test case drawer's. #35296 adds a shared
ShowHintToggleand drawer width constants. A follow-up PR after #35296 merges will move this drawer and the test case drawer onto them.Type of change:
High-level design:
Follows #35230 (Data Quality forms in the drawer in every app mode), which did the same for the test case form.
TestDefinitionFormalways renders throughuseFormDrawerWithHook. Its body is aHookForminfieldDocDisplay="panel"mode with the Form Hint header, the empty state and the markdown renderer the modal used. Thevariantprop and the modal branch are removed, and both callers (TestDefinitionListin classic mode,observability/TestLibrary/TestLibraryPagein AI mode) get the drawer.initialValueschanges. Resetting only on close is not enough for the drawer: its fields stay mounted while it slides out, and react-hook-form'suseControllerre-registers each field with its last value on every render, which writes the closed definition back into the form. The modal unmounted its fields at once, so it never hit this.TestDefinitionFormBodyno longer reports the active field to its parent (onActiveFieldChangeand its focus and click handlers). That only fedServiceDocPanel. The Form Hint tracks focus throughuseFieldDoc, which the body already used for the SQL and parameter sections..github/playwright/impact-map.jsongets an entry forcomponents/TestLibrary/**andcomponents/observability/TestLibrary/**. Before it, a change to the drawer shell or the AI-mode page was unmapped and selected the full suite.impact-map.generated.jsonis regenerated: it adds the two specs that now import the sharedexpectFormHinthelper, and theFailureThresholdspec, whichmain's generated map was missing.Compatibility:
TestDefinitionFormProps.variantis removed. Nothing in OSS passes it any more. A Collate caller that still passesvariant="modal"needs a companion change, as #35230 did.Tests:
Use cases covered
Unit tests
TestDefinitionForm.test.tsx: the drawer renders with Show Hint on, the focused field's doc shows in the Form Hint, and turning Show Hint off hides it. Create, edit, no-op edit and failed create now save through the drawer's Save button.TestDefinitionFormBody.test.tsxandtestDefinitionFormDocs.test.tsfor the removed prop and the new wording.src/components/TestLibrary,src/components/observability/TestLibraryandsrc/pages/TestLibraryafter the fix: 13 suites, 220 tests passed. Before the fix, the same plussrc/components/DataQuality/AddDataQualityTest: 21 suites, 399 tests passed.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Features/AIMode/Observability.spec.ts: the Test Library tests now open, create, edit and cancel through the drawer. They check the Show Hint toggle and the Form Hint (expectFormHint) and save withsave-test-definition.Features/DataQuality/TestLibrary.spec.ts: checks the Show Hint toggle and the Name hint instead of the removed.drawer-doc-panel.make playwright_affectedselects 26 specs and reports no impact-map gaps..github/scripts/tests/test_playwright_ci_planning.py: 123 passed, 3 failed. Onmainthe same file has 4 failures. This PR fixestest_committed_generated_impact_map_matches_the_generator_output. The other 3 fail onmaintoo:test_basic_project_excludes_dedicated_state_specs,test_search_impact_mapping_includes_ingestion_project_for_schema_searchandtest_summary_reconciles_results_and_evaluates_performance_independently.Manual testing performed
Ran this branch's UI (Vite on :3901) against a backend built from this branch (
system/versionrevision5b7cc1e881f), signed in as the local admin, viewport 1440×900.Classic mode (
/test-library):POST /testDefinitions201, success toast, drawer closed.PATCH200, success toast, row updated.AI mode (
/observability/test-library):PATCH200, success toast, row updated.main's AI modal does not do this. Fixed in this PR (see above). After the fix, Add after Edit → Cancel and after Edit → Save both open empty, and Edit still pre-fills.Also seen, not changed here: on the first drawer open after a page load, switching from the pre-filled Name hint to Display Name once kept the Name text under the Display Name heading. It did not happen again on later opens. It comes from the shared markdown preview (
RichTextEditorPreviewerV1), which the AI modal used in the same way.Lint: ESLint + Prettier + organize-imports on the changed UI files, 0 errors.
tsc --noEmit(src and playwright) reports no errors in the changed files.UI screen recording:
Not added yet. This PR stays draft until a recording from a Docker build of this branch with sample data is attached.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.