| name | ui |
| description | Review the UI package for React components, TanStack Router routes, styling, and frontend best practices. Use when user says /ui or asks to review the UI. |
| allowed-tools | Read, Grep, Glob |
| user-invocable | true |
UI Package Review
Review the ui/ package for quality, consistency, and best practices.
Scope
ui/
├── src/
│ ├── router.tsx # Client router
│ ├── router.server.tsx # Server router (SSR)
│ ├── hydrate.tsx # Client hydration entry
│ ├── components/
│ │ ├── index.ts # Public component exports
│ │ ├── chat/ # Chat feature components
│ │ │ ├── chat-input.tsx
│ │ │ ├── chat-message.tsx
│ │ │ └── chat-page.tsx
│ │ ├── kv/ # Key-value editor
│ │ │ └── kv-editor.tsx
│ │ └── ui/ # shadcn/ui primitives
│ ├── hooks/
│ │ ├── index.ts
│ │ └── use-client.ts
│ ├── lib/
│ │ ├── auth-client.ts # better-auth client
│ │ ├── auth-utils.ts # Auth utilities
│ │ ├── session.ts # Session management
│ │ └── utils.ts # General utilities (cn)
│ ├── providers/
│ │ └── index.tsx # Context providers
│ ├── routes/ # TanStack file-based routes
│ │ ├── __root.tsx
│ │ ├── _layout.tsx
│ │ └── _layout/
│ │ ├── _authenticated.tsx
│ │ ├── login.tsx
│ │ └── _authenticated/
│ ├── types/
│ │ └── index.ts
│ ├── utils/
│ │ ├── orpc.ts # oRPC client setup
│ │ └── stream.ts # Streaming utilities
│ └── integrations/
│ └── tanstack-query/
│ └── devtools.tsx
├── rsbuild.config.ts # Build configuration
└── package.json
Review Checklist
1. Component Quality
2. Route Structure
3. API Integration
4. Styling
5. Module Federation
6. Performance
Key Files to Check
src/router.tsx - Client router setup
src/router.server.tsx - SSR router
src/components/index.ts - Public exports
src/components/chat/chat-page.tsx - Chat feature
src/utils/orpc.ts - API client setup
src/utils/stream.ts - Streaming utilities
src/lib/auth-client.ts - Auth client
src/routes/_layout/_authenticated.tsx - Auth guard
rsbuild.config.ts - Build configuration
Output Format
Provide a structured review:
## UI Package Review
### Summary
[Overall assessment]
### Issues Found
1. [File:line] - [Issue description]
### Recommendations
- [Improvement suggestions]
### Status: [PASS/NEEDS_WORK]