Skip to content

enhance(kb): streamline knowledge base management - #5540

Merged
rschlaefli merged 28 commits into
feat/kb-graph-lifecyclefrom
rs/kb-management-ux
Aug 25, 2026
Merged

enhance(kb): streamline knowledge base management#5540
rschlaefli merged 28 commits into
feat/kb-graph-lifecyclefrom
rs/kb-management-ux

Conversation

@rschlaefli

@rschlaefli rschlaefli commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Reframes the knowledge-base detail page around a compact resource workspace instead of stacked cards and controls.
  • Presents documents and websites in a semantic metadata table with selection, status, source details, and row actions.
  • Moves all resource creation into one Add resource modal, preserving the existing website and document flows while showing Video as coming soon.
  • Collapses graph and chatbot configuration into secondary sections without changing lifecycle, ingestion, or API contracts.
  • Includes the host Playwright runner and linked-worktree runtime safeguards needed to verify this layer locally.

Stack and scope

This is the second PR in the Knowledge Base stack:

  1. feat(kb): knowledge graph lifecycle and scoped retrieval on v3-ai #5424 feat/kb-graph-lifecycle -> v3-ai
  2. enhance(kb): streamline knowledge base management #5540 rs/kb-management-ux -> feat/kb-graph-lifecycle

Published #5540 head: d9747b3e5aa3f284e58df8d5b827054f31697860.
Published parent head: 1d57f4f11a65698b72916de7c6f14c66422f9293.

Review this layer for desktop Knowledge Base management UX. Mobile Manage layout is explicitly outside this package and remains a separate shared-shell follow-up.

Verification

  • Sol final review passed the exact implementation range after both findings were corrected.
  • The repository commit gate passed all 29 package checks, formatting, lint, syncpack, gitleaks, AGENTS.md, and Prisma sync.
  • Node 24 checks passed for @klicker-uzh/kb-management and @klicker-uzh/playwright.
  • E2E_SKIP_INSTALL=1 bash util/run-host-e2e.sh --project=chromium tests/Y-kb-management-ux.spec.ts passed 1/1.
  • The focused E2E covers English/German desktop flows, modal keyboard behavior, document-upload dismissal locking, refresh-failure dismissal, the resource table, and the inspector.
  • Direct authenticated browser review confirmed exactly one Knowledge Bases navigation item, the metadata table, and the Website/Document/Video chooser states.
  • The retained runtime is available at https://manage.klicker.rs-kb-management-ux.localhost.

Security and data handling

  • No new production provider or production configuration.
  • No schema or graph-lifecycle change in this layer.
  • The host runner masks database credentials and only resets disposable local test environments.
  • Verification used seeded and synthetic local data only.

Review focus

  • resource-table density and metadata
  • modal focus, dismissal, and pending-upload safeguards
  • preserved ingestion, deletion, selection, and inspector behavior
  • collapsed chatbot and graph configuration
  • linked-worktree host E2E routing and database safety

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (4)
  • main
  • master
  • dev
  • v3

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f30a85b1-fd16-4016-9794-8ad480f951b5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

OpenCodeReview: Review skipped: no items were selected.

Comment on lines +76 to +81
const selector =
mode === 'chooser'
? '[data-cy="choose-kb-resource-website"]'
: mode === 'website'
? '[data-cy="kb-url-title"]'
: '[data-cy="kb-file-dropzone"]'

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.

maintainability · medium
Nested ternary is used to compute the focus selector, which conflicts with the codebase rule forbidding nested ternaries and hurts readability. Refactor to a lookup map or a helper, e.g. const FOCUS_SELECTORS: Record<AddResourceMode, string> = { chooser: '[data-cy="choose-kb-resource-website"]', website: '[data-cy="kb-url-title"]', document: '[data-cy="kb-file-dropzone"]' } and use FOCUS_SELECTORS[mode].

Comment on lines +104 to +110
title={
isChooser
? t('kb.addResourceTitle')
: mode === 'website'
? t('kb.addWebsite')
: t('kb.addDocument')
}

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.

maintainability · medium
The title prop uses a nested ternary (ternary inside a ternary), which is against the project rule prohibiting nested ternaries and hurts readability, especially as more resource modes are added. Extract a helper or map, e.g. const MODE_TITLES: Record<AddResourceMode, string> = { chooser: t('kb.addResourceTitle'), website: t('kb.addWebsite'), document: t('kb.addDocument') } and use title={MODE_TITLES[mode]}.

@rschlaefli
rschlaefli marked this pull request as ready for review August 25, 2026 16:41
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement labels Aug 25, 2026
@rschlaefli
rschlaefli merged commit 0ae0d19 into v3-ai Aug 25, 2026
39 of 40 checks passed
@rschlaefli
rschlaefli deleted the rs/kb-management-ux branch August 25, 2026 20:17
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

enhancement size:XXL This PR changes 1000+ lines, ignoring generated files.

Development

Successfully merging this pull request may close these issues.

1 participant