feat: teeth tracker, feeding analysis, sidebar groups, timeline polish

Features:
- Teeth tracker: Tooth model + migration, API routes (GET/POST upsert/DELETE),
  page at /teeth with 20-tooth grid, progress bar, inline mark/unmark flow
- Dashboard feeding analysis: avg interval + last feed + next expected time widget
- Fix dashboard baby?.name crash (selectedBaby?.name)

UI/UX:
- Sidebar: grouped into Suivi / Santé / Vie du bébé / Outils sections
- Nav: active highlight works on child routes (startsWith)
- Timeline: filter chips sticky on mobile; skeleton cards replace spinner
- Stats: 500-event limit warning banner
- Medications: 3 states — "Dans Xh" (orange), "Disponible" (green), "En retard de Xh" (amber)
- Notes: skip auto-save on empty/whitespace blur

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 21:51:32 +02:00
parent 8bb048ff56
commit cd3efa98fc
11 changed files with 596 additions and 25 deletions
+11 -10
View File
@@ -12,6 +12,8 @@
### Dashboard
- [x] **Empty state for new users** — onboarding callout when no events today
- [x] **Active timers show which baby** — baby name badge below event label
- [x] **Medication overdue** — 3 states: "Dans Xh" (orange), "Disponible" (green), "En retard de Xh" (amber)
- [x] **Feeding pattern analysis widget** — avg interval + last feed + next expected (in progress)
### Growth
- [x] **Single-measurement chart** — shows point + WHO curves (was blank until 2+ points)
@@ -23,10 +25,13 @@
### Stats
- [x] **Heatmap legend** — shows actual counts (0 1 2 3 4+)
- [x] **Sleep timeline label** — "Fenêtre 19h 11h"
- [x] **Event limit warning** — banner when 500-event limit hit
- [ ] **Chart zero-data gaps** — distinguish "no data" vs "zero events" visually
### Timeline
- [x] **Filter state sticky** — persisted in URL param `?type=...`
- [x] **Filter chips sticky on mobile**`sticky top-0 z-10` container
- [x] **Loading skeleton** — skeleton cards replace spinner on first render
- [x] **Inline note save feedback** — ✓ flash after blur
- [x] **Photo thumbnail clickable** — opens in new tab
- [x] **Select mode indicator** — toggle shows "Annuler" when active
@@ -38,11 +43,12 @@
### Search
- [x] **Results clickable** — events link to `/timeline?date=...`, notes to `/notes?date=...`
- [x] **Result count header** — "X événements · Y notes"
- [ ] **Date/type filter chips** on search results
- [x] **Date/type filter chips** on search results
### Notes
- [x] **Unsaved indicator** — amber dot while dirty, green ✓ after save
- [x] **Date jump input** — invisible date input overlaid on label, opens native calendar
- [x] **Empty blur fix** — skip save on empty/whitespace content
### Milestones
- [x] **Sort by date** within month group
@@ -60,19 +66,14 @@
### Navigation
- [x] **Baby switcher `aria-label`** — added to nav select
- [ ] **Unsaved state warning** — prompt before leaving dirty notes page
## Remaining
- [ ] **Search date/type filter chips** — filter search results by date range or event type
- [ ] **Stats chart zero-data gaps** — distinguish "no data" vs "zero events" visually
- [ ] **Notes unsaved state nav warning** — prompt before leaving dirty notes page
- [x] **Active highlight on child routes** — uses `startsWith` instead of exact match
- [x] **Sidebar grouped** — sections: Suivi / Santé / Vie du bébé / Outils (replaces flat 14-item list)
## Feature Backlog
- [ ] **Vaccination tracker**dates, vaccine name, lot, next-due reminder + push alert
- [x] **Vaccination tracker**full UI + API, overdue badges, done/upcoming sections
- [x] **Teeth tracker** — visual grid of 20 baby teeth, tap to mark appeared (in progress)
- [ ] **Doctor visit log** — notes, prescriptions, next appointment date
- [ ] **Teeth tracker** — visual mouth diagram, mark appearance date
- [ ] **Baby schedule prediction** — "usually naps around 14h30" from historical patterns
- [ ] **Growth chart in PDF** — embed chart image (jsPDF canvas) not just table
- [ ] **Natural language digest** — "Emma feeds every 2h45 on average" weekly push