feat: M5 teacher mode — lessons, presentation, quiz and track sharing - #5
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Milestone 5 (teacher mode), complete — author a lesson, present it, share a QR, import on another device as a student track:
packages/core/snapshot): portable.studyos.jsonwith local ordinal keys (no uuids), structural validation with referential integrity, and a deterministic FNV-1a content hash (key-order stable,exported_atexcluded) shared verbatim by app and Worker.bun run validate:templates).exportTrackData+ atomicimportSnapshot(ordinal→uuid remap, origin fields, rollback-proven — a poisoned snapshot creates zero rows).POST /share(bearer, 1 MB cap, gzip via CompressionStream → R2 +track_sharesrow) and publicGET /share/:id(cached; students import without a token)./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 theorigin_versionupdate note;/importroute with share-link preview.Tests
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