A host leaving during the countdown strands the room on GET READY!
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 95/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- nextjs, react, typescript
- Domain
- frontend, networking
Research direction
Start in apps/frontend/src/screens/LiveQuiz.tsx at the quiz:start handler and the existing timer cleanup. Capture the countdown timer, clear it in the effect cleanup, and guard the socket send with readyState === WebSocket.OPEN. Verify that unmounting during the countdown cancels the send and produces no uncaught console exception.
Written by the indexing model from the issue text.
Description
In apps/frontend/src/screens/LiveQuiz.tsx, the quiz:start handler schedules the first question three seconds later:
case "quiz:start":
setGameState(GameState.STARTING);
setTimeout(() => {
if (isOrganizer) socket?.send(JSON.stringify({
type: "quiz:next-question",
payload: { sessionId, questionIndex: 0 }
}));
}, 3000);
break;
The handle is never captured, so the effect's cleanup cannot clear it. That cleanup already clears the other three timers in this component (timeoutId, reconnectTimer, refreshTimer) — this one was missed.
Why it matters
If the host navigates away, reloads, or the component remounts inside that three-second window, the timer still fires and calls send() on a socket that is closing or closed. The first question is never broadcast.
Every participant sits on "GET READY!" indefinitely. There is no recovery from the participant side; the host has to start a whole new session.
What a fix looks like
- Capture the handle in the same
letscope as the other timers and clear it in the cleanup. - While in there, guard the send itself —
socket?.sendon a closing socket throwsInvalidStateErrorin a real browser, so checkreadyState === WebSocket.OPENfirst.
Definition of done
- Unmounting during the countdown cancels the pending send
- No uncaught exception in the console when a host leaves mid-countdown
Good first issue: a few lines, in a file that already shows the right pattern three times.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 7
- Avg merge
- 4h 31m
- Merged PRs (30d)
- 22
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TheCodeHeist-Coder/Rexial
-
bug good first issue help wanted UI & UX
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
TheCodeHeist-Coder/Rexial#205 ·
Maintainers usually reply within 1 day
-
One PDF upload freezes the whole AI service, including its health checkPossibly taken @Anshuu2004 claimed this 1 day ago. OpenBackend first issue bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
TheCodeHeist-Coder/Rexial#193 · 2 comments ·
Maintainers usually reply within 1 day
-
The join endpoint returns an error shape the frontend cannot readPossibly taken @Anshuu2004 claimed this 1 day ago. OpenBackend first issue bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
TheCodeHeist-Coder/Rexial#192 · 1 comment ·
Maintainers usually reply within 1 day
-
Registering without a password returns a 500 instead of telling you what is missingPossibly taken @Anshuu2004 claimed this 1 day ago. OpenBackend first issue bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TheCodeHeist-Coder/Rexial#191 · 1 comment ·
Maintainers usually reply within 1 day
-
CI does not run the frontend testsPossibly taken @nayan45633 claimed this 1 day ago. OpenBackend first issue good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheCodeHeist-Coder/Rexial#188 · 2 comments ·
Maintainers usually reply within 1 day
All issues in TheCodeHeist-Coder/Rexial
Similar issues
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
0️⃣ phase/new
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
microsoft/playwright#43640 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100