Update documentation with recent fixes and known issues
- Add familyName and memberCount to FamilyProvider docs - Document Turbopack parsing issue and workaround - Add chat sessions localStorage note Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
4deb7ff69d
commit
26fe359303
2 changed files with 29 additions and 14 deletions
38
CLAUDE.md
38
CLAUDE.md
|
|
@ -7,16 +7,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||||
```bash
|
```bash
|
||||||
# Development
|
# Development
|
||||||
pnpm dev # Start dev server at http://localhost:3000
|
pnpm dev # Start dev server at http://localhost:3000
|
||||||
pnpm build # Production build
|
pnpm build # Production build (uses Turbopack by default)
|
||||||
pnpm start # Start production server
|
pnpm start # Start production server
|
||||||
|
# Note: If Turbopack fails, use: pnpm build -- --webpack
|
||||||
|
|
||||||
# Database (drizzle)
|
# Database (direct SQL or docker)
|
||||||
pnpm db:push # Push schema to database
|
docker-compose -f docker-compose.dev.yml exec db psql -U postgres -d tia
|
||||||
pnpm db:generate # Generate drizzle types
|
|
||||||
pnpm db:studio # Open DB studio (or use direct SQL)
|
|
||||||
|
|
||||||
# Docker
|
|
||||||
docker-compose -f docker-compose.dev.yml up -d # Start local Postgres
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** Running from `/Users/manohar_air/MyProjects/Tia/tia` directory.
|
**Note:** Running from `/Users/manohar_air/MyProjects/Tia/tia` directory.
|
||||||
|
|
@ -87,10 +83,13 @@ const { theme, toggle, setMode } = useTheme();
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { useFamily } from "./FamilyProvider";
|
import { useFamily } from "./FamilyProvider";
|
||||||
const { familyId, child, children, tier } = useFamily();
|
const { familyId, familyName, child, children, tier, memberCount } = useFamily();
|
||||||
// familyId: string | null (from session)
|
// familyId: string | null
|
||||||
|
// familyName: string | null (from session)
|
||||||
// child: Child | null
|
// child: Child | null
|
||||||
|
// children: Child[]
|
||||||
// tier: "free" | "pro"
|
// tier: "free" | "pro"
|
||||||
|
// memberCount: number (from family_members table)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Offline Queue:** Uses localStorage (`tia_offline_queue`) for failed API calls, retries when online.
|
**Offline Queue:** Uses localStorage (`tia_offline_queue`) for failed API calls, retries when online.
|
||||||
|
|
@ -223,4 +222,19 @@ Required:
|
||||||
Optional for AI:
|
Optional for AI:
|
||||||
|
|
||||||
- `LITELLM_BASE_URL` - AI gateway URL
|
- `LITELLM_BASE_URL` - AI gateway URL
|
||||||
- `LITELLM_API_KEY` - AI API key
|
- `LITELLM_API_KEY` - AI API key
|
||||||
|
|
||||||
|
## Known Issues
|
||||||
|
|
||||||
|
### Turbopack Parsing Issue
|
||||||
|
|
||||||
|
Some files may cause "Unterminated regexp literal" errors when building with Turbopack. If build fails:
|
||||||
|
|
||||||
|
1. Try building with Webpack instead:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm build -- --webpack
|
||||||
|
```
|
||||||
|
|
||||||
|
2. The issue is in SWC parser - avoid patterns like `name: "TT/Td"` in arrays as the `/` can be interpreted as regex
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,5 +39,6 @@ interface AIChat {
|
||||||
|
|
||||||
## Implementation Notes
|
## Implementation Notes
|
||||||
- Use React state for current session
|
- Use React state for current session
|
||||||
- Save to localStorage on each message
|
- Save to localStorage on each message (for quick access)
|
||||||
- Auto-title from first user message
|
- Auto-title from first user message
|
||||||
|
- **Future**: Move to database (chat_sessions table) for persistence across devices
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue