A participant's answer is silently lost when their connection drops
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 72/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- next.js, react, typescript
- Domínio
- frontend, networking
Direção de pesquisa
Comece por apps/frontend/src/screens/LiveQuiz.tsx, especialmente por handleAnswer, handleStart, handleNext e pela lógica disabled dos botões de resposta. Verifique o estado ready do WebSocket antes de atualizar o estado da resposta selecionada ou enviá-la e torne as falhas visíveis para participantes e hosts; a issue deixa em aberto escolher entre rejeitar e enfileirar as perguntas sem resposta. Verifique se uma conexão com falha não pode exibir uma resposta como enviada e se os controles do host mostram a mesma falha.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 21
- Forks
- 7
- Merge médio
- 4h 13min
- PRs com merge (30d)
- 20
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TheCodeHeist-Coder/Rexial
-
documentation good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
TheCodeHeist-Coder/Rexial#195 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
One PDF upload freezes the whole AI service, including its health checkTalvez já em andamento @Anshuu2004 assumiu hoje. AbertaBackend first issue bug help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
TheCodeHeist-Coder/Rexial#193 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
The join endpoint returns an error shape the frontend cannot readTalvez já em andamento @Anshuu2004 assumiu hoje. AbertaBackend first issue bug good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
TheCodeHeist-Coder/Rexial#192 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Registering without a password returns a 500 instead of telling you what is missingTalvez já em andamento @Anshuu2004 assumiu hoje. AbertaBackend first issue bug good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
TheCodeHeist-Coder/Rexial#191 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
CI does not run the frontend testsTalvez já em andamento @nayan45633 assumiu hoje. AbertaBackend first issue good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
TheCodeHeist-Coder/Rexial#188 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de TheCodeHeist-Coder/Rexial
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
farion1231/cc-switch#8829 ·
Mantenedores costumam responder em até 1 dia
-
[core-client] Remove unused hand-maintained transport helpers after the definition-table cutoverAbertadoc-audit enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100