[Bug]: Poll voter loses their "You voted" state as soon as someone else votes
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 74/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 21
- Fork
- 7
- Merge medio
- 11h 14m
- PR unite (30g)
- 30
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TheCodeHeist-Coder/Rexial
-
bug level3 nsoc26
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
TheCodeHeist-Coder/Rexial#251 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Lint does not block a merge, and the same test step runs twiceForse già presa @spikedeeev l’ha presa 7 giorni fa. ApertaBackend first issue bug good first issue help wanted level1 nsoc26
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
TheCodeHeist-Coder/Rexial#243 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Add CodeQL and dependency scanning so a malicious or vulnerable dependency is caughtForse già presa @divyanshAgarwal123 l’ha presa 9 giorni fa. ApertaBackend first issue enhancement help wanted level3 nsoc26
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
TheCodeHeist-Coder/Rexial#242 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
fix: validate types for login email and password (500 on non-string or missing body)Forse di nuovo libera @spikedeeev l’ha presa 16 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
TheCodeHeist-Coder/Rexial#235 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
security: remediate the dependency baseline before enforcing the audit gateForse già presa @divyanshAgarwal123 l’ha presa 6 giorni fa. Apertalevel2 nsoc26
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
TheCodeHeist-Coder/Rexial#266 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TheCodeHeist-Coder/Rexial
Issue simili
-
clawsweeper:intake:bug clawsweeper:intake:needs-environment
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
openclaw/openclaw#212827 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Use one constant for the 10,000-character input limitForse già presa @NginxL l’ha presa oggi. Apertagood first issue refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aniru-dh21/snap-validate#51 ·
I maintainer di solito rispondono entro 1 giorno
-
dependencies effort: small good first issue priority: low
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
TMHSDigital/screencast-mcp#509 ·
I maintainer di solito rispondono entro 1 giorno
-
from-review tech-debt testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
blamechris/chroxy#9520 ·
I maintainer di solito rispondono entro 1 giorno