Repository navigation
fix(ui): keep Applications config form clean after a save when stored config has legacy keys - #38053
Merged
Rohit0301 merged 3 commits intoNov 18, 2026
Conversation
… config has legacy keys
…ange, not schema change A late-loading schema (MCP tool names) recomputed the baseline and cleared an in-progress edit, so Cancel could discard it without prompting.
…s cancelled Matches the other settings forms: Cancel (or Discard from the unsaved-changes prompt) leaves the form instead of remounting it in place.
Rohit0301
approved these changes
Nov 18, 2026
Rohit0301
enabled auto-merge (squash)
November 18, 2026 05:44
Rohit0301
disabled auto-merge
November 18, 2026 05:53
shrabantipaul-collate
approved these changes
Nov 18, 2026
Rohit0301
deleted the
detail/bug-fix/fix-ui-keep-applications-config-form-clean-after-a-c306b9
branch
November 18, 2026 05:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detail bug report: View on Detail
Closes #38025
Bug
When an OpenMetadata application's stored
appConfigurationcarried a key the current schema no longer recognizes (a documented state on upgraded instances — the repo ships hand-writtenJSON_REMOVEmigrations only forRdfIndexAppandDataInsightsApplication, andSearchIndexing/CacheWarmupstrip such keys only at runtime without persisting the cleanup), the Applications settings modal claimed there were unsaved changes immediately after every successful save, and blocked Cancel/close/navigation with the "discard changes?" prompt despite the user having just saved.Root cause is an asymmetry between RJSF's change and submit paths in
AppConfigForm:FormBuilderV1passesomitExtraDatato@rjsf/corewithoutliveOmit, so the submit payload is pruned of schema-unknown keys butonChangedata is not.AppConfigFormderivesisDirtyby deep-comparing acurrentFormDatasnapshot captured fromonChangeagainst asavedFormDatabaseline derived from the stored config.AppDetails.component.tsx → patchApplication → setAppData(response)) replaces the stored config with the pruned payload, sosavedFormDatamoves — butcurrentFormData(still holding the legacy key) is never re-synced.isDirtystaystrueforever; a second Save does not clear it.The dirty-tracking guard this bug lives in was introduced in #37904.
Fix
In
AppConfigForm.tsx, reset the live-form snapshot whenever the saved baseline moves — enforcing the contract the code comment already claimed ("when a save updates the app, the baseline moves and the form reads clean again"):This is the bug report's "minimal guard fix". I deliberately did not switch
FormBuilderV1toliveOmit(the alternative suggested fix):liveOmitwould also fix the reported symptom but introduce a different regression — when the stored config carries a legacy key, an edit followed by a revert reads as dirty, because RJSF would prunecurrentFormDatawhilegetDefaultFormStatestill retains the legacy key insavedFormData. The reactive reset is surgical (no shared-FormBuilderV1behavior change, so no risk to its ~10 other consumers), and resilient to failed saves by construction: the baseline only moves on a successful patch +setAppData(response), so a failed save leavessavedFormDataunchanged and the form correctly stays dirty.Testing
yarn test AppConfigForm.test.tsx): added 4 cases around the dirty-tracking contract — clean on mount with a legacy key, clean after a reverted edit with a legacy key (catches theliveOmit-only regression), clean after a save when the stored config carried a schema-unknown key (the bug repro), and stays dirty after a failed save (verifies the reset does not fire when the host leavesappDataunchanged). All 11 cases in the file pass; the bug-repro case fails when the fix is reverted viagit stash, confirming the RED→GREEN cycle. Fulltabs/applications/Jest suite (89 cases),AppDetails(12),useUnsaved…+UnsavedChangesPrompt(16), andFormBuilderV1(109) all green. Coverage onAppConfigForm.tsxis 100% lines.tw-audit,tw-deprecation-guard,yarn i18n(no locale diff),yarn generate:app-docs(no generated-docs diff).yarn tsc:checkreports no new errors vs. baseline (only the pre-existing unrelatedOMSelectWidget.tsxline).yarn build,yarn bundle:check, andyarn bundle:runtime(after installing the Playwright chromium deps) all pass.2.1.0-rc2Docker stack, ran the in-repo patched UI via Vite dev against it, and produced the adminplaywright/.auth/admin.json.e2e/Features/SettingsUnsavedChanges.spec.ts(6 tests, including "an untouched Applications config form leaves without asking") ande2e/Features/ApplicationsSettingsModal.spec.ts(8 tests, including "saves configuration from the footer with hints toggled on") both pass — no regression in the existing Applications save flow.make playwright_affectedroutes this change toApplicationsSettingsModal.spec.ts.page.routeagainst the GET response, then exercises edit → save → Cancel and asserts no unsaved-changes popover. The published2.1.0-rc2backend's Jackson rejectsappConfigurationcarrying a schema-unknown key on read withHTTP 400 Unrecognized field, so the bug-inducing state is unreachable via this server's API forDataRetentionApplication. Apage.route-based mock of the GET + PATCH was brittle (Playwright's LIFO route priority shadowed the GET matcher with the PATCH matcher, timing out unrelated navigation), so I reverted the speculative spec rather than commit a flaky test. The authoritative bug-state reproduction lives in the Jest unit test above, which renders real@rjsf/core 5.24.13and fails identically in the bug-state.Automatic Fixes PRs can be configured here.


Confidence Score: 5/5
The PR appears safe to merge; no blocking issues were found.Summary
The PR clears stale unsaved-change warnings after an application configuration is saved and makes Cancel return to the applications list.
The previous schema-change finding is fixed. No new actionable issues were found.
Reviews (3) · Last reviewed commit: "fix(ui): return to the Applications list..." · Reviewed by Greptile