Skip to content

Context center folder crud, integrate search api and bug fixes#28241

Merged
Rohit0301 merged 18 commits into
mainfrom
context-center-ui-1
May 26, 2026
Merged

Context center folder crud, integrate search api and bug fixes#28241
Rohit0301 merged 18 commits into
mainfrom
context-center-ui-1

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented May 18, 2026

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #

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:

  • 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 Improvements:
    • Updated DocumentFolderView to wrap folder titles in a div for better layout control.
    • Enhanced DocumentsView by adding FolderIcon to folder list items and standardizing Typography styling for menu actions.
  • API Integration & Fixes:
    • Corrected the query parameter order for deleteKnowledgePage in Playwright tests to match API expectations.
  • Code Cleanup:
    • Refactored CreateFolderModal and DocumentFolderView imports to use absolute paths.
    • Simplified ternary operators and reordered constants in KnowledgePagesHierarchy.

This will update automatically on new commits.

@Rohit0301 Rohit0301 requested review from a team, chirag-madlani and karanh37 as code owners May 18, 2026 19:04
@Rohit0301 Rohit0301 self-assigned this May 18, 2026
@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label May 18, 2026
Comment thread openmetadata-ui/src/main/resources/ui/src/utils/DatabaseServiceUtils.tsx Outdated
Comment thread openmetadata-ui/src/main/resources/ui/playwright/utils/userWorkflowUtils.ts Outdated
@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (11 flaky)

✅ 4251 passed · ❌ 0 failed · 🟡 11 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 802 0 1 9
🟡 Shard 3 802 0 1 8
🟡 Shard 4 844 0 1 12
🟡 Shard 5 718 0 1 47
🟡 Shard 6 787 0 6 8
🟡 11 flaky test(s) (passed on retry)
  • Features/MetricCustomUnitFlow.spec.ts › Should create metric and test unit of measurement updates (shard 1, 1 retry)
  • Features/DataQuality/BundleSuiteBulkOperations.spec.ts › Add test case to existing Bundle Suite (shard 2, 1 retry)
  • Features/KnowledgeCenter.spec.ts › Article mentions in description should working for Knowledge Center (shard 3, 1 retry)
  • Pages/CustomProperties.spec.ts › Enum (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Glossary CSV import preserves typed relations (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Create team with domain and verify visibility of inherited domain in user profile after team removal (shard 6, 1 retry)
  • Pages/Users.spec.ts › Should add, remove, and navigate to persona pages for Personas section (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@Rohit0301 Rohit0301 force-pushed the context-center-ui-1 branch from 69df2b4 to a8e415b Compare May 25, 2026 06:00
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 61 out of 61 changed files in this pull request and generated 9 comments.

Comments suppressed due to low confidence (5)

openmetadata-ui/src/main/resources/ui/src/utils/ContextCenterUtils.tsx:1

  • ContextFile.fileSize is commonly optional in generated entity models; passing undefined into formatBytes can result in "NaN" output or a runtime error depending on formatBytes implementation. Consider defaulting to 0 (or a fallback label) when file.fileSize is missing.
    openmetadata-ui/src/main/resources/ui/src/utils/ContextCenterUtils.tsx:1
  • ContextFile.fileSize is commonly optional in generated entity models; passing undefined into formatBytes can result in "NaN" output or a runtime error depending on formatBytes implementation. Consider defaulting to 0 (or a fallback label) when file.fileSize is missing.
    openmetadata-ui/src/main/resources/ui/src/rest/knowledgeCenterAPI.ts:1
  • This changes the import of PagingResponse from a relative path (../Models) to a bare module specifier (Models). Unless the project has a paths/alias entry for Models, this will fail at build time. Prefer keeping the import consistent with the previous relative path (or update all references consistently if the codebase is moving to aliased imports).
    openmetadata-ui/src/main/resources/ui/src/rest/knowledgeCenterAPI.ts:1
  • This changes the import of PagingResponse from a relative path (../Models) to a bare module specifier (Models). Unless the project has a paths/alias entry for Models, this will fail at build time. Prefer keeping the import consistent with the previous relative path (or update all references consistently if the codebase is moving to aliased imports).
    openmetadata-ui/src/main/resources/ui/src/utils/TagClassBase.ts:1
  • setFilterClassification is an instance method but it mutates a static field. This is confusing for callers and makes the API look instance-scoped when it’s actually global. Consider making setFilterClassification a static method (or changing filterClassification to be instance state if global behavior isn’t required).

key={folder.id}
textValue={folder.displayName ?? folder.name}>
<Tree.ItemContent>
<div className="custom-group tw:flex tw:flex-1 tw:items-center tw:gap-2 tw:min-w-0">
Comment on lines +187 to +198
<ButtonUtility
className="tw:opacity-0 group-hover-opacity-100 tw:shrink-0"
color="tertiary"
data-testid={`delete-folder-btn-${folder.id}`}
icon={Trash01}
size="xs"
tooltip={t('label.delete')}
onClick={(e) => {
e.stopPropagation();
setFolderToDelete(folder);
}}
/>
</Tooltip>
<Dropdown.Popover className="tw:w-32">
<Dropdown.Popover className="tw:w-46">
<Dropdown.Menu
Comment on lines +113 to +114
<SubmenuTrigger>
<AriaMenuItem
</div>
)}
</AriaMenuItem>
<AriaPopover
className="tw:z-50 tw:w-52 tw:rounded-lg tw:bg-primary tw:py-1 tw:shadow-lg tw:ring-1 tw:ring-secondary_alt"
offset={4}
placement="right top">
<AriaMenu className="tw:max-h-48 tw:overflow-y-auto tw:outline-hidden tw:select-none">
Comment on lines +340 to +359
const hasMore = knowledgePages.length < paging.total;
if (
isInView &&
hasMore &&
!isLoadingMore &&
!searchQuery &&
hasViewPermission
) {
const nextOffset = pageOffset + PAGE_SIZE_MEDIUM;
setPageOffset(nextOffset);
fetchKnowledgePages(nextOffset);
}
}, [isInView, paging, isLoadingMore, hasViewPermission]);
}, [
isInView,
paging.total,
knowledgePages.length,
isLoadingMore,
searchQuery,
hasViewPermission,
]);
Comment on lines +155 to +159
{folders.map((folder) => {
const isSelected = selectedFolderId === folder.id;
const folderFiles = files.filter(
(f) => f.folderId === folder.id
);
});

test('download button triggers file download', async ({ page }) => {
test.fixme('download button triggers file download', async ({ page }) => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants