Check-my-work attachments, smart review follows deletions, GPL-3.0-only

- "Check my work" now takes photos and documents of the attempt: documents
  are read in the browser into text, photos go to /api/homework as
  solutionImages and are transcribed by the vision model before the check
  ("Reading your solution..."). The finished attempt comes back in
  meta.solutionText and is stored as the record's attempt, so "Redo"
  re-checks the same work without keeping the files.
- Deleting a deck now drops its due schedules and mistakes from the library's
  smart review immediately (the counts resolve against the live deck list);
  Undo brings them back, because the learning data itself is never erased.
- The phone override for the glacier blobs was still at 0.1/0.2: it is now a
  quarter of the original value there too (0.025/0.05), matching the desktop.
- License: GPL-3.0-only (LICENSE, package.json, README section).

Tests: phase-3 photos-only API + desktop attachment checks (28/28), review
suite deck-delete checks (18/18), i18n/mobile/phase-2 green. README:
decisions 57-58. SW -> freezmo-v45.
This commit is contained in:
Martin Dvořák 2026-10-12 16:04:53 +00:00
commit d559865a09
13 changed files with 1033 additions and 24 deletions

View file

@ -156,6 +156,8 @@ export type HomeworkInput = {
text?: string;
/** Mode "check": the student's own attempt at the assignment. */
solution?: string;
/** Mode "check": photos of the attempt (handwritten work, scanned pages). */
solutionImages?: string[];
language?: string;
};

View file

@ -301,6 +301,7 @@ const en: Record<string, string> = {
"homework.start.guide": "Guide me through it",
"homework.loading.title": "Working on the assignment…",
"homework.loading.reading": "Reading the assignment…",
"homework.loading.readingSolution": "Reading your solution…",
"homework.loading.vision2": "Transcribing the questions…",
"homework.loading.writing": "Writing your homework…",
"homework.loading.planning": "Planning the steps…",
@ -875,7 +876,10 @@ const en: Record<string, string> = {
"homework.mode.checkDesc": "Mark your own attempt: what's right, what's wrong, and the corrected version.",
"homework.solution.label": "Your solution",
"homework.solution.placeholder": "Paste your own attempt here — the assignment is above.",
"homework.solution.note": "Type or paste your solution as text (photos of handwritten work aren't supported yet).",
"homework.solution.note": "Type or paste your solution, or add photos and documents of your work — handwritten pages are fine.",
"homework.solution.add": "Add photos or files",
"homework.solution.tooManyPhotos": "Up to {n} photos per solution.",
"homework.solution.tooManyDocs": "Up to {n} documents per solution.",
"homework.solution.required": "Add your solution so there is something to check.",
"homework.check.title": "Checked",
"homework.check.verdict": "Verdict",
@ -1237,6 +1241,7 @@ const cs: Record<string, string> = {
"homework.start.guide": "Proveď mě tím",
"homework.loading.title": "Pracuji na zadání…",
"homework.loading.reading": "Čtu zadání…",
"homework.loading.readingSolution": "Čtu tvoje řešení…",
"homework.loading.vision2": "Přepisuji otázky…",
"homework.loading.writing": "Píšu tvůj úkol…",
"homework.loading.planning": "Plánuji postup…",
@ -1811,7 +1816,10 @@ const cs: Record<string, string> = {
"homework.mode.checkDesc": "Oznámkuj svůj postup: co je správně, co špatně a opravená verze.",
"homework.solution.label": "Tvoje řešení",
"homework.solution.placeholder": "Sem vlož svůj postup — zadání je nahoře.",
"homework.solution.note": "Řešení napiš nebo vlož jako text (fotky ručně psaného postupu zatím nejdou).",
"homework.solution.note": "Řešení napiš, vlož, nebo přidej fotky a dokumenty se svým postupem — ručně psané stránky jsou v pohodě.",
"homework.solution.add": "Přidat fotky nebo soubory",
"homework.solution.tooManyPhotos": "Až {n} fotek k řešení.",
"homework.solution.tooManyDocs": "Až {n} dokumentů k řešení.",
"homework.solution.required": "Přidej svoje řešení, ať je co zkontrolovat.",
"homework.check.title": "Zkontrolováno",
"homework.check.verdict": "Hodnocení",