Add drag reordering, exam deadlines, frozen shared quizzes, batched OCR and semantic search
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 33s

- Drag-to-reorder for class materials, folders, quiz questions and deck cards. Pointer-based
  so touch works, plus keyboard (arrows/Home/End) with screen-reader announcements.
- Timed exams get a wall-clock deadline. The server refuses late answers, submits overdue
  exams with what was saved, and the countdown keeps running while the page is closed.
- Shared quiz sessions keep a frozen copy of their questions and flag later owner edits.
- Scanned PDFs are read in cached 8-page batches with real page numbers (pdf-lib), removing
  the 30 MB whole-file limit. Compatible providers now receive PDFs as file parts.
- Semantic search: embeddings for OpenAI, Gemini, Ollama and compatible servers, background
  indexing into chunk_vectors (migration 2), hybrid keyword + vector ranking for search, the
  assistant and focused generation, and a Settings -> AI section.

181 tests pass locally and in the Docker test stage on Node 24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-12 11:48:20 -07:00
parent 3046e46d1c
commit ccdad9728b
39 changed files with 1772 additions and 121 deletions

View file

@ -10,7 +10,7 @@ establish real-provider compatibility, and sampled desktop/mobile QA is not exha
| --- | --- |
| New architecture and UI | Rebuilt: React/Vite, Hono, built-in SQLite; distinct responsive light/dark design |
| Single administrator and public visitors | Implemented: secure local login, revocable links, isolated visitor progress |
| Classes and organization | Classes/folders, edit/move/search/delete, quiz/deck duplication; manual ordering and duplication are not equally exposed for every content type |
| Classes and organization | Classes/folders, edit/move/search/delete, quiz/deck duplication, drag-to-reorder (mouse, touch, keyboard) for materials, folders, questions and cards |
| Quizzes | MC/SATA, per-option explanations, question rationale, partial credit, practice/exam, shuffle, resume, missed review and history implemented |
| Flashcards | Decks, browse/self-assessment, persistent FSRS, reviews, undo and class/deck scoping implemented |
| Imports/templates/export | Preview/validation/editing, JSON/text bulk input, reusable templates and exports implemented |
@ -31,9 +31,10 @@ exam engine are not implemented; the brief listed additional types as optional.
independent schedules and new-card limits. V2 schedules each card once, with a global
daily new-card limit and deck/class/all review scopes. A practical simplification, but
it cannot reproduce separate course/exam review sets or independent per-set schedules.
- **Manual material order:** V1 supported drag/drop ordering of decks within material groups.
V2 class lists sort by recent update or title; the visible drag/drop is for file upload.
Some reorder APIs exist without matching UI. Quiz questions do have move-up/down controls.
- **Manual material order:** restored on 2026-11-12. The class page's default "Your order"
sort shows grip handles: drag (mouse or touch) or use arrow keys/Home/End on a handle to
reorder quizzes, decks, documents and notes within their group, and to reorder folders.
Quiz questions and deck cards are reorderable the same way.
- **Migration fidelity:** V2 imports source content, completed attempts and one selected
schedule per card. V1 interrupted StudyProgress sessions, named sets and their independent
schedules are not recreated. Historical reviewSnapshotJson is not consumed: imported
@ -73,18 +74,18 @@ Screenshot: ignored local `.test-data/rationale-check/correct-inline.png`.
## Remaining usability/feature priorities
Done on 2026-11-12: drag-to-reorder; wall-clock exam deadlines enforced by the server
(answers after the deadline plus a 5 s grace are refused and overdue exams are submitted with
what was saved, even if nobody reopens them); frozen shared-quiz sessions (a visitor's session
keeps the questions as they were at the start and notes later edits); batched, cached OCR for
long scanned PDFs; semantic (embedding) search merged with keyword search.
1. Restore selected-deck named review collections if replacing that V1 workflow is important.
2. Expose consistent ordering and duplication controls across content types.
3. Make timed exams use an explicit wall-clock deadline. The current runner is an active-study
clock: it pauses when hidden, and server completion does not enforce a deadline.
4. Preserve shared quiz question snapshots if scores must remain stable across owner edits;
public saved sessions currently rebuild against the latest published quiz content.
5. Add better import reporting/preservation for V1 history and interrupted sessions.
6. Improve large scanned-document OCR: currently sent as one native vision/PDF request with
a 30 MB scanned-PDF limit and an output cap, rather than paginated OCR. Lexical retrieval
and sampled long-document generation are implemented; comprehensive textbook coverage
and semantic matching are not guaranteed.
7. Full offline private studying, rich-text WYSIWYG authoring, study-plan generation and
2. Better import reporting/preservation for V1 history and interrupted sessions.
3. Scanned PDFs need a vision model that accepts PDFs; vision-only models (e.g. most Ollama
vision models) cannot read scanned PDFs yet because pages are not rendered to images.
4. Semantic search covers document passages; questions, cards and notes are keyword-only.
5. Full offline private studying, rich-text WYSIWYG authoring, study-plan generation and
additional case/question types remain optional future enhancements.
No obvious missing basic flip/streak/quiz-answer feedback remains by source review. Visual