fix(ui): pass fields when fetching KnowledgePage in Explore summary panel - #31838
Conversation
…anel The Explore right-side summary panel requests a KnowledgePage (Context Center article) via getEntityByFqnUtil with fields 'owners,domains,tags', but the KNOWLEDGE_PAGE / KNOWLEDGE_CENTER branch called getKnowledgePageByFqn without forwarding the fields argument. The entity API omits fields-gated attributes unless requested, so the panel rendered "No Tags assigned" / "No Owners assigned" even though the article has tags and owners (both are present on the entity and in the search index). Forward the requested fields to getKnowledgePageByFqn so the summary panel shows tags, owners and domains for Context Center articles.
❌ 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 regression covering the fix: seeds a Context Center article with a tag, opens it in Explore, and asserts the tag shows in the summary panel. Fails on the unfixed build (panel fetched the page without fields=tags) and passes with the fix.
…right panel Adds a test to ContextCenterArticles.spec.ts that verifies the full article-authoring → search → panel flow: add a tag (KnowledgeCenter.Article) to a fresh article, wait for search indexing, navigate to Explore, open the right-side summary panel via global search, and assert the tag is visible. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…fails Wrap the test steps in try/finally so deleteArticleByFqn is always called, preventing orphaned KnowledgePage entities on assertion failures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| Count | Rule |
|---|---|
| 1 | sonarjs/cyclomatic-complexity |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/utils/EntityByFqnUtils.ts:60:32 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 51 which is greater than 10 authorized.","cost":41,"secondaryLocations":[{"line":60,"column":31,"endLine":60,"endColumn |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
✅ Playwright Results — workflow succeededValidated commit ✅ 593 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 51m 26s ⏱️ Max setup 5m 50s · max shard execution 16m 22s · max shard-job elapsed before upload 21m 49s · reporting 5s 🌐 212.04 requests/attempt · 2.77 app boots/UI scenario · 13.44% common-shard skew Optimization targets still in progress:
🟡 1 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 |
|
Code Review ✅ Approved 1 resolved / 1 findingsForwards requested fields when fetching KnowledgePages and KnowledgeCenters in the Explore summary panel, ensuring owners, domains, and tags correctly display. No issues found. ✅ 1 resolved✅ Quality: Article cleanup skipped when test assertion fails
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
…anel (#31838) (#31850) * fix(ui): pass fields when fetching KnowledgePage in Explore summary panel The Explore right-side summary panel requests a KnowledgePage (Context Center article) via getEntityByFqnUtil with fields 'owners,domains,tags', but the KNOWLEDGE_PAGE / KNOWLEDGE_CENTER branch called getKnowledgePageByFqn without forwarding the fields argument. The entity API omits fields-gated attributes unless requested, so the panel rendered "No Tags assigned" / "No Owners assigned" even though the article has tags and owners (both are present on the entity and in the search index). Forward the requested fields to getKnowledgePageByFqn so the summary panel shows tags, owners and domains for Context Center articles. * test(ui): e2e for KnowledgePage tags in Explore summary panel Playwright regression covering the fix: seeds a Context Center article with a tag, opens it in Explore, and asserts the tag shows in the summary panel. Fails on the unfixed build (panel fetched the page without fields=tags) and passes with the fix. * test(playwright): add E2E test for article tag visibility in Explore right panel Adds a test to ContextCenterArticles.spec.ts that verifies the full article-authoring → search → panel flow: add a tag (KnowledgeCenter.Article) to a fresh article, wait for search indexing, navigate to Explore, open the right-side summary panel via global search, and assert the tag is visible. * lint fix * fix(playwright): ensure article cleanup runs even when tag assertion fails Wrap the test steps in try/finally so deleteArticleByFqn is always called, preventing orphaned KnowledgePage entities on assertion failures. * lint fix --------- (cherry picked from commit 8d271ce) Co-authored-by: Rohit0301 <rj03012002@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Merged and Cherry-picked to 2.0 |



Problem
On the Explore page, selecting a Context Center article (KnowledgePage) shows an empty Tags list (and empty Owners / Domains) in the right-side summary panel — even though the article has tags and owners, which are visible when opening the article itself.
Root cause
The summary panel fetches the entity via
getEntityByFqnUtil(type, fqn, 'owners,domains,tags')(EntitySummaryPanel→fetchEntityData). But theKNOWLEDGE_PAGE/KNOWLEDGE_CENTERbranch ofgetEntityByFqnUtilcalledgetKnowledgePageByFqn(entityFQN)without forwarding thefieldsargument:So the request went out as
GET /contextCenter/pages/name/{fqn}with nofields=. The entity API omits fields-gated attributes (tags, owners, domains) unless requested, so the panel received an entity with none of them and rendered "No Tags assigned" / "No Owners assigned". The data itself is fine — the tags are on the entity and are present in the search index; only this fetch was under-requesting.Fix
Forward the requested
fieldstogetKnowledgePageByFqn:getKnowledgePageByFqn(pageName, params?)already acceptsListParamsand passes them through as query params, so no API change is needed.Tests
Added two cases to
EntityByFqnUtils.test.tsassertinggetKnowledgePageByFqnis called with the forwardedfieldsfor bothKNOWLEDGE_PAGEandKNOWLEDGE_CENTER. Verified RED → GREEN: both fail on the previous code and pass with the fix (full suite: 16/16 passing).How to verify manually
Greptile Summary
The PR forwards requested fields when fetching Knowledge Pages so Explore’s summary panel receives owners, domains, and tags.
fieldsthrough for both Knowledge Page entity variants.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Sequence Diagram
sequenceDiagram participant Explore as Explore summary panel participant Util as getEntityByFqnUtil participant API as Knowledge Page REST client participant Service as Context Center API Explore->>Util: Fetch Knowledge Page with owners,domains,tags Util->>API: "getKnowledgePageByFqn(fqn, { fields })" API->>Service: GET page by FQN with fields Service-->>Explore: Page with requested summary metadataReviews (4): Last reviewed commit: "lint fix" | Re-trigger Greptile