Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

A host can start a quiz that has no questions

Aperta Adatta ai principianti
#162 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
express, postgresql, react, typescript
Ambito
backend, frontend

Direzione di ricerca

Inizia da apps/frontend/src/screens/LiveQuiz.tsx vicino al pulsante Start Game (~riga 349), che al momento controlla solo participants.length. Individua dove viene costruito il payload di sessione che l'organizzatore riceve all'ingresso e aggiungi il numero di domande, così da poter disabilitare il pulsante mostrando un motivo visibile. Controlla anche il gestore quiz:start e il percorso quiz:next-question che chiude le sessioni vuote, per capire dove deve andare un controllo lato server. È completato quando un quiz vuoto non può essere avviato e l'interfaccia indica il motivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug enhancement good first issue help wanted UI & UX

The organizer's Start button in the lobby only guards against having no players:

apps/frontend/src/screens/LiveQuiz.tsx (~line 349):

<button onClick={handleStart} disabled={participants.length === 0} ...>
  Start Game
</button>

Nothing checks that the quiz has any questions.

Starting an empty quiz walks the room through quiz:start → the 3-second "GET
READY!" screen → quiz:next-question with index 0, which finds no question and
immediately ends the session:

if (!sessionId || !questions[questionIndex]) {
    await endQuizSession(sessionId);
    ...
    broadcastToSession(sessionId, 'quiz:ended');
}

Every participant sees "GET READY!" and then, three seconds later, "Quiz
Finished! Congratulations Winners!" with an empty podium. The session is now
COMPLETED in the database, so the host has to create a new one.

The same applies to a quiz whose questions were all deleted, and it fails
identically with 1 participant and 0 questions.

Where to fix it. The lobby does not currently fetch the question list, so
this needs the count available client-side — either included in the session
payload the organizer already receives on join, or fetched separately.

Guarding only in the UI is not quite enough, since the WebSocket message can be
sent directly; a server-side check in quiz:start would be the complete fix.
Frontend-only is still a worthwhile first step — say in your PR which you did.

Definition of done:

  • The Start button is disabled when the quiz has no questions
  • The disabled state explains why, rather than just being greyed out
  • An empty quiz cannot be driven into a COMPLETED state by mistake
Lingua principale
TypeScript
Stelle
21
Fork
7
Merge medio
4h 31m
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TheCodeHeist-Coder/Rexial

Tutte le issue di TheCodeHeist-Coder/Rexial

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.