Replays for code battles
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, nextjs, nodejs
- Lĩnh vực
- full-stack
Hướng nghiên cứu
Read frontend/pages/agent-replay/[id].js for the existing replay flow and backend/db.js for migration patterns; trace the code-update stream and battle-finish handling. Add a replay-log round-trip test that verifies byte-for-byte final code, route tests for private replay access, and run npm test plus node scripts/check-boundary.js; done means the design requirements and definition of done are met.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
After a battle, players can see the final code, but not how either player got there. A replay that scrubs through both editors side by side is the best learning tool a battle site can offer: you see where the winner started, what they deleted, and when the tests went green.
Agent battles already have replays (frontend/pages/agent-replay/[id].js). Code battles do not. battles_history stores only the final winner_code and loser_code.
Design
- Record a compact edit log per player during the battle: timestamped diffs from the existing throttled
code-updatestream, plus each run and submit with its pass count. Do not store every keystroke. - Store it in a new table keyed by
battle_uuid, written once when the battle finishes. Add the migration inbackend/db.jsthe same way existing ones are added. - Cap the size per battle (for example 256 KB compressed) and degrade gracefully past it by keeping fewer snapshots.
- A replay page at
/replay/<battleId>with a shared timeline, play and pause, 1x/4x/16x speed, and markers for runs and submits. - Only the two players can see a replay by default. Either player can make it public. Public replays show on profiles.
- Delete edit logs after a configurable retention period (default 90 days), with a scheduled sweep.
Definition of done
- Replaying reconstructs the exact final code for both players (add a test that replays a recorded log and compares byte for byte).
- A three-minute battle produces a log under the cap, with numbers in the pull request.
- Privacy rules covered by route tests: non-players get 404 on private replays.
npm testandnode scripts/check-boundary.jspass.
- Ngôn ngữ chính
- JavaScript
- Star
- 0
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 sennaicodes/codearena
-
Add issue and pull request templatesCó thể làm lại được @franciscorodr26 đã nhận 21 ngày trước và không có pull request nào đang mở. Đang mởdocumentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
sennaicodes/codearena#13 · 1 bình luận ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
sennaicodes/codearena#31 ·
Tất cả issue của sennaicodes/codearena
Issue tương tự
-
Độ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
feimacode/open-design-agent-kit#66 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
xojs/eslint-config-xo#134 ·
-
FEATURE REQUEST
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
linuxmint/cinnamon-spices-extensions#1193 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
huggingface/transformers.js#1839 ·
Maintainer thường phản hồi trong vòng 1 ngày