Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Spectate live code battles

Aperta
#15 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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

enhancement help wanted

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) and submit-solution into the battle room in backend/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 test and node scripts/check-boundary.js pass.
Lingua principale
JavaScript
Stelle
0
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sennaicodes/codearena

Tutte le issue di sennaicodes/codearena

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.