Repository navigation
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
UI browser testsRan: all test files (no impact map from main yet) Result: ✅ 1099 passed · 154 skipped Changed code executed by these browser tests: 6 / 6 lines (100%)
Changed files no browser test loads
|
Route the Domains panel's save through handleUpdateClassification, as the Owners panel does, so TagsPage's classification state reflects the new domains. Add a browser test that renders the assigned domain and replaces it through the picker.
…table flash After creating a classification, make it the current one with termCount 0 instead of leaving the previous classification on screen until the name fetch lands, and render the empty state directly for a classification known to have no tags rather than the loading tags table.
Drop the onUpdate route through handleUpdateClassification: that handler swallows errors, so DomainLabel showed the unsaved selection after a rejected PATCH. DomainLabel's own API save keeps its previous domains on failure. Add a browser test for the rejected save.
… sync after a panel save - Gate the Domains panel editor on !isVersionView, as the Owners widget is, so the version history page cannot PATCH the live classification. - Merge the saved domains into TagsPage's current classification through afterDomainUpdateAction, so the Edit drawer pre-fills the saved domains. - Drive the domain picker in browser tests through openPicker/setSelected, and add tests for the version-view gate and the edit-form domains.
Key the Domains panel by classification id so a save that resolves after switching classifications cannot update the new panel, and merge saved domains into TagsPage state only when the patched id matches the current classification. Add a browser test that holds the PATCH across a switch.
Code Review ✅ Approved 🟡 Medium risk 2 closed / 2 findingsRestoring classification-domain editing sends PATCH updates and changes domain associations, so a mistaken selection could misclassify related tags. Restores domain display and editing on the Classification page by reading domains from the classification itself and saving through its own PATCH path, with failed saves keeping the previously saved domains. Also fixes a flash of the tags table when creating a new classification, and hides the domain editor on the version history page. Resolved: a failed domain save no longer shows the new domains, and a late domain save can no longer write onto another classification. No issues remain open. ✅ 2 closed✅ Bug: Failed domain save still shows the new domains
✅ Edge Case: Domain save callback can write domains onto another classification
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 |
|
🤖 Backport to |
|
🤖 Backport to |
|
🤖 Backport to |
|
🤖 Backport to |
…38725) * fix: restore domain display and editing for classifications * fix(ui): save classification domains through the page's update handler Route the Domains panel's save through handleUpdateClassification, as the Owners panel does, so TagsPage's classification state reflects the new domains. Add a browser test that renders the assigned domain and replaces it through the picker. * fix(ui): open a new classification on its empty state without a tags table flash After creating a classification, make it the current one with termCount 0 instead of leaving the previous classification on screen until the name fetch lands, and render the empty state directly for a classification known to have no tags rather than the loading tags table. * fix(ui): keep the saved classification domains when a domain save fails Drop the onUpdate route through handleUpdateClassification: that handler swallows errors, so DomainLabel showed the unsaved selection after a rejected PATCH. DomainLabel's own API save keeps its previous domains on failure. Add a browser test for the rejected save. * fix(ui): keep classification domains read-only in version view and in sync after a panel save - Gate the Domains panel editor on !isVersionView, as the Owners widget is, so the version history page cannot PATCH the live classification. - Merge the saved domains into TagsPage's current classification through afterDomainUpdateAction, so the Edit drawer pre-fills the saved domains. - Drive the domain picker in browser tests through openPicker/setSelected, and add tests for the version-view gate and the edit-form domains. * fix(ui): keep a late domain save from landing on another classification Key the Domains panel by classification id so a save that resolves after switching classifications cannot update the new panel, and merge saved domains into TagsPage state only when the patched id matches the current classification. Add a browser test that holds the PATCH across a switch. --------- (cherry picked from commit bacceff) Co-authored-by: Alex Castillo González <82875882+pcbeingused333@users.noreply.github.com> Co-authored-by: Sweta Agarwalla <swetaagarwalla13@gmail.com> Co-authored-by: Sweta Agarwalla <105535990+sweta1308@users.noreply.github.com>
Fixes #38592
Describe your changes
The Domains panel on the Classification page did not work: assigned domains did not show, and Apply failed with "An unexpected error occurred" without sending a request.
ClassificationDetailsread the domain props from the generic entity context (useGenericDomainLabel), but it renders theGenericProvideritself, further down its own tree. The hook therefore read the default context: no entity type, an empty FQN and ID, and no domains.DomainLabelnow gets the classification's domains, FQN, ID and type directly fromcurrentClassification, and saves through its own API path (GET by name, then PATCH/classifications/{id}).This PR also fixes a flash on the same page: after creating a classification, the page briefly showed the previously selected classification and an empty, loading tags table before the new classification's "Add the first tag" state.
TagsPagemakes the created classification the current one, withtermCount: 0, before navigating to it. The create response carries notermCount.ClassificationDetailsrenders the empty state directly for a classification known to have no tags, instead of the loading tags table.Type of change
High-level design
N/A for this focused bug fix.
Tests
TagsPage.browser.test.tsx), real Tags page with the network mocked:ClassificationDetails.test.tsx): renders a classification with an assigned domain, clears it through Apply, and checks the classification is read by name and patched by ID. The version-view test also asserts the domain editor is not rendered.TagsPage.browser.test.tsx7/7 passed;ClassificationDetails.test.tsxandTagsPage.test.tsx46/46 passed.This change was prepared with the help of an AI coding assistant.
UI recording
Before:
Screen.Recording.2026-11-25.at.5.07.43.PM.mov
After:
Screen.Recording.2026-11-25.at.6.29.32.PM.mov