Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

A participant's answer is silently lost when their connection drops

Abierto Apto para principiantes
#175 1 comentario 0 reacciones 0 asignados Ver en GitHub

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

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

bug help wanted UI & UX

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.OPEN before 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TheCodeHeist-Coder/Rexial

Todos los issues de TheCodeHeist-Coder/Rexial

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.