Skip to content

fix(ui): pass fields when fetching KnowledgePage in Explore summary panel - #31838

Merged
Rohit0301 merged 6 commits into
mainfrom
fix/explore-contextcenter-page-summary-tags
Aug 20, 2026
Merged

fix(ui): pass fields when fetching KnowledgePage in Explore summary panel#31838
Rohit0301 merged 6 commits into
mainfrom
fix/explore-contextcenter-page-summary-tags

Conversation

@sonika-shah

@sonika-shah sonika-shah commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

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') (EntitySummaryPanelfetchEntityData). But the KNOWLEDGE_PAGE / KNOWLEDGE_CENTER branch of getEntityByFqnUtil called getKnowledgePageByFqn(entityFQN) without forwarding the fields argument:

case EntityType.KNOWLEDGE_PAGE:
case EntityType.KNOWLEDGE_CENTER:
  return getKnowledgePageByFqn(entityFQN);   // fields dropped

So the request went out as GET /contextCenter/pages/name/{fqn} with no fields=. 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 fields to getKnowledgePageByFqn:

case EntityType.KNOWLEDGE_PAGE:
case EntityType.KNOWLEDGE_CENTER:
  return getKnowledgePageByFqn(entityFQN, { fields });

getKnowledgePageByFqn(pageName, params?) already accepts ListParams and passes them through as query params, so no API change is needed.

Tests

Added two cases to EntityByFqnUtils.test.ts asserting getKnowledgePageByFqn is called with the forwarded fields for both KNOWLEDGE_PAGE and KNOWLEDGE_CENTER. Verified RED → GREEN: both fail on the previous code and pass with the fix (full suite: 16/16 passing).

How to verify manually

  1. Open a Context Center article that has tags and owners.
  2. Go to Explore, select that article.
  3. The summary panel now shows the article's Tags, Owners and Domains (previously "No Tags/Owners assigned").

Greptile Summary

The PR forwards requested fields when fetching Knowledge Pages so Explore’s summary panel receives owners, domains, and tags.

  • Passes fields through for both Knowledge Page entity variants.
  • Adds unit coverage for both dispatch branches.
  • Adds an end-to-end check for article tags in the Explore summary panel.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/utils/EntityByFqnUtils.ts Correctly forwards the existing fields argument to Knowledge Page requests.
openmetadata-ui/src/main/resources/ui/src/utils/EntityByFqnUtils.test.ts Adds focused unit coverage for forwarding fields for both Knowledge Page entity types.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts Adds end-to-end coverage showing an article tag in the Explore summary panel.

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 metadata
Loading

Reviews (4): Last reviewed commit: "lint fix" | Re-trigger Greptile

…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.
Copilot AI lite review requested due to automatic review settings August 20, 2026 16:25

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 66%
66.97% (80280/119874) 51.39% (49134/95593) 52.37% (14674/28017)

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.
Copilot AI review requested due to automatic review settings August 20, 2026 17:06

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…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>
Copilot AI review requested due to automatic review settings August 20, 2026 17:36

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.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI review requested due to automatic review settings August 20, 2026 17:37

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.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

…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>
Copilot AI review requested due to automatic review settings August 20, 2026 17:47

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.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI review requested due to automatic review settings August 20, 2026 17:49

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.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 1 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 1 warning(s) across 1 changed file(s).

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit bdb0b2079d260a5be752b4e12563950f56a8440c in Playwright run 32399762174, attempt 1.

✅ 593 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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:

  • Browser traffic was 212.04 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.77 per UI scenario (1742 boots / 629 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 117 0 0 0 0 0
🟡 Shard chromium-02 119 0 1 0 0 0
✅ Shard chromium-03 101 0 0 0 0 0
✅ Shard chromium-04 102 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 1 flaky test(s) (passed on retry)
  • Pages/Entity.spec.tsUser as Owner with unsorted list (shard chromium-02, 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

@sonarqubecloud

Copy link
Copy Markdown

@Rohit0301
Rohit0301 added this pull request to the merge queue Aug 20, 2026
Merged via the queue into main with commit 8d271ce Aug 20, 2026
96 of 99 checks passed
@Rohit0301
Rohit0301 deleted the fix/explore-contextcenter-page-summary-tags branch August 20, 2026 23:17
@gitar-bot

gitar-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Forwards 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

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts:406-420
The article is created via createArticleViaApi and only deleted by the inline deleteArticleByFqn block at the end of the test body (lines 442-445). If any earlier step throws — most likely the expect(...).toBeVisible() tag assertion at lines 434-438 — the cleanup code is never reached, leaving an orphaned KnowledgePage in the environment on every failing run. Per the project's Playwright cleanup rule, move the delete into an afterEach/test.afterEach (or wrap it in a try/finally) so cleanup always runs regardless of assertion outcome.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

sonika-shah added a commit that referenced this pull request Aug 21, 2026
…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>
@sonika-shah

Copy link
Copy Markdown
Collaborator Author

Merged and Cherry-picked to 2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 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