Skip to content

feat(quiz): immediate per-question feedback + exam-mode toggle - #28

Merged
jonasbrami merged 2 commits into
mainfrom
feat/immediate-feedback
May 29, 2026
Merged

feat(quiz): immediate per-question feedback + exam-mode toggle#28
jonasbrami merged 2 commits into
mainfrom
feat/immediate-feedback

Conversation

@jonasbrami

Copy link
Copy Markdown
Owner

What

The first slice of the feedback loop (roadmap #2). In the new default practice mode, committing a deterministic question (mcq / tf / mermaid) reveals it immediately — correct/incorrect, the right answer, and the explanation — and locks it. The verdict is computed client-side (the answer already ships in /state), reusing the existing results card, so there's no server round-trip.

A sidebar Mode toggle ("Reveal answers as I go") flips between practice and the classic batch/exam flow, sticky per browser via localStorage.

Production-over-recognition: seeing why you were wrong at the point of the mistake beats a scorecard at the end.

Behaviour

  • Practice (default) — deterministic question reveals + locks on first commit; open questions stay interactive (no client-side answer to reveal — they grade at submit, as today).
  • Exam — answering view behaves exactly as before; toggling preserves existing selections; submit-bar message reflects the active mode.

Scope

Invariants preserved

  • textContent-only frontend (reveal reuses the existing result-card renderer).
  • No new browser↔host channel; nothing posted until submit/publish (reveal is purely local).
  • Backward-compatible: exam mode is the prior behaviour byte-for-byte.

Testing

  • node --check on the bundle; full mcp/engine suite green (no Python touched).
  • Real-browser check (Chrome DevTools): correct reveal (green + explanation) and incorrect reveal ("your pick" vs "correct answer" + explanation) for mcq/tf; open question stays interactive; the exam-mode toggle round-trips without losing answers and updates the submit-bar message.

🤖 Generated with Claude Code

jonasbrami and others added 2 commits May 29, 2026 18:54
Practice mode (new default): the moment you commit a deterministic question
(mcq/tf/mermaid) it reveals — correct/incorrect, the right answer, and the
explanation — and locks. The verdict is computed client-side (the answer already
ships in /state), reusing the results card, so there's no server round-trip.
Open questions are unchanged (no client-side answer to reveal; they grade at submit).

A sidebar "Mode" toggle ("Reveal answers as I go") flips between practice and the
classic batch/exam flow; the choice is sticky per browser via localStorage. In exam
mode the answering view behaves exactly as before, and selections are preserved when
toggling. The submit-bar message reflects the active mode.

Production-over-recognition: seeing why you were wrong right at the point of the
mistake beats a scorecard at the end.

Frontend only — no backend or schema change. Verified in a real browser: correct
and incorrect reveals (with explanation) for mcq/tf, open question stays interactive,
and the exam-mode toggle round-trips without losing answers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jonasbrami
jonasbrami merged commit 42fd5d1 into main May 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant