Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

A host leaving during the countdown strands the room on GET READY!

Open Beginner friendly
#178 2 comments 0 reactions 0 assignees View on GitHub

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

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

bug good first issue help wanted UI & UX

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 let scope as the other timers and clear it in the cleanup.
  • While in there, guard the send itself — socket?.send on a closing socket throws InvalidStateError in a real browser, so check readyState === WebSocket.OPEN first.
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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TheCodeHeist-Coder/Rexial

All issues in TheCodeHeist-Coder/Rexial

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.