Add Regrade: instant re-run when photos are stored, fallback re-pick otherwise

Stores the original photo(s) for every card graded from now on, so an
existing history row can be re-graded in place without re-uploading -- most
useful right after a grading-logic fix like the last few commits. Cards
graded before this feature (or saved without images) fall back to the same
photo picker as a fresh grade, then start getting instant regrades from then
on. list_grades/get_grade now select an explicit column list rather than
SELECT * so the stored images are never pulled into memory just to be
discarded for the browser-facing response.
This commit is contained in:
Barely Removable 2026-08-22 11:17:06 -07:00
parent 552f862f4c
commit e586bc92e7
4 changed files with 302 additions and 39 deletions

View file

@ -61,6 +61,11 @@
<div id="grade-review"></div>
</section>
<!-- Fallback photo picker for Regrade on a card saved before this feature
existed (or otherwise missing its stored photo) — regradeTargetId in
app.js tracks which row this fires for. -->
<input id="regrade-file" type="file" accept="image/*" multiple hidden>
<!-- ----------------------------------------------------------- history -->
<section class="panel">
<div class="panel-head">