[Bug]: Poll voter loses their "You voted" state as soon as someone else votes
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 74/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- react, typescript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 21
- Forks
- 7
- Ø Merge
- 11 Std. 14 Min.
- Gemergte PRs (30 T.)
- 30
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus TheCodeHeist-Coder/Rexial
-
bug level3 nsoc26
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
TheCodeHeist-Coder/Rexial#251 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Lint does not block a merge, and the same test step runs twiceEvtl. vergeben @spikedeeev hat das vor 7 Tagen übernommen. OffenBackend first issue bug good first issue help wanted level1 nsoc26
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
TheCodeHeist-Coder/Rexial#243 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add CodeQL and dependency scanning so a malicious or vulnerable dependency is caughtEvtl. vergeben @divyanshAgarwal123 hat das vor 9 Tagen übernommen. OffenBackend first issue enhancement help wanted level3 nsoc26
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 62/100
TheCodeHeist-Coder/Rexial#242 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
fix: validate types for login email and password (500 on non-string or missing body)Evtl. wieder frei @spikedeeev hat das vor 16 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
TheCodeHeist-Coder/Rexial#235 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
security: remediate the dependency baseline before enforcing the audit gateEvtl. vergeben @divyanshAgarwal123 hat das vor 6 Tagen übernommen. Offenlevel2 nsoc26
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
TheCodeHeist-Coder/Rexial#266 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in TheCodeHeist-Coder/Rexial
Ähnliche Issues
-
clawsweeper:intake:bug clawsweeper:intake:needs-environment
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
openclaw/openclaw#212827 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Use one constant for the 10,000-character input limitEvtl. vergeben @NginxL hat das heute übernommen. Offengood first issue refactor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
aniru-dh21/snap-validate#51 ·
Maintainer antworten meist innerhalb von 1 Tag
-
dependencies effort: small good first issue priority: low
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
TMHSDigital/screencast-mcp#509 ·
Maintainer antworten meist innerhalb von 1 Tag
-
from-review tech-debt testing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
blamechris/chroxy#9520 ·
Maintainer antworten meist innerhalb von 1 Tag