Skip to content

feat: M5 teacher mode — lessons, presentation, quiz and track sharing - #5

Merged
EliseuSantos merged 3 commits into
feat/m4-contentfrom
feat/m5-teacher
Jul 10, 2026
Merged

feat: M5 teacher mode — lessons, presentation, quiz and track sharing#5
EliseuSantos merged 3 commits into
feat/m4-contentfrom
feat/m5-teacher

Conversation

@EliseuSantos

Copy link
Copy Markdown
Owner

Stacked on #4 (M4 content). Merge order: #1#2#3#4 → this.

What

Milestone 5 (teacher mode), complete — author a lesson, present it, share a QR, import on another device as a student track:

  • Snapshot format (packages/core/snapshot): portable .studyos.json with local ordinal keys (no uuids), structural validation with referential integrity, and a deterministic FNV-1a content hash (key-order stable, exported_at excluded) shared verbatim by app and Worker.
  • Templates: JSON Schema + 2 pt-BR seeds (ENEM linguagens, dev fundamentos) validated in CI (bun run validate:templates).
  • Repos: lessons/lesson_items CRUD; exportTrackData + atomic importSnapshot (ordinal→uuid remap, origin fields, rollback-proven — a poisoned snapshot creates zero rows).
  • Worker: POST /share (bearer, 1 MB cap, gzip via CompressionStream → R2 + track_shares row) and public GET /share/:id (cached; students import without a token).
  • UI: lessons panel + full item editor (topic/content/quiz/note, presenter notes, reorder); /present/[lessonId] — fullscreen slides with keyboard/touch nav, interactive quiz (calm reveal, no confetti), presenter view with notes/elapsed timer/next-item; TrackActions — export, share with QR (uqr) + copy, file import, and the origin_version update note; /import route with share-link preview.

Tests

  • 178 bun tests (snapshot roundtrip/hash properties, lessons repo, import atomicity, share API incl. gzip roundtrip + cache-hit proof)
  • Cypress 21 specs green — new teacher-loop.cy.ts (5): author with quiz → present with quiz interaction + presenter view → share QR (stubbed worker) → export/reimport file roundtrip → import from share link

🤖 Generated with Claude Code

EliseuSantos and others added 3 commits July 10, 2026 13:07
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- core snapshot: build/parse (referential integrity, unknown fields
  stripped) + deterministic FNV-1a content hash; 2 pt-BR seed templates
  + json schema + validate script
- db: lessons/lesson_items repo, exportTrackData, atomic importSnapshot
  (ordinal keys -> uuids, origin fields, rollback-proven)
- worker: POST /share (bearer, 1MB cap, gzip to R2 + track_shares) and
  public GET /share/:id (cached), FakeR2 tests incl. cache-hit proof

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- lessons panel + editor on the track view (topic/content/quiz/note
  items, presenter notes, up/down reorder, 0-based quiz answers)
- /present/[lessonId]: fullscreen slides, keyboard/touch nav, interactive
  quiz reveal, presenter view (notes, elapsed timer, next item)
- TrackActions: export .studyos.json, share via worker (share url + uqr
  QR + copy), file import, origin_version update note
- /import route: share-link preview + confirm, file import fallback
- ci: validate templates step; e2e teacher-loop.cy.ts (5 specs)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@EliseuSantos
EliseuSantos merged commit b2634a9 into feat/m4-content Jul 10, 2026
1 check passed
@EliseuSantos
EliseuSantos deleted the feat/m5-teacher branch July 10, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant