A participant's answer is silently lost when their connection drops
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- next.js, react, typescript
- 領域
- frontend, networking
調査の方向性
apps/frontend/src/screens/LiveQuiz.tsx から始め、特に handleAnswer、handleStart、handleNext、および回答ボタンの disabled ロジックに注目します。選択した回答の状態を更新または送信する前に WebSocket の ready state を確認し、失敗を参加者とホストの両方に表示してください。選ぶべき方法は、拒否するか、未回答のものをキューに入れるかのどちらかです。接続に失敗した場合、回答が送信済みとして表示されないことを確認し、ホストのコントロールでも同じ失敗が表示されることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 21
- フォーク
- 7
- 平均マージ
- 4時間 13分
- マージ済み PR(30日)
- 20
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TheCodeHeist-Coder/Rexial のほかの issue
-
documentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TheCodeHeist-Coder/Rexial#195 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
One PDF upload freezes the whole AI service, including its health check対応中かも @Anshuu2004 が 1 日前に担当しました。 オープンBackend first issue bug help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
TheCodeHeist-Coder/Rexial#193 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
The join endpoint returns an error shape the frontend cannot read対応中かも @Anshuu2004 が 1 日前に担当しました。 オープンBackend first issue bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
TheCodeHeist-Coder/Rexial#192 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Registering without a password returns a 500 instead of telling you what is missing対応中かも @Anshuu2004 が 1 日前に担当しました。 オープンBackend first issue bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TheCodeHeist-Coder/Rexial#191 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
CI does not run the frontend tests対応中かも @nayan45633 が 1 日前に担当しました。 オープンBackend first issue good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
TheCodeHeist-Coder/Rexial#188 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
TheCodeHeist-Coder/Rexial の issue をすべて見る
似ている issue
-
bug require-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
expressjs/expressjs.com#2549 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
umami-software/umami#4686 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
[Bug]: Device screenshot fails with 500 on iPhone Duo (Xcode 27.2): serve-sim calls simctl without --display対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
pingdotgg/t3code#24900 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
inu-appcenter/UNIDorm-web#411 ·
メンテナーはふだん 1 日以内に返信
-
🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信