feat(kb-ui): lift search + collection load-more into the lib #2

Merged
jules merged 2 commits from feat/kb-lib-search into fix/kb-ui-p0 2026-07-09 12:15:34 +00:00
Owner

Prereq for the standalone webapp (W9) so it does not re-hand-roll search. Stacked on the P0 branch (ObjectList load-more is there).

  • KnowledgeSearch (new): the search input + paginated results panel over an injected onSearch; owns query/results/loading/error/clear + Load-more; renders the caller 's browse content when idle. Replaces per-app hit rendering.
  • CollectionList: onLoadMore/hasMore/loadingMore (mirrors ObjectList).

tsc clean.

🤖 Generated with Claude Code

Prereq for the standalone webapp (W9) so it does not re-hand-roll search. Stacked on the P0 branch (ObjectList load-more is there). - **KnowledgeSearch** (new): the search input + paginated results panel over an injected `onSearch`; owns query/results/loading/error/clear + Load-more; renders the caller 's `browse` content when idle. Replaces per-app hit rendering. - **CollectionList**: `onLoadMore`/`hasMore`/`loadingMore` (mirrors ObjectList). tsc clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jules added 1 commit 2026-07-08 02:05:26 +00:00
Both consumers (embedded + the coming standalone) need the same search UI and
paginated lists; keep them from diverging by owning both here.

- KnowledgeSearch (components-search.tsx): the search input + paginated results
  panel, over an injected onSearch. Owns query/results/loading/error/clear and a
  "Load more" for search results; renders the caller's `browse` content when
  there is no active search. Replaces each app hand-rolling hit rendering.
- CollectionList: onLoadMore/hasMore/loadingMore (mirrors ObjectList), so a
  paginated corpus list gets a load-more affordance.

Stacked on fix/kb-ui-p0 (ObjectList already gained load-more there). tsc clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jules added 1 commit 2026-07-08 03:38:26 +00:00
A kb.list row can arrive without a sensitivity (a claim/note, or older data);
SENSITIVITY[level] was then undefined and reading .tone crashed the whole
object list. Fall back to a neutral badge — never defaulting an unknown value
to "Open", which would misstate exposure. (Surfaced building the standalone
webapp against a real corpus.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jules merged commit 03443590a2 into fix/kb-ui-p0 2026-07-09 12:15:34 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CremaUIStudio/lib-knowledge-ui#2
No description provided.