A participant's answer is silently lost when their connection drops
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
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- next.js, react, typescript
- Ambito
- frontend, networking
Direzione di ricerca
Inizia da apps/frontend/src/screens/LiveQuiz.tsx, in particolare da handleAnswer, handleStart, handleNext e dalla logica disabled dei pulsanti di risposta. Controlla lo stato ready di WebSocket prima di aggiornare lo stato della risposta selezionata o di inviarla e rendi gli errori visibili a partecipanti e host; l'issue lascia aperta la scelta tra rifiutarla e mettere in coda le domande senza risposta. Verifica che una connessione fallita non possa mostrare una risposta come inviata e che i controlli dell'host segnalino lo stesso errore.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In apps/frontend/src/screens/LiveQuiz.tsx, the answer buttons are disabled only by whether an answer is already chosen:
// line ~739
disabled={Boolean(selectedAnswer) || showResults}
They are never disabled by connectionState. handleAnswer then sends with an optional chain:
// line ~414
setSelectedAnswer(answerId); // the UI locks in immediately
const timeMs = Date.now() - questionStartTime;
ws?.send(JSON.stringify({ ... })) // no-ops silently on a dead socket
So after the reconnect attempts are exhausted (connectionState === "failed", the red banner showing), tapping an answer still works: selectedAnswer is set, the button renders as chosen, and nothing is sent. No throw, no error.
Why it matters
The player sees their answer highlighted as submitted and waits for results. It never reached the server, so they score 0 for that question — and for every question after, since the socket is still dead. The only clue is a banner they have most likely stopped noticing.
In a graded quiz this silently destroys someone's score.
handleStart and handleNext have the same unguarded ws?.send, so a host pressing Start or Next on a failed connection also gets no feedback.
What a fix looks like
- Disable the answer buttons when
connectionState !== "connected", with a visible reason rather than just the banner. - Make the send path explicit about failure: check
ws?.readyState === WebSocket.OPENbefore sending, and surface something to the user when it is not. - Decide what should happen to an answer chosen while disconnected — queue it for the reconnect, or refuse the tap outright. Say which you chose in the PR.
Definition of done
- An answer cannot be visually "submitted" when it could not be sent
- The participant is told their connection is the problem, at the moment they try
- Host controls behave the same way
- Lingua principale
- TypeScript
- Stelle
- 21
- Fork
- 7
- Merge medio
- 4h 13m
- PR unite (30g)
- 20
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
-
Redis is required to run the app but is in neither setup guideForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertadocumentation good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TheCodeHeist-Coder/Rexial#195 · 2 commenti ·
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
-
[Bug]: Device screenshot fails with 500 on iPhone Duo (Xcode 27.2): serve-sim calls simctl without --displayForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
pingdotgg/t3code#24900 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
inu-appcenter/UNIDorm-web#411 ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
ranxianglei/billion-context#4720 ·
I maintainer di solito rispondono entro 1 giorno
-
area:arcade game p3-medium ready-for-agent type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
fderuiter/deruiter.dev#2840 ·
I maintainer di solito rispondono entro 1 giorno