Commit graph

13 commits

Author SHA1 Message Date
75909615b4 Style AI page like other pages
- Add dark mode support throughout
- Add consistent header with back button
- Add modal dark mode styling

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 09:17:14 +05:30
5984a8ea13 Add modal confirm dialog for delete
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 02:00:21 +05:30
6e2ee3830e Fix delete button confirmation and size
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 01:58:34 +05:30
8d74656ecc Fix AI chat UX
- Show user message immediately while waiting for AI
- Add delete button for each conversation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 01:57:03 +05:30
e51853f335 Add debug logging for childId
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 01:54:09 +05:30
9e506279a7 Fix AI chat performance and UX
- Single JOIN query instead of N+1 selects for sessions
- Auto-create session when sending without one
- Send button enabled when typing

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 01:49:36 +05:30
881888ef10 Fix AI chat: handle undefined sessions
- Add error state to display API errors
- Safe guard sessions.map with (sessions || [])
- Show error message on API failure

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 01:44:08 +05:30
fb2527f4b3 Fix AI chat: disable send without session
- Disable send button when no active session exists

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 01:42:37 +05:30
f8df3ce313 Fix AI chat page: add back button, disable send while loading
- Add back link (←) to /menu in header
- Send button: gray out while loading to prevent double-click

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 01:32:22 +05:30
fdd2a67f7a Fix hardcoded IDs and data fetching across all pages
- Add signout button to menu (below Settings)
- Fix profile API to fetch user from database session
- Fix profile page to save name to database
- Fix settings page to use familyId from FamilyProvider
- Fix family page to use FamilyProvider
- Fix activity, ai, medical, memories pages to use FamilyProvider
- Remove all hardcoded "default" familyId and childId values

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 00:32:31 +05:30
c3255e82da Migrate Chat Sessions to database
- Add chat_sessions and chat_messages tables
- Create /api/chat endpoint for CRUD operations
- Update home page and /ai page to use database
- All chat history now persists across sessions and devices

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 21:13:21 +05:30
7aaab29baf Add ChatGPT-style chat sessions with sidebar history 2026-05-10 12:44:16 +05:30
e3ce3241d0 Add LiteLLM AI API and chat UI 2026-05-10 11:38:31 +05:30