From 26fe3593032da582faa474d20ae9f32f825fc978 Mon Sep 17 00:00:00 2001 From: Mannu Date: Mon, 11 May 2026 01:16:14 +0530 Subject: [PATCH] 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 --- CLAUDE.md | 38 ++++++++++++++++++++++++++------------ docs/chat-sessions.md | 5 +++-- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 40e6b34..7e3ed25 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,16 +7,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ```bash # Development pnpm dev # Start dev server at http://localhost:3000 -pnpm build # Production build -pnpm start # Start production server +pnpm build # Production build (uses Turbopack by default) +pnpm start # Start production server +# Note: If Turbopack fails, use: pnpm build -- --webpack -# Database (drizzle) -pnpm db:push # Push schema to database -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 +# Database (direct SQL or docker) +docker-compose -f docker-compose.dev.yml exec db psql -U postgres -d tia ``` **Note:** Running from `/Users/manohar_air/MyProjects/Tia/tia` directory. @@ -87,10 +83,13 @@ const { theme, toggle, setMode } = useTheme(); ```typescript import { useFamily } from "./FamilyProvider"; -const { familyId, child, children, tier } = useFamily(); -// familyId: string | null (from session) +const { familyId, familyName, child, children, tier, memberCount } = useFamily(); +// familyId: string | null +// familyName: string | null (from session) // child: Child | null +// children: Child[] // tier: "free" | "pro" +// memberCount: number (from family_members table) ``` **Offline Queue:** Uses localStorage (`tia_offline_queue`) for failed API calls, retries when online. @@ -223,4 +222,19 @@ Required: Optional for AI: - `LITELLM_BASE_URL` - AI gateway URL -- `LITELLM_API_KEY` - AI API key \ No newline at end of file +- `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 + diff --git a/docs/chat-sessions.md b/docs/chat-sessions.md index 60170a5..a932354 100644 --- a/docs/chat-sessions.md +++ b/docs/chat-sessions.md @@ -39,5 +39,6 @@ interface AIChat { ## Implementation Notes - Use React state for current session -- Save to localStorage on each message -- Auto-title from first user message \ No newline at end of file +- Save to localStorage on each message (for quick access) +- Auto-title from first user message +- **Future**: Move to database (chat_sessions table) for persistence across devices