Spectate live code battles
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, nextjs, nodejs
- Ambito
- backend, full-stack
Direzione di ricerca
Start with frontend/pages/agent-spectate.js for the existing spectator experience and backend/server.js for battle-room events. Then trace the socket handlers and tests to understand player authorization and hidden-test data boundaries. This spans delayed streaming, snapshots, settings, and load measurement; done means the listed socket tests and commands pass and the pull request includes the required two-browser walkthrough and performance numbers.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Agent battles can be watched live (frontend/pages/agent-spectate.js). Human code battles cannot. Watching two strong players race on the same problem is the most compelling thing CodeArena can show, and right now it is invisible.
Design
- A battle page at
/watch/<battleId>showing both editors read-only, the timer, test progress and the result. - The server already streams
code-update(throttled) andsubmit-solutioninto the battle room inbackend/server.js. Add a separate spectator room per battle so spectators never receive anything players send each other privately, and players never learn who is watching except a viewer count. - Delay the stream for spectators by a configurable amount (default 30 seconds,
CODEARENA_SPECTATE_DELAY_MS). Without a delay a friend can relay an opponent's code to a player in real time. - Players can opt out in settings. Ranked tournament matches are always watchable; unranked battles follow the player setting.
- A "Live now" list on the home page or leaderboard, ordered by combined rating.
Things that must hold
- A spectator cannot emit any battle event. Every battle handler must reject sockets that are not one of the two players (add a test per handler).
- Hidden tests and their expected outputs never reach spectators, before or after the battle.
- Spectators joining mid-battle get a consistent snapshot, then the delayed stream, with no gap or duplicate.
- 200 spectators on one battle must not slow the players. Measure it and put the numbers in the pull request.
Definition of done
- Two-browser walkthrough recorded in the pull request: two players plus a spectator, including a spectator joining halfway.
- Socket tests covering the rejection rules and the delay.
npm testandnode scripts/check-boundary.jspass.
- Lingua principale
- JavaScript
- Stelle
- 0
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun 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 sennaicodes/codearena
-
Add issue and pull request templatesForse di nuovo libera @franciscorodr26 l’ha presa 19 giorni fa e non c’è nessuna pull request aperta. Apertadocumentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
sennaicodes/codearena#13 · 1 commento ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
sennaicodes/codearena#31 ·
Tutte le issue di sennaicodes/codearena
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
evi0s/WMPFDebugger#303 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
HakanSeven12/OpenCADStudio#2257 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[bug] extension mappingAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
bug code-annotation
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
quarto-dev/quarto-cli#15215 ·
I maintainer di solito rispondono entro 1 giorno