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

@ -1361,6 +1361,24 @@ Things I chose while building, with the reasoning:
phase-1 suite (43 checks, including the real route mapping against a stub Ollama returning a
monthly-limit body, a two-device sync round-trip, and the generation guards below).
58. **The smart review follows the deck list.** Deleting a deck used to leave its due schedules
and mistakes in the library counts: `dueCount` counted raw SRS rows (no deck lookup) and both
counts were memoised on the learning store alone, so a deck change never recomputed them. The
counts now resolve through `dueItems`/`mistakeItems` (which skip decks and activities that no
longer exist) inside a memo keyed on the live deck ids, so deleting a deck drops its numbers at
once — and Undo brings them straight back, because the learning data itself is never erased.
Verified by the review suite (two decks due → delete one → counts drop → Undo restores).
57. **"Check my work" takes photos and documents, not just text.** The attempt field used to
apologise that handwritten work was not supported. It now carries its own intake (photos of
pages, PDF/DOCX/PPTX/ODT/TXT…): documents are read in the browser and their text joins what was
typed, while photos travel to `/api/homework` as `solutionImages` and are transcribed by the
vision model before the check runs (the stage reads "Reading your solution…"). The server
returns the finished attempt in `meta.solutionText`, which the client stores as the record's
`attempt` — so "Redo" re-checks the same work without the photos ever being stored. Verified by
the phase-3 suite (API: a photos-only attempt is accepted, transcribed and runs vision first;
desktop: thumbnail appears, the payload carries `solutionImages`, the result renders).
56. **Model text keeps its own line breaks.** Every homework prompt asks for plain text with short
lines and numbered or dashed lists (`HOMEWORK_BASE_RULES`), but the guide rendered the step
explanation in a bare `<p>` — JSX collapses newlines, so a step arrived as one run-on paragraph
@ -1456,3 +1474,13 @@ Things I chose while building, with the reasoning:
Chromium, then re-run against the real Ollama cloud. Current suites: 13/13 document extraction
(one fixture per format, including a text PDF and a scanned PDF), 15/15 language preservation,
24/24 activity/scoring/feed checks and 11/11 real-model browser checks.
## License
Freezmo is free software, licensed under the **GNU General Public License, version 3 only**
(SPDX: `GPL-3.0-only`) — the full text is in [LICENSE](LICENSE), and `package.json` carries the
same identifier.
You may run, study, share and modify it under that license. It comes with **no warranty**, to the
extent permitted by law. If you redistribute it (or a modified version), the license requires you
to pass the same freedoms on and to make the corresponding source available.