Repository navigation
Fixes #38019: Knowledge Center Articles page shows in-place error state instead of the onboarding empty placeholder when the list fetch fails - #38047
Merged
Rohit0301 merged 4 commits intoNov 18, 2026
Conversation
Reload after a failed load-more refetched offset 0 without resetting pageOffset, so the next load-more skipped a page. Also stop load-more from auto-retrying while the error view is shown, and make the e2e recovery check wait for the retry response and a settled end state.
Reusing the same element in rerender lets React bail out, so the changed in-view mock may never be read.
The Jest suite covers the error placeholder, empty-state reporting, Reload recovery and paging reset.
Rohit0301
approved these changes
Nov 18, 2026
shrabantipaul-collate
approved these changes
Nov 18, 2026
Rohit0301
deleted the
detail/bug-fix/fixes-38019-knowledge-center-articles-page-shows-i-3b1afc
branch
November 18, 2026 06:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detail bug report: View on Detail
Describe your changes:
Fixes #38019
On the Knowledge Center "Articles" page, a transient failure of the articles-list GET (
/api/v1/contextCenter/pages) was indistinguishable from a legitimately empty list. The fetch'scatchonly showed a transient toast and thefinallyclearedisLoadingexactly like a successful load, soKnowledgePageListComponentreportedonEmptyStateChange(true)toContextCenterArticlesPage, which then hid the entire layout (sidebar + toolbar + list area) behind the "Write it once, let AI answer it forever" onboarding placeholder. Users hitting a 5xx/timeout/network blip saw a persuasively empty Knowledge Center with no retry option until they navigated away and back.I worked on this because the asymmetry was already half-solved: the parent explicitly excluded a permission-fetch failure (
permissionFetchFailed) from the empty-state decision, but the more failure-prone list-fetch had no equivalent error signal — so a transient 500 was funneled straight into the onboarding-placeholder pathway that PR #30053 (52f9eef) introduced.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
onEmptyStateChange(false)— so the sidebar + toolbar + list area stay visible.SomethingWentWrongPlaceholder(with aReloadaction) instead of the onboarding empty placeholder when the fetch fails.ReloadretriesfetchKnowledgePages(0); on success it recovers to the list (or genuine empty state), and the failure flag is reset so a successful retry correctly reports genuine emptiness.onEmptyStateChange(true)and renders the genuine onboarding placeholder (the bug fix must not break the legitimate empty case).Unit tests
openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePageListComponent/KnowledgePageListComponent.test.tsx(9 new cases added to the existing 6, total 15). The new cases cover: failure →onEmptyStateChange(false), the in-place error placeholder rendering, the Reload retry recovery, the failure-flag reset on retry and on sort change, the permissions-loading guard, the genuine-empty and non-empty non-regression checks, and the ES-route failure path. Also tightened the existing module-levelsearchAPImock (it returnedundefined, which would now trip the new catch path during the unrelated permission tests).KnowledgePageListComponent.tsximproved from 64.4% → 67.3% lines; the 90% target is not reached on this component due to a PRE-EXISTING gap (the*KnowledgePage/ vote / follow / unfollow / delete / pagination handlers are untested and out of scope for this fetch-failure fix). All newly added lines are covered.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
openmetadata-ui/.../ui/playwright/for UI changes.KnowledgePageListComponent.test.tsxcovers the full scenario (error placeholder instead of the onboarding empty state, no empty report to the parent, Reload recovery, and paging restarting from offset 0 after a failed load-more), so a separate E2E spec would only duplicate it.Features/ContextCenterArticlesFilters.spec.tsand the "Article list basics and creation entrypoints" case inFeatures/ContextCenterArticles.spec.tspassed unchanged locally.Visual regression baselines
SomethingWentWrongPlaceholderalready in the design system).Manual testing performed
docker compose -f docker/development/docker-compose.yml up -d mysql elasticsearch; ran schema migrations viajava -cp <classpath> org.openmetadata.service.util.OpenMetadataOperations -c conf/openmetadata.yaml migrate; copied my Vite-built UI dist intoopenmetadata-service/target/classes/assets/and started the server withorg.openmetadata.service.OpenMetadataApplication server conf/openmetadata.yaml(added127.0.0.1 <hostname>to/etc/hoststo satisfy Quartz's hostname lookup).ContextCenterArticlesPage-*.jschunk contains the new error-state markers (e.g. 3×tw:relative tw:flex-1+min-h-[320px]— the third occurrence is the newKnowledgePageListErrorState).POST /api/v1/auth/loginwith{email:"[email protected]", password:"YWRtaW4="}(base64 password) returns 200 + accessToken;GET /api/v1/contextCenter/pagesreturns 401 unauth, 200{data:[], paging:{total:0}}with admin token;GET /api/v1/system/healthreturns 200OK./api/v1/contextCenter/pagesshows the in-place error placeholder with the sidebar/toolbar intact, and Reload recovers the list (see Screenshots).Routine checks:
yarn test(16/16 on the changed spec; 21 suites / 206 tests across Knowledge Center + Context Center pages),yarn tsc:check(no new diagnostics — the singleOMSelectWidget.tsxerror is PRE-EXISTING, confirmed by stashing my changes and reproducing it),yarn lint:base --fixandyarn pretty:base --write(clean — only 4 pre-existingreact-hooks/exhaustive-depswarnings, no new errors),yarn i18nandyarn generate:app-docs(no diff),node scripts/tw-audit.js(0 hardcoded-color errors),yarn buildandyarn bundle:check(both pass, budget unchanged) all pass.UI screen recording:
Not applicable — standalone bug fix with no new product feature surface; the only rendering change is a standard error placeholder that already exists in the design system and is already exercised elsewhere. The visible behavior is shown in the Screenshots section below.
Screenshots:
List fetch fails — the sidebar and toolbar stay visible, and the list area shows the in-place error placeholder with Reload (not the onboarding empty state):
After Reload — the list recovers in place:
Captured on this branch (local Vite dev server against a local backend), with
/api/v1/contextCenter/pagesforced to 500 and then unblocked.Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.hasFetchFailedflag's parallel to the existingpermissionFetchFailedcontract, the latest-request guard onsetHasFetchFailed(true), and the!hasFetchFailedsuppression in the emptiness-reporting effect.)REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below. (The fix mirrors an existing well-established pattern —permissionFetchFailed— so adds no new decision worth an ADR entry.)docs/decisions/(see itsREADME.md). This description is gone fromgit logafter the squash-merge. (No durable decision added — the contract mirrors an existing one; the only durable fact is "list-fetch failure must be a distinct state from empty", which is encoded in the unit tests.)renders the in-place error placeholder, not the onboarding empty state, when the fetch rejectscovers the exact reported scenario.)Automatic Fixes PRs can be configured here.


Confidence Score: 5/5
The reviewed changes appear safe to merge.Summary
The Articles page now shows a retryable error instead of onboarding when loading fails, while keeping the sidebar and toolbar visible.
No new actionable issues found in the changes since the previous review. The earlier paging and test issues are addressed.
Reviews (7) · Last reviewed commit: "test(knowledge-center): drop the fetch-f..." · Reviewed by Greptile