Component library
Facts verified 2026-07-30 by claude-code/2026.07. Generated from the authored source at docs/llm-wiki/components.md — the wiki owns these facts (ADR: D1 of docs/plans/20260811_documentation_system_execution.md). Edit that file, then regenerate: python docs/portfolio/_build/generate_wiki_pages.py.
The UI kit (web/components/ui/)
- ~50 generic shadcn/ui primitives — Radix UI behavior + Tailwind styling +
class-variance-authorityvariants. - shadcn/ui is a copy-in generator, not a dependency:
npx shadcn@latest add <name>writes source into the repo, routed byweb/components.json. - Single entry point:
import { Button, Card, Input } from '@/components/ui'(re-exports inweb/components/ui/index.ts— add new primitives’ exports there). - Kit helpers:
use-toast,use-mobile,client-only,hydration-safe-*.
The workspace widget library (web/components/workspaces/widgets/)
- KAP-specific presentational building blocks (ResourceBrowser, ContextChipsPanel, StatusBadge, section bars, IDMS push panel …).
- Rule: widgets never fetch data — workspace modules own Supabase and pass props.
- Entry point:
@/components/workspaces/widgets. Reference:web/components/workspaces/widgets/README.md.
Placement decision rules (new component)
- Generic, product-agnostic →
web/components/ui/via the shadcn generator. - KAP-specific, shared across workspaces, presentational →
web/components/workspaces/widgets/(props only, no data fetching). - Belongs to one feature area (chat, notes, settings …) → that folder under
web/components/. - Internal to one feature module → inside
web/modules/<name>/— never imported from outside the module.
When in doubt start at 3–4 and promote when a second consumer appears.
Other component locations
- Feature folders:
web/components/{chat,notes,settings,workspaces,copilot,tour,admin}/+ ~45 top-level feature components inweb/components/*.tsx. - Shared behavior lives in
web/hooks/, not in components.