Repository navigation
feat: register knowledge sources and add source with find_ui - #32305
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing changes on screen: the Sources tab renders with the same icon, label and classes as before, and Add Source only gains a [UX-REVIEWED] f0c4215 Description read[DESCRIPTION-READ] 73c476b6aa45f11267aadc1e16cf82afcf5a66051c051b1510739b7bcb4ba55c That sha256 names everything this verdict read: the PR description, plus the 3 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 item is a registration, marker or reveal-scope report that the guide to Add Source needs, and they reuse the existing What this change shipsInventory (6 items) — 6 justifiedIntent: when a user asks how to add a knowledge source, the agent can guide them all the way to the + Add Source button instead of stopping at the Knowledge tab. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] f0c4215 Description read[DESCRIPTION-READ] e6c6dd35f97f94b78f29853625cd96e09e024f38fc15383d66c34be110658e15 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns. The two Knowledge controls are registered in the existing [DESIGN-REVIEWED] f0c4215 Description read[DESCRIPTION-READ] affda4e866387cc265b31a0f822d0d2fe46f6fa381b70f6280a60733b22e23e7 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 |
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: |
b92b7bc to
fc20cf8
Compare
|
Rebased: main moved in The two generated files conflicted on their digests only; both were regenerated with [operator: bolichen97] |
fc20cf8 to
0de335a
Compare
|
Rebased: main moved in Only the generated index conflicted, on its digest and coverage counts; it was regenerated with [operator: bolichen97] |
0de335a to
7ae2ca0
Compare
|
Rebased: main moved in Only the generated index conflicted, on its digests and coverage counts; it was regenerated with [operator: bolichen97] |
|
Re-sync budget reset The base moved under this PR more times than the re-sync budget allows; a maintainer asked for one more round of re-syncs so it can be rebased and its conflicts resolved. [operator: bolichen97] |
7ae2ca0 to
ec8aa05
Compare
|
Rebased: main moved in [operator: bolichen97] |
buluoray
left a comment
There was a problem hiding this comment.
Approving. find_ui now registers the Knowledge > Sources tab and the + Add Source button with a reveal scope (website/src/pages/knowledge/index.tsx:279, 702-721; website/src/pages/knowledge/SourcesList.tsx:790; website/src/uiLocations/areas/capabilities.ts:81-99). The change is additive, roving focus on the tab bar still works, generated files are fresh, and tests and mutations confirm the guards. Build Desktop (ubuntu-22.04) failed on a 504; the arm build on the same head passed.
Asked how to add a source to the knowledge base, find_ui could only point at the Knowledge tab, so the user still had to find the Sources view and the button. Register both as find_ui locations under the existing Knowledge tab, with a reveal scope for the Sources view, so the guide walks the user's own dashboard from the tab to Add Source. Builds on #23324 by @cixuuz. Co-authored-by: cixuuz <26782336+cixuuz@users.noreply.github.com>
ec8aa05 to
f0c4215
Compare
|
Rebased: main moved in Only the generated find_ui index conflicted; it was taken from main and regenerated with [operator: bolichen97] |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving. On this head the review checked these points. The Sources tab marker keeps the roving focus ref, so ArrowLeft and End still reach it. The tab icon and label match the other tabs. The open:knowledge.sources-tab reveal scope is in the generated guide plans and reads closed, open and gone on unmount. The guide route really mounts the Knowledge page. The generated index and guide plans are current against main. A run of find_ui at this head returns knowledge.add-source for "add source" and 添加来源, and knowledge.sources-tab for "knowledge sources".
Done well: the new tests each fail if their production line is reverted, including the easy-to-miss case where a marked tab drops out of arrow-key focus.
Optional:
Closes #23304also closes theknowledge.searchhalf of that issue, which this PR leaves out on purpose. A follow-up issue forSearchInputforwarding a find_ui marker would keep that work tracked.knowledge.sources-tabhas frontend goldens but no backend en and zh-CN phrasing row intest/test_find_ui_schedule.py, so the ranking of its search terms is not pinned.- This PR and #34353 touch the same five files (the
capabilities.tsheader,mcp.md, the generated files). Whichever merges second should rebase, keep the other's wording, and rerunnpm run gen:ui.
Problem / Motivation
Goal: Asked how to add a source to the knowledge base, the agent can walk the user straight to the Add Source button in their own dashboard, not just to the Knowledge tab.
Asked where the knowledge library lives, the agent can only point at the tab (
/capabilities?tab=knowledge, whichfind_uireturns). Sent to "Add Source", the user lands on the Knowledge list and still has to find the Sources view and the button.Why it matters
"Where do I add a folder to the knowledge base?" is a common question, and today the answer is a tab plus a description of where to click.
find_uican only guide to a control it has registered.Not a goal
?highlight=route or any other agent-facing link format:find_ui's existing guide is the contract.SearchInput, which does not forward afind_uimarker.What changed (motivation → approach → change)
find_ui("add source")now answers Customize › Knowledge › Sources › + Add Source with a guide plan; onmainit stops at the Knowledge tab.The issue proposed a hand-kept table of Customize
?highlight=ids. That would be a second list beside thefind_uiindex, which already registers Customize controls under a parent tab (connections.mcp-servers-tab→mcp.add-custom). So the two Knowledge locations are registered infind_uiinstead, and the agent's existing guide walks the user from the tab to the button.uiLocations/areas/capabilities.tsknowledge.sources-tab(undertab.capabilities.knowledge) andknowledge.add-source(under the Sources tab), with newcomer search words in en and zh-CNpages/knowledge/index.tsxuseGuideRevealScope('open:knowledge.sources-tab', …)tells the guide when Sources is the open tabpages/knowledge/SourcesList.tsxknowledge.add-sourcemarkerui-index.generated.json,guidePlans.gen.tsnpm run gen:uidocs/architecture/mcp.mdBackwards compatibility
Compatible: two new index entries and two DOM markers; no existing location, route or label changes.
Removes nothing: the Knowledge tab strip renders the same four tabs with the same labels, icons, classes and keyboard handling.
Tests
uiLocations/schedule-artifacts-capabilities.locations.test.ts: goldens for both new locations (kind, label key, parent chain, route, entry, requirements) and that each marker sits at exactly one render site.KnowledgeEmbedded.test.tsx: the page reportsopen:knowledge.sources-tabclosed on the list view, open after clicking Sources, and drops the report on unmount; and the marked Sources tab still takes focus on an arrow key (fails when the marker does not forward the roving ref).test/test_find_ui_schedule.py: "add a folder to the knowledge base" and "添加文件夹到知识库" reachknowledge.add-sourcefirst, with its en and zh-CN path and route.find_ui, guide and UI-index tests (33 files) and 70 frontend Knowledge, guide anduiLocationstest files pass. On a heavily loaded machine some of them timed out and passed when re-run alone. Two still fail, neither about Knowledge: the Continue with GitHub golden intest_find_ui_auto.py, which fails wherever the generator runs (test_find_ui_auto: the Continue with GitHub golden fails wherever the generator runs #32670), andtest_scoped_runner_self_test_passes, which runs past its 120-second limit while the samerun_scoped_tests.py --testpasses on its own.Manual verification
Ran this branch's backend
find_ui: "add source" and "add a folder to the knowledge base" returnknowledge.add-sourcewith the path Customize › Knowledge › Sources › + Add Source at/capabilities?tab=knowledge; "knowledge sources" returnsknowledge.sources-tab; "where is my knowledge base?" staysno_match, as onmain.Screenshots / video
Why no screenshot: the Sources tab and Add Source render exactly as before; the diff adds only find_ui markers, a reveal-scope report and index entries.
Related Issues
Closes #23304
Builds on #23324 by @cixuuz.
The issue proposed
?highlight=links; this meets the same need (a user sent to Add Source lands on it) throughfind_ui's guide instead.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)