A participant's answer is silently lost when their connection drops
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- next.js, react, typescript
- Lĩnh vực
- frontend, networking
Hướng nghiên cứu
Bắt đầu với apps/frontend/src/screens/LiveQuiz.tsx, đặc biệt là handleAnswer, handleStart, handleNext và logic disabled của các nút trả lời. Hãy kiểm tra trạng thái ready của WebSocket trước khi cập nhật trạng thái câu trả lời đã chọn hoặc gửi câu trả lời, đồng thời để người tham gia và host nhìn thấy lỗi; issue vẫn để ngỏ lựa chọn giữa việc từ chối và đưa các câu chưa được trả lời vào hàng đợi. Hãy xác minh rằng kết nối thất bại không thể hiển thị câu trả lời như đã được gửi và các nút điều khiển của host cũng hiển thị lỗi tương tự.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 21
- Fork
- 7
- Merge trung bình
- 3 giờ 39 phút
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TheCodeHeist-Coder/Rexial
-
documentation good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TheCodeHeist-Coder/Rexial#195 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Backend first issue bug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
TheCodeHeist-Coder/Rexial#193 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Backend first issue bug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
TheCodeHeist-Coder/Rexial#192 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Backend first issue bug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TheCodeHeist-Coder/Rexial#191 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted UI & UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
TheCodeHeist-Coder/Rexial#190 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TheCodeHeist-Coder/Rexial
Issue tương tự
-
area:desktop bug documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anthropics/claude-code#104801 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Halloween Non Stop SDĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
spudly/design-system#110 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixCó thể đã có người làm @ItsDeadlyProgrammer đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
appsmithorg/appsmith#42471 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày