pdf-quiz-generator/backend/app
Daniel 8a220bb12e Fix PREP 2013 extraction: OCR normalization, correct chunk boundary; category UI fix
Extraction fixes:
- OCR normalization: 'Pref erred' → 'Preferred', 'ltem' → 'Item' applied to boundary
  scan, Phase 1 questions, and Phase 2 answer key content before AI processing
- Chunk boundary: Phase 1 chunks now capped at (answer_section_start - 1) so no
  chunk bleeds into the answer section — (51, 100) becomes (51, 55) for PREP 2013
- Result: Phase 1 gets 2 clean chunks (1-50 and 51-55), Phase 2 gets pages 56-227

Category creation in DocumentDetailPage:
- Replaced window.prompt() with inline input form (more reliable, no browser quirks)
- Fixed option value type: String(c.id) ensures consistent string comparison with
  selectedQuestionCategoryId state (prevents type mismatch in controlled select)
- "+ New" button toggles inline form; Enter key or Add button submits

Deletion safety (confirmed):
- Deleting a quiz: questions detached to bank if exclusive, kept if shared — NEVER deleted
- Deleting a question category: questions uncategorized or moved — NEVER deleted

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 04:09:55 +02:00
..
models Junction table for shared questions; verification blocking; semantic bank search; bug fixes 2026-04-01 00:55:13 +02:00
routers Fix question bank: select-all, bulk category, page size, category delete 2026-04-01 02:55:25 +02:00
schemas Proper question bank system with question categories 2026-03-31 21:34:39 +02:00
services Two-phase extraction for end-of-document answer keys (PREP 2013); scroll fix; bug audit 2026-04-01 03:22:26 +02:00
tasks Fix PREP 2013 extraction: OCR normalization, correct chunk boundary; category UI fix 2026-04-01 04:09:55 +02:00
utils Junction table for shared questions; verification blocking; semantic bank search; bug fixes 2026-04-01 00:55:13 +02:00
__init__.py Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
config.py Major platform update: pgvector search, multi-provider TTS, settings page, CLI 2026-03-31 18:03:10 +02:00
database.py Major platform update: pgvector search, multi-provider TTS, settings page, CLI 2026-03-31 18:03:10 +02:00
main.py Junction table for shared questions; verification blocking; semantic bank search; bug fixes 2026-04-01 00:55:13 +02:00