[Bug]: Poll voter loses their "You voted" state as soon as someone else votes
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
Hướng nghiên cứu
Start by tracing sanitizePoll in apps/ws-server/src/utils/pollManager.ts and the poll:updated/poll:ended broadcasts in apps/ws-server/src/utils/handleMessages.ts; then follow the poll update handler in apps/frontend/src/screens/LiveQuiz.tsx and how ActivePollOverlay.tsx uses votedOptionId. Add coverage for a player voting followed by another player's update, and check that the vote selection and results remain visible through poll updates and ending.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
I vote in a live poll and see "You voted" with the results. When the next person votes, my screen goes back to the unvoted view with the Vote buttons, and the results are hidden again. Tapping an option then sends a second vote, which the server refuses with ALREADY_VOTED, and the screen does not show anything. In a room with many players this happens on almost every vote. The "Your Vote" mark is also lost when the poll ends.
Why
apps/ws-server/src/utils/pollManager.ts:76:sanitizePollsetsvotedOptionId: nullwhen it is called without a participant id.apps/ws-server/src/utils/handleMessages.ts:733-735:poll:updatedis broadcast to the whole session without a participant id (same forpoll:ended).apps/frontend/src/screens/LiveQuiz.tsx:407-414: the client does{ ...prev, ...payload.poll }, so thatnulloverwrites the voter's saved choice.ActivePollOverlay.tsxusesvotedOptionIdto decide whether to show results.
Steps to reproduce
- Host a quiz, join with two players, launch a poll.
- Player A votes. A sees "You voted".
- Player B votes. A is back to the Vote buttons.
I reproduced both sides with a throwaway vitest test (Redis and Prisma faked on the server, fake WebSocket on the frontend). Messages A receives are poll:updated (null), poll:voted (option), poll:updated (null), and after the last one the screen shows "Tap an option above to submit your vote!".
Expected
A player's own choice stays selected until a new poll starts.
Suggested fix
Leave votedOptionId out of broadcast payloads (only include it when a participant id is passed), or keep prev.votedOptionId in the client when the poll id is the same. Add a test for vote, then someone else's update.
I can fix this one if you assign it to me.
- Ngôn ngữ chính
- TypeScript
- Star
- 21
- Fork
- 7
- Merge trung bình
- 11 giờ 14 phút
- Pull request đã merge (30 ngày)
- 30
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
-
bug level3 nsoc26
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
TheCodeHeist-Coder/Rexial#251 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Lint does not block a merge, and the same test step runs twiceCó thể đã có người làm @spikedeeev đã nhận 7 ngày trước. Đang mởBackend first issue bug good first issue help wanted level1 nsoc26
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TheCodeHeist-Coder/Rexial#243 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add CodeQL and dependency scanning so a malicious or vulnerable dependency is caughtCó thể đã có người làm @divyanshAgarwal123 đã nhận 9 ngày trước. Đang mởBackend first issue enhancement help wanted level3 nsoc26
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
TheCodeHeist-Coder/Rexial#242 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix: validate types for login email and password (500 on non-string or missing body)Có thể làm lại được @spikedeeev đã nhận 16 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TheCodeHeist-Coder/Rexial#235 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
security: remediate the dependency baseline before enforcing the audit gateCó thể đã có người làm @divyanshAgarwal123 đã nhận 6 ngày trước. Đang mởlevel2 nsoc26
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
TheCodeHeist-Coder/Rexial#266 · 2 bình luận · 1 người được giao ·
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ự
-
clawsweeper:intake:bug clawsweeper:intake:needs-environment
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openclaw/openclaw#212827 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Use one constant for the 10,000-character input limitCó thể đã có người làm @NginxL đã nhận hôm nay. Đang mởgood first issue refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
aniru-dh21/snap-validate#51 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies effort: small good first issue priority: low
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
TMHSDigital/screencast-mcp#509 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
from-review tech-debt testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
blamechris/chroxy#9520 ·
Maintainer thường phản hồi trong vòng 1 ngày