A host can start a quiz that has no questions
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
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
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
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TheCodeHeist-Coder/Rexial
-
bug good first issue help wanted UI & UX
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TheCodeHeist-Coder/Rexial#205 ·
I maintainer di solito rispondono entro 1 giorno
-
One PDF upload freezes the whole AI service, including its health checkForse già presa @Anshuu2004 l’ha presa 1 giorno fa. ApertaBackend first issue bug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TheCodeHeist-Coder/Rexial#193 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
The join endpoint returns an error shape the frontend cannot readForse già presa @Anshuu2004 l’ha presa 1 giorno fa. ApertaBackend first issue bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
TheCodeHeist-Coder/Rexial#192 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Registering without a password returns a 500 instead of telling you what is missingForse già presa @Anshuu2004 l’ha presa 1 giorno fa. ApertaBackend first issue bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
TheCodeHeist-Coder/Rexial#191 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
CI does not run the frontend testsForse già presa @nayan45633 l’ha presa 1 giorno fa. ApertaBackend first issue good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
TheCodeHeist-Coder/Rexial#188 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TheCodeHeist-Coder/Rexial
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
microsoft/playwright#43640 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
grasshopper-protocol/grsshppr#172 ·
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Tencent/teamai-cli#1397 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
DouyinFE/semi-design#3641 ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno