Skip to content

fix: cancel host countdown after leaving quiz - #236

Merged
TheCodeHeist-Coder merged 1 commit into
TheCodeHeist-Coder:mainfrom
divyanshAgarwal123:codex/fix-host-start-countdown
Nov 17, 2026
Merged

TheCodeHeist-Coder merged 1 commit into
TheCodeHeist-Coder:mainfrom
divyanshAgarwal123:codex/fix-host-start-countdown

Conversation

@divyanshAgarwal123

Copy link
Copy Markdown
Contributor

What does this PR do?

Capture the host's three-second quiz:start countdown timer, cancel it when the live quiz screen unmounts, and send the first question only while the original socket is still open. A repeated start message replaces the previous timer instead of scheduling duplicate sends.

Related issue

Closes #178

Type of change

  • Bug fix
  • Tests

Which services does this touch?

  • apps/frontend

How did you test this?

  • pnpm --filter frontend test -- src/screens/LiveQuiz.test.tsx: 9 tests passed, including host departure during countdown and a closed socket.
  • pnpm --filter frontend check-types: passed.
  • pnpm --filter frontend build: passed.
  • git diff --check: passed.
  • Scoped ESLint still reports six existing errors and one existing warning in LiveQuiz.tsx on unchanged lines; this PR adds no new lint findings. I did not run a multi-participant browser session or Docker Compose.

Checklist

  • I ran pnpm run lint (existing lint findings noted above)
  • I ran pnpm run check-types
  • I ran pnpm run build (frontend)
  • The app still starts with docker-compose up (not run)
  • No documentation or setup change is needed for this bug fix.
  • I did not commit any .env file, API key or other secret.

@divyanshAgarwal123

Copy link
Copy Markdown
Contributor Author

The current head 5947163 passes all 10 GitHub checks, including lint/typecheck, frontend build, and secret scan. The focused countdown tests and frontend build also passed locally. When you review, could you apply the issue's nsoc26 and level1 labels to this PR for NSoC credit? The PR currently has no labels. Thanks.

@TheCodeHeist-Coder
TheCodeHeist-Coder merged commit c9a4c1c into TheCodeHeist-Coder:main Nov 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants