Paper Components
File:components/PaperComponents.tsx
The Paper UI design system provides foundational components following the “Digital Paper” design philosophy.
PaperCard
The fundamental building block for content containers.className- Additional CSS classesvariant- Card variant styleonClick- Click handler
PaperButton
Buttons with hard shadows and physical interaction feel.primary- Solid ink background, paper textghost- Transparent background, ink textdanger- Warning/error styling
variant- Button variantsize- Button size (sm, md, lg)icon- Icon element (React node)disabled- Disabled state
PaperInput
Text input fields with Paper UI styling.PaperBadge
Status indicators and labels.ink- Dark/primaryaccent- Success/highlightwarning- Warning/alert
PaperModal
Modal dialogs with overlay.PaperTextArea
Multi-line text input.PaperSelect
Dropdown select component.Layout Components
Layout
File:components/Layout.tsx
Main application layout wrapper:
- Header: Navigation and user info
- Sidebar: View navigation (if applicable)
- Content Area: Main view content
- Footer: System status and links
ErrorBoundary
File:components/ErrorBoundary.tsx
React error boundary for graceful error handling:
- Catches React errors
- Displays error UI
- Logs errors for debugging
Specialized Components
GraphAnalysis
File:components/GraphAnalysis.tsx
Knowledge graph analysis visualization:
- Centrality metrics display
- Cluster identification
- Connection strength visualization
- Node type distribution
GlobalToast
File:components/GlobalToast.tsx
Global toast notification system:
success- Green, success messageserror- Red, error messagesinfo- Blue, informational messageswarning- Yellow, warning messages
GlobalAIModal
File:components/GlobalAIModal.tsx
AI-powered modal for interactive AI features:
- Context-aware AI assistance
- Streaming responses
- Multi-turn conversations
SupervisorToast
File:components/SupervisorToast.tsx
Specialized toast for supervisor agent notifications:
- High-confidence decisions
- Urgent alerts
- Decision summaries
- Dismissible notifications
SupervisorWidget
File:components/SupervisorWidget.tsx
Widget displaying supervisor agent status:
- Active decision count
- Confidence levels
- Monitoring status
- Quick actions
SystemPromptAlert
File:components/SystemPromptAlert.tsx
Alert component for system prompt changes:
- Notifies users of prompt updates
- Shows prompt preview
- Accept/dismiss actions
Component Patterns
Composition
Components use composition patterns for flexibility:Props Interface
All components use TypeScript interfaces:Styling
Components use Tailwind CSS with Paper UI theme:- Hard shadows:
shadow-[4px_4px_0px_0px_rgb(24,24,27)] - Hard borders:
border-2 border-ink - High contrast colors
- No rounded corners (max 2px border-radius)
State Management
Components integrate with Zustand store:Animations
Components use Framer Motion for animations:Related Documentation
- Frontend Views - View components and pages
- Design System - Paper UI design principles
- Backend Worker - Worker API