A discipline may now belong to one exam. `question_tags.exam_id` NULL keeps a tag shared — Cardiology means the same thing whichever exam you sit — while a set exam_id scopes it. Boards Pediatrics and a future Step 1 Pediatrics are therefore separate rows over genuinely different bodies of content, not one label stretched across both. Uniqueness moves from (name, type) to (name, type, exam) to allow it (migration b0c1d2e3f4a5). `scripts/bind_exam_tags.py` binds Pediatrics to Pediatrics Boards and tags the 884 questions in that exam that were missing it — the whole bank is paediatrics, so it now reads 2,948. Facet counts are computed within the learner's active exam, and a tag scoped to a different exam is left out: an unscoped list offered disciplines that could not match anything they were studying. With no exam chosen, everything is offered as before. Tests: 4 new backend (same name once per exam, unscoped list offers all, choosing an exam scopes counts and hides other exams' tags, switching exam switches which Pediatrics is offered). Full suite green: 123 backend. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PpfzbZ1QTLMeVYxM2kyq8m
5 KiB
PedsHub — outstanding work
Everything requested and not yet delivered. Ordered roughly by dependency, not priority — say which to take and I'll reorder.
Updated 2026-09-10.
In flight
- Question version history — snapshot on edit, keep last 5, restore from
the question edit page. Migration
a9b0c1d2e3f4and the model exist; the snapshot-on-write hook, restore endpoint and UI are not wired yet.
Design agreed, not built
- AI Mode (RAG chat) — see "AI Mode design" below. Needs: conversation + message tables, the retrieval step, the ID-citation contract, and the chat UI with a thread rail.
- Global search page — one query across questions, articles, sections, cards and media. Results grouped by article with the matching sections listed beneath (section index already exists). Typeahead with "Go to" and "Search for". Search / AI Mode toggle.
Content and editing
- Admin can edit everything — study plans (rename, reorder, add/remove blocks, move questions between blocks) and attach articles to a block.
- Study plan blocks carry articles, not only questions: "Articles" with Mark as read, then "Sessions" with Study/Exam mode.
- Admin settings page revamp — currently ugly; needs restructuring.
- Image libraries — group images into libraries; grant a person access to one, several, or all. Same shape as the existing per-category question grants.
- Question folders — collect questions into folders for assignment and access, alongside category grants.
- Media management page — browse the image bank, show each image's id on hover, edit caption/alt/tags, attach to a question.
Article reading
- Nested sections — sub-sections under a section, with a breadcrumb
(
Article › Section) and per-section collapse. - References — numbered list per article, with superscript markers in the body linking down to them.
- Per-section notes and feedback — a learner's own note attached to a section, and a feedback channel to the educator.
- High-yield / key-exam-info toggles — mark spans and let the reader show or hide them.
Quiz runner
- Per-question notes in study mode, replacing the global notes tab that is currently on the quiz page.
- Per-question feedback to the educator.
- Tutorial mode — first-run coach marks ("Step 2 of 6", Skip / Next).
Analysis
- Per-question performance table — number, stem excerpt, difficulty, time per question, percentile; sortable, paginated.
- Session analysis tab — per-session results with study recommendations grouped by Articles / Disciplines / Systems.
Dashboard
- Overview page for signed-in users — search hero with Search / AI Mode toggle, "Continue your study", and a study-analysis donut. The current dashboard becomes this; a separate signed-out landing page comes later.
Taxonomy
- Systems need subsystems — the current tree came from the old subject tags and is flat where it should nest. Disciplines are fine.
- Exam-scoped disciplines — done 2026-09-10. A tag may be shared
(
exam_idNULL, e.g. Cardiology) or scoped to one exam. Boards Pediatrics and a future Step 1 Pediatrics are separate rows over different content, rather than one label spanning both. Pediatrics is bound to Pediatrics Boards and now covers all 2,948 questions. Facet counts are computed within the active exam and empty facets are hidden.
AI Mode design
Retrieval decides what the model may cite; the model only writes prose.
- Embed the learner's message, search every corpus (
hybrid_idsalready covers questions, articles, sections, cards, media). - Put the retrieved rows in the prompt as the only permitted sources, each with its kind and id.
- The model cites by id from that list —
[[article:7#features]]— never a URL. - The server rewrites citations to links and drops any id that was not retrieved. A citation the model invented cannot survive.
That last step is the safety property, and it is enforced by the system rather than by the model behaving well — the same discipline as the article page no longer printing answers.
Open questions:
- Persist conversations (a thread rail with named threads)? Needs
conversations+messages. - Cards should carry links too, resolved the same way.
Done this session
Hybrid search (full text + BGE-M3, RRF-fused) · embedding provenance and retry job · articles, cards, sections and media as searchable corpora · exams as real data with a per-user active exam · AI-mode matching from description or upload · category management page · tag vocabulary sanitised · question manager with bulk editing · per-category educator grants · full-page question editor · session rail with gradual reveal · articles read as one page · practise-this-topic · continue-study panel · PREP study plans.