Commit Graph

13 Commits

Author SHA1 Message Date
c9441a9c9a Add subject options and redesign TV dashboard layout
Subject options:
- New subject_options table (auto-created on startup)
- SubjectOut now includes options list; all eager-loading chains updated
- Admin: Options panel per subject with add, inline edit, and delete
- WS broadcast and dashboard API include options in block subject data

TV dashboard:
- Three equal columns: Timer | Activities | Schedule
- Activities column shows current subject's options in large readable text
- Activities area has subject-colored border and tinted background
- Subject name and label displayed correctly using embedded subject data

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 11:18:55 -08:00
c12f07daa3 Fix schedule blocks persisting after End Day without refresh
Clear blocks, completedBlockIds, and day times alongside session when
the is_active: false WS event is received.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 10:34:57 -08:00
23aaea462d Show duration on schedule block lists
Display effective duration (time window or custom override) on every
block list — Admin, Dashboard, and TV sidebar. Custom duration_minutes
values are highlighted in indigo to distinguish them from the default
time-window calculation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 10:27:39 -08:00
1939b2cc45 Add duration_minutes field to schedule blocks
Separates "recommended time" (time_start/time_end) from actual timer
duration. If duration_minutes is set, the timer counts down from that
value; otherwise falls back to the time_start–time_end window.

- ScheduleBlock model: add nullable duration_minutes INT column
- Startup migration: idempotent ADD COLUMN for existing DBs
- Schemas: duration_minutes in create, update, and out
- TimerDisplay: prefer duration_minutes * 60 over time diff when set
- Admin block forms: Duration (min) input on add and edit forms

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 10:23:30 -08:00
a019e2dda5 Add inline block editing to schedule templates
- Backend: PATCH /api/schedules/{template_id}/blocks/{block_id} endpoint
- Frontend: Edit button on each block row expands an inline form
  pre-filled with current subject, times, and label; saves via PATCH

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 10:15:19 -08:00
3e7ff2a50b Add time-based day progress bar to dashboards
Replaces block-count progress with a wall-clock progress bar driven by
configurable day start/end hours on each schedule template.

- ScheduleTemplate: add day_start_time / day_end_time (TIME, nullable)
- Startup migration: idempotent ALTER TABLE for existing DBs
- Dashboard snapshot: includes day_start_time / day_end_time from template
- Admin → Schedules: time pickers in block editor to set day hours
- Dashboard view: time-based progress bar with start/current/end labels
- TV view: full-width day progress strip between header and main content

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 10:08:07 -08:00
462205cdc1 Merge Schedules into Admin, remove standalone ScheduleView
- Move schedule template management into AdminView under a new Schedules section
- Remove ScheduleView.vue and its route, drop Schedules link from NavBar
- Delete docker-compose.override.yml (dev override no longer needed)
- Fix CORS_ORIGINS default to port 8057 in docker-compose.yml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 00:59:01 -08:00
d43791f965 Fix timer reset on refresh and sync between dashboard and TV view
- Backend computes block_elapsed_seconds server-side from timer_events
- Store tracks blockStartedAt (ms) + blockElapsedOffset (seconds) instead
  of a client-side counter; updated correctly on start/pause/resume/end
- TimerDisplay derives elapsed from store props so both views always agree
- Add compact timer display to dashboard session card
- Add isPaused/pause-resume logic to dashboard Pause/Resume buttons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 00:16:29 -08:00
3f9d599998 Fix WS connected indicator and restore ref import in TVView
Use connected ref directly from useWebSocket instead of copying the value,
so the Live/Reconnecting indicator updates reactively. Restore ref import
that was incorrectly removed (still needed for the clock).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 23:50:31 -08:00
ad10f9bc61 Fix End Day not updating dashboard without refresh
Broadcast is_active in WS timer payload so the frontend can immediately
clear the session when the backend marks it complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 23:43:04 -08:00
51a1639fee Add inline edit for children and subjects in admin, restore port 8054
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 23:29:43 -08:00
781e179090 Fix backend deps and apply theme to all Cancel buttons
- Pin bcrypt==3.2.2 to fix passlib bcrypt backend detection error
- Add email-validator==2.2.0 required by Pydantic EmailStr
- Add btn-sm class to Cancel buttons in Admin, Dashboard, Log, Schedule views

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 23:24:39 -08:00
417b3adfe8 Initial project scaffold
Full-stack homeschool web app with FastAPI backend, Vue 3 frontend,
MySQL database, and Docker Compose orchestration. Includes JWT auth,
WebSocket real-time TV dashboard, schedule builder, activity logging,
and multi-child support.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 22:56:56 -08:00