Repository navigation
fix: show load and action errors with retry instead of empty states - #182
Merged
TheCodeHeist-Coder merged 1 commit intoOct 21, 2026
Conversation
TheCodeHeist-Coder
self-requested a review
October 21, 2026 19:48
TheCodeHeist-Coder
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds real error states to the dashboard and the quiz builder, so a failed request is no longer shown as "you have no data".
What
Dashboard.tsx:fetchQuizzesnow records a load error; the hosted-quizzes panel shows an error message with a Retry button instead of the empty state, and the play-history panel stays blank instead of claiming "No played history yet."handleCreaterecords a create error, shown inside the create modal.QuizBuilder.tsx:fetchQuizrecords a load error, rendered with a Retry button instead of an empty question list;handleGenerateCoderecords an error shown next to the Generate button.Why
Fixes #180.
GET /quizzesandGET /quizzes/:idswallow failures, so a network blip or 500 renders the misleading empty-state copy. An organiser about to host a session is told their quizzes do not exist. The same pattern silently eats failed create and generate-code requests.Kept each screen's states inline (no shared component) so the diff stays reviewable, per the issue's guidance.
Testing
npx vitest run src/screens/Dashboard.test.tsx src/screens/QuizBuilder.test.tsx— 11/11 pass.npx vitest run— 34 passed, 1 failed (JoinQuiz.test.tsx); verified that failure exists on cleanmainwithout these changes.npx tsc -b— clean.npx eslinton the touched files — no new warnings; remainingno-explicit-anyerrors are on untouched lines and pre-exist onmain.Note: this branch is based on
main, independent of PR #181 (the duplicate-modal fix). If #181 merges first, I'll rebase.Related issue
Closes #180
Type of change
Which services does this touch?
apps/frontendHow did you test this?
Ran the commands above locally on Windows (Node 20, pnpm 10). Simulated failures with mocked API rejections.
Checklist
pnpm run lint(ran scopedeslinton the changed files instead — see Testing)pnpm run check-types(equivalenttsc -bin apps/frontend)pnpm run builddocker-compose up.envfile, API key or other secretFirst pull request here? Unticked checkboxes reflect what I could not run on this machine (Docker/full build); happy to run anything else you'd like.