Severity: Medium
Labels: bug, frontend, P2
Location: frontend/src/components/QuizPanel.tsx:86-95 (start), active-phase guard :202
Description
start() does setQuestions(res.questions || []) then setPhase("active") unconditionally. The active UI is gated {phase === "active" && currentQuestion && ...}; with an empty array currentQuestion is undefined, so nothing renders — no question, no controls (Cancel exists only in the select phase).
Steps to reproduce
- Start a quiz on a concept the backend can't generate questions for.
- Land on a blank, control-less panel with no way back except hard navigation.
Expected vs actual
- Expected: an empty-result error and return to
select.
- Actual: silent transition to an empty screen.
Suggested fix
In start(), if questions.length === 0, toast.error(...) and stay in select.
Acceptance criteria
- A zero-question generation shows an error and keeps the user in the selectable state.
Severity: Medium
Labels: bug, frontend, P2
Location:
frontend/src/components/QuizPanel.tsx:86-95(start), active-phase guard:202Description
start()doessetQuestions(res.questions || [])thensetPhase("active")unconditionally. The active UI is gated{phase === "active" && currentQuestion && ...}; with an empty arraycurrentQuestionisundefined, so nothing renders — no question, no controls (Cancel exists only in theselectphase).Steps to reproduce
Expected vs actual
select.Suggested fix
In
start(), ifquestions.length === 0,toast.error(...)and stay inselect.Acceptance criteria