Commit Graph
16 Commits
Author SHA1 Message Date
derekcandClaude Sonnet 4.6 d724262e27 Add Rules & Expectations feature with TV overlay and dashboard layout updates
- Add Rules & Expectations admin section with drag-to-reorder, add/edit/delete
- Add Overlays card to Dashboard with Rules/Expectations toggle button (LIVE badge when active)
- Add full-screen rules overlay on TV view (green theme, numbered list, tap to dismiss)
- Backend: new RuleItem model, /api/rules CRUD + bulk reorder, /api/overlays WS broadcast endpoints
- Schedule store handles show_rules / hide_rules WebSocket events
- Rearrange Dashboard top row: TV Dashboard | 3 Strikes | Overlays (3-col, mobile stacks)
- Put Today's Session and Today's Schedule side-by-side at 50/50 width (mobile stacks)
- Update README with all new features, setup steps, WS events, and project structure

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-19 07:21:50 -07:00
derekcandClaude Sonnet 4.6 f645d78c83 Add Meeting system subject and notification system
- Auto-create a locked "Meeting" subject for every user on registration
  and seed it for all existing users on startup
- Meeting subject cannot be deleted or renamed (is_system flag)
- 5-minute corner toast warning on Dashboard and TV with live countdown,
  dismiss button, and 1-minute re-notify if dismissed
- At start time: full-screen TV overlay with 30-second auto-dismiss,
  automatic pause of running block, switch to Meeting block, and
  auto-start of Meeting timer
- Web Audio API chimes: rising on warnings, falling at meeting start
- Update README with Meeting subject and notification system docs

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-04 23:44:21 -08:00
derekcandClaude Sonnet 4.6 c05543d855 Rework day progress bar to use block-duration time instead of wall clock
Both the TV and parent dashboard progress bars now calculate % complete
based on total scheduled block time vs. remaining block + break time,
so the bar only advances while blocks are actively being worked.

TV bar labels changed to "🟢 Start" and "Finish 🏁".
Parent dashboard shows first block's scheduled start time on the left
and a live estimated finish time (now + remaining block/break time) on
the right.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-03 13:38:40 -08:00
derekcandClaude Sonnet 4.6 87315b8902 Add break time feature to schedule blocks
- Admin: per-block "Break Time" checkbox + duration (min) setting; new
  Break Activities section (global list, same pattern as Morning Routine)
- Dashboard: break timer section appears on blocks with break enabled;
  Start/Pause/Resume/Reset controls work independently of the main timer
- TV: left column switches to amber break badge + countdown during break;
  center column shows configurable Break Activities list
- Backend: break_time_enabled/break_time_minutes columns on schedule_blocks
  (auto-migrated on startup); break_activity_items table + CRUD router;
  break timer events (break_start/pause/resume/reset) stored as TimerEvents
  and broadcast via WebSocket; break_activities included in dashboard
  snapshot and session_update broadcast

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-03 08:40:49 -08:00
derekcandClaude Sonnet 4.6 5cd537a445 Add Morning Routine to Admin and TV greeting state
Adds a per-user Morning Routine item list that appears in the TV
dashboard Activities panel during the "Good Morning" countdown
(before the first block starts).

- morning_routine_items table (auto-created on startup)
- CRUD API at /api/morning-routine (auth-required)
- Items included in the public DashboardSnapshot so TV gets them
  without auth
- Morning Routine section in Admin page (same add/edit/delete UX
  as subject options)
- TV Activities column shows routine items when no block is active,
  switches to subject options once a block starts

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-01 22:19:15 -08:00
derekcandClaude Sonnet 4.6 f730e9edf9 Show timer remaining per block and fix single-click block switching
- Block list on both dashboards now shows time remaining on each block's
  timer (allocated duration minus elapsed) instead of total duration;
  the active block counts down live every second
- Fix block switching requiring 2 clicks: replace separate pause+start
  requests with a single start request; backend implicitly records a
  pause event for the previous block atomically
- Export blockElapsedCache from store so views can compute per-block
  elapsed for both running and paused blocks

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-01 22:00:23 -08:00
derekcandClaude Sonnet 4.6 823260cdd8 Add timezone selector to Admin settings with full-stack support
- Add `timezone` column to User model (VARCHAR 64, default UTC) with
  idempotent startup migration
- Expose and persist timezone via PATCH /api/users/me
- Fix TimerEvent.occurred_at serialization to include UTC offset marker
  (+00:00) so JavaScript correctly parses timestamps as UTC
- Add frontend utility (src/utils/time.js) with timezone-aware
  formatTime, getHHMM, getDateInTZ, tzDateTimeToUTC helpers and a
  curated IANA timezone list
- Add Settings section to Admin page with timezone dropdown; saves to
  both the API and localStorage for the unauthenticated TV view
- Update Activity Log to display and edit times in the user's timezone
- Update TV dashboard clock to respect the saved timezone
- Update README: features, setup steps, usage table, WebSocket events

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-01 14:16:37 -08:00
derekcandClaude Sonnet 4.6 44e8f7de7b Move 3 Strikes from Admin to Dashboard, add strikes feature
- Adds strikes (0-3) to Child model with migration
- New PATCH /api/children/{id}/strikes endpoint with WebSocket broadcast
- TV dashboard shows red ✕ marks next to child name when strikes > 0
- 3 Strikes card on Dashboard page (removed from Admin)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-02-28 17:20:10 -08:00
derekcandClaude Sonnet 4.6 4b49605ed1 Add greeting and countdown timer to TV dashboard before session starts
Shows "Good Morning! Ready to start school?" placeholder when a session
is active but no block has been selected, along with a live countdown
to the first scheduled block's start time.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-02-28 16:57:19 -08:00
derekcandClaude Sonnet 4.6 3670bc63e7 Make TV dashboard timer larger
Scale timer ring up to 420px to fill the column, increase countdown
digits to 5.5rem and label to 1.4rem.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-02-28 11:44:58 -08:00
derekcandClaude Sonnet 4.6 c8a965dadf Increase text size for TV dashboard activities and schedule
- Activity items: 1.6rem → 2rem
- Schedule block title: 1.2rem, time: 1rem, more padding
- Scoped to TV sidebar so other views are unaffected

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-02-28 11:23:46 -08:00
derekcandClaude Sonnet 4.6 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 <[email protected]>
2026-02-28 11:18:55 -08:00
derekcandClaude Sonnet 4.6 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 <[email protected]>
2026-02-28 10:08:07 -08:00
derekcandClaude Sonnet 4.6 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 <[email protected]>
2026-02-28 00:16:29 -08:00
derekcandClaude Sonnet 4.6 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 <[email protected]>
2026-02-27 23:50:31 -08:00
derekcandClaude Sonnet 4.6 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 <[email protected]>
2026-02-27 22:56:56 -08:00