freezmo/lib
Martin Dvorak 4513364019 Phase 3: Check my work, follow-ups and turn-into-deck
Check my work (third homework mode)
- One model call with its own system prompt marks the student's own
  attempt: verdict, what's right, each issue with why + fix, and the
  corrected version that keeps everything the student got right.
  Unasked-for extras are never errors. The attempt is typed/pasted
  (photos of handwriting are documented as unsupported) and stored in
  the record so Redo re-checks the same work.
- Server: mode "check" + solution on POST /api/homework (zod, 400
  server.needSolution without one) and the same NDJSON stream; new
  checkHomework() pipeline with repair-once validation.

Follow-ups
- New POST /api/homework/refine (plain JSON, RATE_LIMIT_REFINE, zod,
  auth before body): shorter / more detail / explain, plain text back,
  language preserved.
- Shorter + More detail + Original rewrite the finished answer and the
  corrected version in place (FollowUpBar); every guide step has
  Explain step N differently; failed calls say so without losing text.

Turn into a study deck
- Any result hands its content (answer, corrected version or assembled
  guide) to New deck through a one-shot sessionStorage seed with the
  options step pre-filled.

UI
- Phone step 2 gains the third card: tapping it reveals the solution
  field + submit; desktop has three cards and the solution field shows
  with the mode. Homework history labels and share/card previews cover
  the new mode.

Verified: new phase-3 suite 20/20 against a stub Ollama (check payload,
missing-solution 400, refine validation, phone + desktop check flows,
shorter follow-up with restore, guide explain, deck hand-off) plus
regression 74/74, mobile 52/52, declutter 116/116, wizard 80/80,
animation 8/8, native 35/35, phase1 38/38, phase2 43/43, i18n 25/25.
Key parity 734/734. Lint + build clean. SW freezmo-v27.
2026-10-10 14:36:04 +00:00
..
ai.ts Phase 3: Check my work, follow-ups and turn-into-deck 2026-10-10 14:36:04 +00:00
backup.ts Phase 2: learning engine — history, SRS review, mistakes, stats, exam, reminders 2026-10-10 14:15:21 +00:00
client-api.ts Phase 3: Check my work, follow-ups and turn-into-deck 2026-10-10 14:36:04 +00:00
clipboard.ts Add “Make my homework”, and finish the mobile polish pass 2026-10-08 18:30:33 +00:00
confetti.ts Freezmo: self-hosted notes-to-activities study app 2026-10-06 20:56:55 +00:00
config.ts Phase 3: Check my work, follow-ups and turn-into-deck 2026-10-10 14:36:04 +00:00
deck-ops.ts Freezmo: self-hosted notes-to-activities study app 2026-10-06 20:56:55 +00:00
deck-seed.ts Phase 3: Check my work, follow-ups and turn-into-deck 2026-10-10 14:36:04 +00:00
documents.ts Add an English/Czech interface language switch 2026-10-08 13:56:32 +00:00
folders.ts Phase 1: backup, encrypted sync and monthly-usage handling 2026-10-10 13:43:42 +00:00
haptics.ts Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
history.ts Phase 2: learning engine — history, SRS review, mistakes, stats, exam, reminders 2026-10-10 14:15:21 +00:00
homework.ts Phase 3: Check my work, follow-ups and turn-into-deck 2026-10-10 14:36:04 +00:00
http-guard.ts Add an English/Czech interface language switch 2026-10-08 13:56:32 +00:00
i18n-dict.ts Phase 3: Check my work, follow-ups and turn-into-deck 2026-10-10 14:36:04 +00:00
i18n.ts Add an English/Czech interface language switch 2026-10-08 13:56:32 +00:00
image.ts Add an English/Czech interface language switch 2026-10-08 13:56:32 +00:00
install.ts Add the Install the app bottom sheet for mobile browsers 2026-10-07 08:27:43 +00:00
language.ts Freezmo: self-hosted notes-to-activities study app 2026-10-06 20:56:55 +00:00
learning.ts Phase 2: learning engine — history, SRS review, mistakes, stats, exam, reminders 2026-10-10 14:15:21 +00:00
model-errors.ts Phase 1: backup, encrypted sync and monthly-usage handling 2026-10-10 13:43:42 +00:00
motion.ts Animation pass: one shared motion language for phones 2026-10-10 11:01:29 +00:00
nav.ts Freezmo: self-hosted notes-to-activities study app 2026-10-06 20:56:55 +00:00
ollama.ts Phase 1: backup, encrypted sync and monthly-usage handling 2026-10-10 13:43:42 +00:00
prompts.ts Phase 3: Check my work, follow-ups and turn-into-deck 2026-10-10 14:36:04 +00:00
push-store.ts Phase 2: learning engine — history, SRS review, mistakes, stats, exam, reminders 2026-10-10 14:15:21 +00:00
rate-limit.ts Add an English/Czech interface language switch 2026-10-08 13:56:32 +00:00
schemas.ts Phase 3: Check my work, follow-ups and turn-into-deck 2026-10-10 14:36:04 +00:00
settings.ts Phase 2: learning engine — history, SRS review, mistakes, stats, exam, reminders 2026-10-10 14:15:21 +00:00
share-inbox.ts Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
share-pending.ts Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
share.ts Phase 3: Check my work, follow-ups and turn-into-deck 2026-10-10 14:36:04 +00:00
storage.ts Phase 1: backup, encrypted sync and monthly-usage handling 2026-10-10 13:43:42 +00:00
sync-key.ts Phase 1: backup, encrypted sync and monthly-usage handling 2026-10-10 13:43:42 +00:00
sync-state.ts Phase 1: backup, encrypted sync and monthly-usage handling 2026-10-10 13:43:42 +00:00
sync.ts Phase 2: learning engine — history, SRS review, mistakes, stats, exam, reminders 2026-10-10 14:15:21 +00:00
toast.ts Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
ui-events.ts Phase 1: backup, encrypted sync and monthly-usage handling 2026-10-10 13:43:42 +00:00
use-back-close.ts Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
use-health.ts Mobile UI pass: sheet swipe, ice-scene layering, contrast, touch targets 2026-10-08 17:37:51 +00:00
use-notes-intake.ts Add “Make my homework”, and finish the mobile polish pass 2026-10-08 18:30:33 +00:00
use-online.ts Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
use-phone.ts Mobile declutter pass: step flows, compact cards, simplified settings 2026-10-10 10:43:32 +00:00
use-wake-lock.ts Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
utils.ts Freezmo: self-hosted notes-to-activities study app 2026-10-06 20:56:55 +00:00
wizard-draft.ts Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
xp.ts Freezmo: self-hosted notes-to-activities study app 2026-10-06 20:56:55 +00:00