A participant's answer is silently lost when their connection drops
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- next.js, react, typescript
- Área
- frontend, networking
Línea de trabajo
Comienza por apps/frontend/src/screens/LiveQuiz.tsx, especialmente por handleAnswer, handleStart, handleNext y la lógica disabled de los botones de respuesta. Comprueba el estado ready de WebSocket antes de actualizar el estado de la respuesta seleccionada o de enviarla, y haz visibles los errores para los participantes y los hosts; el issue deja abierta la decisión entre rechazarla y poner en cola las preguntas sin responder. Verifica que una conexión fallida no pueda representar una respuesta como enviada y que los controles del host muestren el mismo error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 21
- Forks
- 7
- Merge medio
- 3 h 39 min
- PR fusionados (30 d)
- 16
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TheCodeHeist-Coder/Rexial
-
documentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TheCodeHeist-Coder/Rexial#195 ·
Los mantenedores suelen responder en 1 día
-
Backend first issue bug help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
TheCodeHeist-Coder/Rexial#193 ·
Los mantenedores suelen responder en 1 día
-
Backend first issue bug good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
TheCodeHeist-Coder/Rexial#192 ·
Los mantenedores suelen responder en 1 día
-
Backend first issue bug good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
TheCodeHeist-Coder/Rexial#191 ·
Los mantenedores suelen responder en 1 día
-
good first issue help wanted UI & UX
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
TheCodeHeist-Coder/Rexial#190 ·
Los mantenedores suelen responder en 1 día
Todos los issues de TheCodeHeist-Coder/Rexial
Issues similares
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPosiblemente ocupada @ItsDeadlyProgrammer la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
appsmithorg/appsmith#42471 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Status: Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
mermaid-js/mermaid#8546 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
Los mantenedores suelen responder en 1 día