Repository navigation
Added attatchment widget for context center articles - #29842
Conversation
❌ 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 |
🟡 Playwright Results — all passed (28 flaky)✅ 4461 passed · ❌ 0 failed · 🟡 28 flaky · ⏭️ 127 skipped
🟡 28 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
3dbc34b to
001a72c
Compare
|
Code Review ✅ Approved 11 resolved / 11 findingsIntegrates an attachment widget for context center articles, enabling file uploads and management within the Knowledge Center. This release addresses all previous findings related to file upload security, blob URL lifecycle, and UI feedback mechanisms. ✅ 11 resolved✅ Bug: Possible crash when asset.extension is undefined
✅ Bug: Upload indicator toggled after upload completes, never shows
✅ Bug: Empty entityFqn passes undefined guard and uploads with empty link
✅ Quality: showErrorToast receives raw Error cast to string
✅ Quality: Hardcoded 'Upload' tab label not internationalized
...and 6 more resolved from earlier reviews OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |



Describe your changes:
Fixes 4915
I worked on ... because ...
Type of change:
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:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Summary by Gitar
AttachmentWidgettoKnowledgePageDetailRightPanelto display and manage context center article attachments.UploadFileTabcomponent for the block editor, enabling users to upload files via drag-and-drop.AttachmentWidgetto fetch and display attachments by entity FQN usinglistAssetsByFqn.collapsiblesupport toExtractedMemoriesCardto improve layout flexibility in the sidebar.This will update automatically on new commits.
Greptile Summary
This PR adds attachment support for context center articles. The main changes are:
Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
Comments Outside Diff (2)
openmetadata-ui/src/main/resources/ui/src/components/common/EntityDescription/EntityAttachmentProvider/EntityAttachmentProvider.tsx, line 99-105 (link)When
allowFileUploadis false and a non-image file is dropped or pasted, this branch reports the error but then continues into the upload path below. BecauseonImageUploadis now always wired to the attachment upload implementation, the file can still be persisted after the UI says uploads are not allowed. Return after reporting the error so disabled file-upload contexts cannot reachonImageUpload.Context Used: CLAUDE.md (source)
openmetadata-ui/src/main/resources/ui/src/hooks/useAuthenticatedImage.ts, line 2185-2189 (link)When two image nodes use the same attachment URL, both wait on the same download and receive the same
objectUrl. If one node unmounts before the download resolves and its continuation runs first, this branch acquires the URL and immediately releases it because the waiter is stale. That drops the refcount to zero and revokes the URL before the still-mounted node stores it inimageSrc, so the live image can render a broken blob URL.Reviews (17): Last reviewed commit: "Merge branch 'main' into article-attachm..." | Re-trigger Greptile
Context used (3)