Addressed Context Center feedbacks
Describe your changes:
https://github.com/user-attachments/assets/095467dc-b2bd-40f6-b3cb-8b1f1971ccb4
Fixes 29275
I worked on ... because ...
Type of change:
- [ ] Bug fix
- [ ] Improvement
- [ ] New feature
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation
High-level design:
N/A β small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
- [x] I have read the CONTRIBUTING document.
- [ ] My PR title is
Fixes <issue-number>: <short explanation> - [ ] My PR is linked to a GitHub issue via
Fixes #<issue-number>above. - [ ] I have commented on my code, particularly in hard-to-understand areas.
- [ ] For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
- [ ] For UI changes: I attached a screen recording and/or screenshots above.
- [ ] I have added tests (unit / integration / Playwright as applicable) and listed them above.
Summary by Gitar
- UI/UX improvements:
- Refactored
ArchiveViewandMemoriesViewto use updated button components and improved icon layouts. - Updated
KnowledgeCardandArticleDetailHeaderto standardize typography weights and iconography. - Added
maxItemWidthtoBreadcrumbsto prevent layout overflow in headers.
- Refactored
- Knowledge Center state management:
- Implemented
pendingSaveCountRefinKnowledgePageDetailComponentto prevent premature status transitions toSAVEDduring concurrent debounced patches. - Synchronized
TitleComponentwith external prop changes to ensure the input reflects the persisted display name.
- Implemented
- Messaging and Localization:
- Updated
soft-delete-message-for-entityinen-us.jsonto reflect that soft-deleted items can be restored from Archives. - Standardized delete confirmation modal messages across
ContextCentermodules to use consistent entity type labeling.
- Updated
This will update automatically on new commits.
Greptile Summary
This PR addresses Context Center UX feedback across the Knowledge Center and Context Center modules β fixing a race condition where concurrent debounced saves prematurely flipped status to SAVED, syncing TitleComponent without clobbering in-progress edits, and rendering quick links inline in the article hierarchy with a dedicated click handler.
pendingSaveCountRefinKnowledgePageDetailComponent: increments onbeginTrackedSaveand decrements onendTrackedSave(called fromfinally) so the SAVED state only transitions once all concurrent saves have settled.TitleComponentprop sync guard: introducesprevValueRefso incomingvalueprop updates only overwrite local state when the user has not diverged from the last persisted value, preventing API-response clobbers.- Quick link inline editing in
KnowledgePagesHierarchy: quick-link nodes now render with a click handler (onQuickLinkClick) instead of a<Link>, and their delete callshardDelete=truewhile article deletes remain soft; the article count in the hierarchy header now draws from a dedicatedgetListKnowledgePages({ limit: 0 })call rather than pagination state.
Confidence Score: 4/5
Safe to merge with one small UI label inconsistency; a previously-flagged delete-message/API mismatch for articles remains unaddressed in both KnowledgePagesHierarchy and ArticleDetailHeader.
The concurrent-save fix, TitleComponent sync guard, and quick-link hierarchy rendering are all correct. The delete flow for quick links is now consistent (hardDelete=true matches the permanent-deletion message). However, article deletes in both KnowledgePagesHierarchy and ArticleDetailHeader still call the soft-delete API while showing the removed permanently message, leaving soft-deleted articles unrecoverable via the Archive UI β a mismatch that was raised in a prior review round and has not yet been resolved.
KnowledgePagesHierarchy.tsx and ArticleDetailHeader.component.tsx β the article delete path still shows a permanent-deletion message while performing a soft-delete.
Important Files Changed
| Filename | Overview |
|---|---|
| openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePageDetailComponent/KnowledgePageDetailComponent.tsx | Adds pendingSaveCountRef to prevent premature SAVED status when multiple debounced saves are in flight; uses functional setState updater to avoid stale closures. |
| openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/TitleComponent/TitleComponent.tsx | Adds prevValueRef guard so incoming prop changes only sync to local state when the user has not diverged from the last known saved value, preventing mid-edit clobbers. |
| openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx | Quick links now rendered inline with articles; collapse/expand toggling switched from empty-keys heuristic to explicit isUserExpandedAll flag; article count label mismatch with all-type total count. |
| openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterArticlesPage/ContextCenterArticlesPage.tsx | Adds quick-link inline editing via handleQuickLinkClick; refactors callbacks to useCallback; wraps permission fetch and article/quick-link creation in memoized callbacks. |
| openmetadata-ui/src/main/resources/ui/src/utils/StringUtils.ts | Adds decodeHtmlEntities (DOMParser-based, browser-safe) and pipes stripMarkdown output through it to decode HTML entities left over from markdown removal. |
| openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json | Adds soft-delete-archive-message (used by ContextCenterDocumentsPage), article-lowercase, document-lowercase, and quick-link-lowercase keys without modifying the global soft-delete-message-for-entity. |
| openmetadata-ui/src/main/resources/ui/src/rest/knowledgeCenterAPI.ts | Changes getPageHierarchyFromES pageType parameter from PageType.ARTICLE default to optional, enabling hierarchy calls to return all page types including quick links. |
| openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx | Replaces inline clipboard logic with CopyLinkButton; updates color tokens; switches delete message to delete-entity-permanently while the API call still does a soft-delete (hardDelete=false). |
Sequence Diagram
%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant U as User (types title/content)
participant TC as TitleComponent
participant KPD as KnowledgePageDetailComponent
participant API as patchKnowledgePage API
U->>TC: onChange(value)
TC->>KPD: handleDisplayNameOnChange
KPD->>KPD: setContentChangeState(UN_SAVED)
KPD->>KPD: "beginTrackedSave() pendingSaveCount=1"
KPD->>API: patchKnowledgePage(patch1)
U->>TC: onChange(more text)
TC->>KPD: handleDisplayNameOnChange
KPD->>KPD: "beginTrackedSave() pendingSaveCount=2"
KPD->>API: patchKnowledgePage(patch2)
API-->>KPD: response1
KPD->>KPD: "endTrackedSave() pendingSaveCount=1 stay SAVING"
KPD-->>TC: value prop updated
TC->>TC: "titleValue != prevValueRef skip sync"
API-->>KPD: response2
KPD->>KPD: "endTrackedSave() pendingSaveCount=0 set SAVED"
KPD-->>TC: value prop updated
TC->>TC: "titleValue == prevValueRef sync"
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant U as User (types title/content)
participant TC as TitleComponent
participant KPD as KnowledgePageDetailComponent
participant API as patchKnowledgePage API
U->>TC: onChange(value)
TC->>KPD: handleDisplayNameOnChange
KPD->>KPD: setContentChangeState(UN_SAVED)
KPD->>KPD: "beginTrackedSave() pendingSaveCount=1"
KPD->>API: patchKnowledgePage(patch1)
U->>TC: onChange(more text)
TC->>KPD: handleDisplayNameOnChange
KPD->>KPD: "beginTrackedSave() pendingSaveCount=2"
KPD->>API: patchKnowledgePage(patch2)
API-->>KPD: response1
KPD->>KPD: "endTrackedSave() pendingSaveCount=1 stay SAVING"
KPD-->>TC: value prop updated
TC->>TC: "titleValue != prevValueRef skip sync"
API-->>KPD: response2
KPD->>KPD: "endTrackedSave() pendingSaveCount=0 set SAVED"
KPD-->>TC: value prop updated
TC->>TC: "titleValue == prevValueRef sync"
Comments Outside Diff (1)
-
openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx, line 839-851 (link)Article delete: "permanently removed" message but soft-delete API call
The delete modal now shows
delete-entity-permanently("Once you delete this article, it will be removed permanently."), but the actual API call for articles isdeleteKnowledgePage(deletePage.id)β which defaults tohardDelete = false(soft-delete). Since the Archive page no longer lists soft-deleted articles (that display was removed inContextCenterArchivePage.tsx), users who "permanently delete" an article cannot recover it via the UI while the record silently accumulates as a soft-deleted row in the database.Either pass
hardDelete = truefor articles to match the modal message, or revert to a soft-deleteβappropriate message (e.g.,soft-delete-archive-messageorsoft-delete-message-for-entity) and restore the archive display. The same inconsistency exists inArticleDetailHeader.component.tsx(line 652) wheredelete-entity-permanentlyis used withdeleteKnowledgePage(knowledgePage.id)(nohardDelete).
Reviews (18): Last reviewed commit: "minor fix" | Re-trigger Greptile
π‘ Playwright Results β all passed (54 flaky)
β 4422 passed Β· β 0 failed Β· π‘ 54 flaky Β· βοΈ 38 skipped
| Shard | Passed | Failed | Flaky | Skipped |
|---|---|---|---|---|
| π‘ Shard 1 | 320 | 0 | 5 | 4 |
| π‘ Shard 2 | 817 | 0 | 12 | 9 |
| π‘ Shard 3 | 825 | 0 | 4 | 7 |
| π‘ Shard 4 | 829 | 0 | 2 | 10 |
| π‘ Shard 5 | 853 | 0 | 21 | 0 |
| π‘ Shard 6 | 778 | 0 | 10 | 8 |
π‘ 54 flaky test(s) (passed on retry)
Features/CustomizeDetailPage.spec.tsβΊ Dashboard - customization should work (shard 1, 1 retry)Features/TagsSuggestion.spec.tsβΊ should edit and accept suggested tags for an api endpoint response schema field (shard 1, 1 retry)Flow/Metric.spec.tsβΊ Verify Unit of Measurement Update (shard 1, 1 retry)Flow/SearchRBAC.spec.tsβΊ the browse tree only shows the asset-type categories a user can access (shard 1, 1 retry)Features/DomainIsolation/DomainLineageIsolation.spec.tsβΊ userA sees tableA but not the cross-tenant tableB node (shard 1, 1 retry)Features/BulkEditEntity.spec.tsβΊ Glossary (shard 2, 1 retry)Features/BulkImport.spec.tsβΊ Database service (shard 2, 2 retries)Features/BulkImport.spec.tsβΊ Database Schema (shard 2, 1 retry)Features/BulkImport.spec.tsβΊ Keyboard Delete selection (shard 2, 1 retry)Features/BulkImportWithDotInName.spec.tsβΊ Import at database level with dot in service name (shard 2, 1 retry)Features/Container.spec.tsβΊ expand / collapse should not appear after updating nested fields for container (shard 2, 1 retry)Features/Container.spec.tsβΊ Copy column link button should copy the column URL to clipboard (shard 2, 1 retry)Features/DataQuality/Profiler.spec.tsβΊ Update profiler setting modal (shard 2, 1 retry)Features/DataQuality/TestCaseImportExportE2eFlow.spec.tsβΊ Admin: Complete export-import-validate flow (shard 2, 2 retries)Features/ExploreQuickFilters.spec.tsβΊ explore tree sidebar selection is not cleared when a top dropdown filter is applied (shard 2, 1 retry)Features/GlobalSearchSuggestions.spec.tsβΊ Navigate to column from column suggestion (shard 2, 2 retries)Features/Glossary/GlossaryHierarchy.spec.tsβΊ should cancel move operation (shard 2, 1 retry)Features/Permissions/EntityPermissions.spec.tsβΊ Dashboard allow entity-specific permission operations (shard 3, 1 retry)Features/SearchExport.spec.tsβΊ Export queues a background job and downloads from the jobs tray (shard 3, 1 retry)Features/Table.spec.tsβΊ Table pagination with sorting should works (shard 3, 1 retry)Features/TestSuiteMultiPipeline.spec.tsβΊ TestSuite multi pipeline support (shard 3, 1 retry)Pages/CustomProperties.spec.tsβΊ Time (shard 4, 1 retry)Pages/DataContractsSemanticRules.spec.tsβΊ Validate DataProduct Rule Any_In (shard 4, 1 retry)Pages/Entity.spec.tsβΊ Delete File (shard 5, 1 retry)Pages/Entity.spec.tsβΊ User as Owner Add, Update and Remove (shard 5, 1 retry)Pages/Entity.spec.tsβΊ Filter columns by tag prunes non-matching rows (shard 5, 1 retry)Pages/Entity.spec.tsβΊ Update displayName (shard 5, 1 retry)Pages/Entity.spec.tsβΊ Follow & Un-follow entity (shard 5, 1 retry)Pages/Entity.spec.tsβΊ Domain Propagation (shard 5, 1 retry)Pages/Entity.spec.tsβΊ User as Owner Add, Update and Remove (shard 5, 1 retry)- ... and 24 more
π¦ Download artifacts
How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace
Jest test Coverage
UI tests summary
| Lines | Statements | Branches | Functions |
|---|---|---|---|
| 63.03% (70293/111522) | 45.91% (40664/88565) | 47.29% (12523/26478) |
Quality Gate passed for 'open-metadata-ui'
Issues
1251 New issues
0 Accepted issues
Measures
13 Security Hotspots
0.0% Coverage on New Code
3.4% Duplication on New Code
Improves Knowledge Center UI consistency and state management by implementing debounced save tracking and input sync guards. All previous findings regarding count labels, HTML structure, and state drift have been resolved. π openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx:249
The badge π openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx:239-246 π openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx:722
Previously the displayed value came from π openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx:581 π openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx:588
The QuickLinkIcon and File06 icons use π openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx:236 π openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx:774-788 π openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx:699-708
The expand/collapse button in This is a cosmetic/UX inconsistency rather than a functional break. Consider deriving the toggle state from whether π openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx:637-644 π openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx:613-627
This commit replaced the quick-link Fix: keep the outer element non-button (e.g., a ...and 4 more resolved from earlier reviews Display: compact β Showing less information. Comment with these commands to change:Code Review β
Approved 9 resolved / 9 findings
β
9 resolved
β
Quality: Tag key changed from tagFQN to non-unique tag.name
key was changed from String(tag.tagFQN ?? '') to tag.name. tag.name is less unique than the fully-qualified tagFQN (two tags in different classifications can share the same name), risking duplicate React keys and reconciliation glitches. tag.name can also be undefined for some tag shapes. Prefer keeping tagFQN as the key.β
Bug: Total count counts all pages, mislabeled as articles
fetchKnowledgePagesTotalCount calls getListKnowledgePages({ limit: 0 }) without a pageType filter. Per knowledgeCenterAPI.ts, getListKnowledgePages hits /contextCenter/pages and returns ALL knowledge pages (articles + quick links), whereas the hierarchy itself is fetched via getPageHierarchyFromES, which defaults to pageType: PageType.ARTICLE. The rendered label uses this count next to t('label.article-plural') ({knowledgePagesTotalCount} {t('label.article-plural')}).paginationState.paging.total, which was derived from the ARTICLE-filtered hierarchy fetch. After this change the displayed article count will be inflated by quick-link pages (and any other page types), so the number shown to users no longer matches the article list. KnowledgePageListParams already supports a pageType field, so the fix is to pass pageType: PageType.ARTICLE to scope the count to articles.β
Quality: Duplicated Tailwind prefix: tw:tw:text-quaternary
className="tw:shrink-0 tw:tw:text-quaternary" with a duplicated tw: prefix. tw:tw:text-quaternary is not a valid class, so the intended quaternary text color will not be applied and the icon falls back to the inherited color. Fix the typo to tw:text-quaternary.β
Edge Case: Expand/collapse toggle state can drift from actual tree state
KnowledgePagesHierarchy now derives its icon/action solely from isUserExpandedAll (set to true in handleExpandAll, line 236, and false when the collapse button is clicked, line 782). However, expandedKeys is mutated independently of this flag:
activeKey effect (lines 699-707) appends keys to expandedKeys when navigating, so nodes can be expanded while isUserExpandedAll is still false β the button keeps showing "Expand all" even though part of the tree is already expanded.isUserExpandedAll stays true, so the button still reads "Collapse all" and a single click wipes all expansion (setExpandedKeys([])).expandedKeys actually covers all expandable nodes (or clearing isUserExpandedAll when the user collapses a node) so the button label always matches the visible tree.β
Bug: Nested
div role="button" wrapper with a real <button> element (lines 637-644). That <button> still renders {deleteButton} as a child, and deleteButton is a ButtonUtility, which renders a native <button> (confirmed via react-aria-components). Nesting a <button> inside a <button> is invalid HTML: React emits a hydration/DOM-nesting warning, and browsers auto-correct by closing the outer button early, which can break the flex layout (justify-between) and the delete button's positioning, and lead to inconsistent click handling. The previous div role="button" did not have this problem because a div is not an interactive button element.div/span with role="button", tabIndex={0}, and keyboard handler as before) so the inner delete <button> remains valid, or move the delete button outside the clickable button wrapper. If accessibility via a native button is desired, the delete action should not be a descendant of the outer button.Options
Compact
gitar display:verbose
Was this helpful? React with π / π | Gitar