Repository navigation
fix(knowledge): show why list, tag and bulk actions failed - #27103
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: each read or write that failed silently now gets a shared Notes
[DESIGN-REVIEWED] b5f4ac5 Description read[DESCRIPTION-READ] a96926ac265d86c6a39647733809b0581ba80f311978929f81e846a6e9b41043 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: every notice replaces an empty or "not found" state the page used to show when a request failed, and the tests cover each case. Notes
What this change shipsInventory (9 items) — 8 justifiedIntent: when a Knowledge page request fails, the user is told why instead of seeing an empty or "not found" state. FIX.
[FIRST-PRINCIPLES-REVIEWED] b5f4ac5 Description read[DESCRIPTION-READ] 8e924203458b46792bca709f4b215a2b089268d3585a08a90229210df312f991 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the bulk Archive/Delete failure notice. It is the change the PR title names, and no screenshot shows it. Three other new failure notices are also unshown. Evidence gaps
Notes
[UX-REVIEWED] b5f4ac5 Description read[DESCRIPTION-READ] 528353b0f831a14b1416d8785b7c2d5f389f84eaac6743dc8494a9a47e0d8adc That sha256 names everything this verdict read: the PR description, plus the 9 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
c66bfa3 to
66dae4f
Compare
|
self-added: yes
|
|
self-added: yes
|
66dae4f to
03c9883
Compare
|
self-added: yes
|
03c9883 to
b5f4ac5
Compare
iamwhatever
left a comment
There was a problem hiding this comment.
Approve at b5f4ac5.
Each Knowledge read or write that failed silently now shows the shared ErrorNotice with the server reason, and a failed read with no rows no longer passes as an empty library (index.tsx#L285, DetailView.tsx#L209). Success paths render as before. The earlier GPT findings have fixed dispositions with tests, the current-head GPT and Opus lanes report none, and all checks on this head are green.
AI findings judged non-blocking
- Design note: the bulk-failure notice outlives a filter or page change. It is dismissible and the dismiss clears both mutations, so it is cosmetic (index.tsx#L198-L203).
- First Principles note:
failureTextand theerror_no_reasonkeys are duplicated. Style and subtraction only, with no user-visible harm (DetailView.tsx#L27, SourceGroup.tsx#L135). - UX evidence gaps: four failure notices have no screenshot. Each uses the same
ErrorNoticethe shown screenshots use, and the tests assert each one renders (index.tsx#L646). - UX notes: the footer count under a list error, raw server reasons, and no Ask-the-agent on the tag notice. These are polish suggestions, and the last one is intended because the field holds an unsaved draft.
— crew-pr-reviewer (r139)
Problem / Motivation
Goal: When a Knowledge page request fails, the page says why instead of showing nothing, an empty library, or "not found".
On the Knowledge page, a failed tag save, bulk Archive or bulk Delete says nothing. A failed list read shows onboarding or "No items match". A failed item read shows "Item not found". A failed related-items, source-row or entity read hides its section or shows "No items found".
Why it matters
A user whose request failed is told the wrong thing. They re-upload a library they already have, look for an item that still exists, or click Archive again with no idea why the rows came back. Nobody can hand the error to the agent, because there is no error on screen.
Not a goal
website/src/pages/knowledge/api.ts(other open PRs edit it) orSourcesList.tsx.DetailView.tsx: it already shows its error, and fix: migrate renderer native dialogs #21276 edits those lines.What changed (motivation → approach → change)
Each of these requests had no error branch. The page drew its empty or "not found" state in its place.
DetailView.tsx)index.tsx)SourceGroup.tsx)The bulk notice stays mounted when the optimistic update empties the selection. Every notice is the shared
ErrorNoticewith the server reason, pererrors-use-error-notice. It shows "Ask the agent" everywhere except next to the unsaved tag draft. A failed read with nothing cached no longer counts as an empty library, so onboarding stays away. New strings are in all 12 shipped catalogs underwebsite/src/i18n/locales/;en-XA.jsonis regenerated.Backwards compatibility
Compatible: success paths render exactly as before. Only failure paths gain a notice.
Removes nothing: no request, prop, key or behavior on a success path is removed.
Tests
website/src/test/KnowledgeDetailViewErrors.test.tsx: item read, re-read after save, tag save (draft kept, no hand-off), closing the editor clears the notice, related items, empty-reason fallback.website/src/test/KnowledgeIndexErrors.test.tsx: bulk Archive, bulk Delete, a bulk failure that lands after the selection empties, the latest action failure wins, source list (no onboarding), a failed refresh over a cached empty library, search, entity items, and no notice on success.website/src/test/KnowledgeSourceGroup.test.tsx: a failed read in an open row, and no notice on success.The 12 cases first written, plus the SourceGroup case, were run against
origin/main: every failure case fails there, and the two no-notice cases pass. The 38 related frontend test files pass (1,180 tests), and so do the i18n suites withI18N_BASE_REF=origin/main. The two new files pass under three shuffled seeds.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Rendered the item, detail and list views in a Vite harness with
fetchstubbed to fail, in dark and light. Screenshots below.Screenshots / video
Item read failed:
Tag save and related items failed, cached item kept:
Source list failed (was the onboarding screen):
Light variants
Related Issues
Fixes #27093
Sibling sweep
Swept: git grep -nE "useQuery(|useMutation(" -- website/src/pages/knowledge/
Sibling: website/src/pages/knowledge/SourceGroup.tsx:68 -- changed here
Sibling: website/src/pages/knowledge/EmbeddingStatus.tsx -- not affected -- fixed in #26737
Sibling: website/src/pages/knowledge/KnowledgeGraph.tsx -- not affected -- already renders ErrorNotice on a failed read
Sibling: website/src/pages/knowledge/SettingsTab.tsx -- not affected -- already renders ErrorNotice for load and save
Sibling: website/src/pages/knowledge/SourcesList.tsx -- not affected -- already renders ErrorNotice for its mutations
Pattern harvest
Rule candidate: review-prompt
Pattern: a list read with no error branch renders its empty state when the request fails
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)