Commit graph

350 commits

Author SHA1 Message Date
jedarden
0af9fa33b6 docs: verify bf-67io - SQL migration file already exists
The migration file migrations/0001_initial.sql was created in commit 31678be
and contains the complete schema matching cmd/acb-api/db.go.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bead-Id: bf-67io
2026-05-22 16:17:33 -04:00
jedarden
44359c2425 docs: verify mobile bottom tab bar implementation (bf-om23)
Verified that the mobile bottom tab bar specified in §16.4 is implemented
in web/index.html as inline styles, not in external CSS files.

The implementation matches specification:
- Four bottom tabs: Home, Watch, Compete, Board
- Persistent bottom tab bar on mobile (<640px)
- Proper z-index layering and responsive behavior

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:08:40 -04:00
jedarden
60a7969dca chore: update needle predispatch sha
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:04:10 -04:00
jedarden
6c830dca5d chore: update needle predispatch sha
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:01:27 -04:00
jedarden
424aaf34d6 docs: notes for bf-67io - SQL migration file already exists
The migration file migrations/0001_initial.sql was added in commit 31678be.
This bead was filed based on an outdated plan inventory.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:59:30 -04:00
jedarden
a304f1febd docs: notes for bf-3ca5
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:58:27 -04:00
jedarden
c81bf1de7d docs: clarify Phase 13 strategies vs §10 evolver pipeline
Add comprehensive file header to bot_strategies_phase13.go explaining:
- These are hand-coded strategy implementations, NOT LLM-evolved
- How they relate to the autonomous evolution system in plan §10
- Key distinction: Phase 13 = human-designed fixed archetypes,
  Evolver = LLM-generated continuously evolving candidates

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:57:50 -04:00
jedarden
d73a77e5db Notes for bf-67io: SQL migration file already exists in commit 31678be
Verified that migrations/0001_initial.sql contains all 20 tables from
cmd/acb-api/db.go schema. Work was completed prior to bead assignment.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:55:05 -04:00
jedarden
31678beec7 Infra: Add initial SQL migration file (0001_initial.sql)
Extracts the embedded schema from cmd/acb-api/db.go into a standalone
migration file per §11.1 plan inventory. Creates all core tables:

- Core: bots, matches, match_participants, jobs, rating_history
- Season/series: seasons, season_snapshots, series, series_games
- Predictions: predictions, predictor_stats
- Maps: maps, map_scores, map_votes, map_fairness
- Evolution: programs
- Playlists: playlists, playlist_matches
- Feedback: replay_feedback, feedback_upvotes
- Enrichment: enrichment_requests

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:52:54 -04:00
jedarden
fe9f786bde Notes for bf-ns9q: C# starter kit registration re-verification
Verified all required components are in place:
- CI workflow at starters/csharp/.github/workflows/build.yml (added in 7bf6566)
- Plan §5.8 coverage at line 986 (added in 55c594c)
- Directory listing at line 2565 (added in 9d4a311)
- Plan §11.2 template repos at line 2629 (added in 55c594c)

C# starter kit fully registered alongside 8 other language starter kits.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:51:09 -04:00
jedarden
8e7a77dc70 Notes for bf-ns9q: C# starter kit registration verified
Re-verified that all required components are in place:
- CI workflow exists at starters/csharp/.github/workflows/build.yml
- Plan §5.8 includes acb-starter-csharp at line 986
- Plan §11.2 includes acb-starter-csharp at line 2629
- Directory listing includes csharp/ at line 2565

The task was originally completed in commits 55c594c and 9d4a311.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:46:47 -04:00
jedarden
f693afd562 Notes for bf-2xah: Bot registration endpoint already wired to matchmaking
The POST /api/register endpoint sets status='active' for newly registered
bots, and the matchmaker queries for all active bots. Integration is complete;
no code changes required.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:43:58 -04:00
jedarden
03ec821e48 Update predispatch sha 2026-05-22 15:40:21 -04:00
jedarden
10d2957cb7 Notes for bf-3z08: JavaScript starter kit registration already completed
Verified that commit 7e8c9d7 completed all registration requirements:
- Added to §5.8 Starter Kit table
- Added to file structure section
- Added to published template repos table
- CI workflow already exists

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:38:32 -04:00
jedarden
9d4a31125e Plan: Add csharp/ to starters directory listing
Complete the file structure section by including csharp/ alongside the other 7 starter kits. The C# starter kit is already fully documented in §5.8 and §11.2 tables.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:33:21 -04:00
jedarden
27466465ae Notes for bf-ns9q: C# starter kit registration already completed
The bead task indicated missing CI workflow and plan §5.8 coverage,
but verification found all components already in place from commit 55c594c.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:30:44 -04:00
jedarden
55c594c019 Plan: Add C# starter kit to §5.8 and §11.2 documentation
- Add acb-starter-csharp to §5.8 starter kit table
- Add acb-starter-csharp to §11.2 template repos table
- Update evolution validation test suite language list

The C# starter kit exists at starters/csharp/ with full implementation
including ASP.NET Core minimal API, HMAC auth, grid utilities, tests,
Dockerfile, and CI workflow. It was simply missing from plan documentation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:27:12 -04:00
jedarden
c9a9323c4c Notes for bf-3z08: JavaScript starter kit registration completed
The JavaScript starter kit was officially registered via commit 7e8c9d7,
which added it to plan §5.8, the file structure section, and the published
template repos table. This notes file documents the completion status.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:24:10 -04:00
jedarden
7e8c9d7e6f Plan: Add JavaScript starter kit to §5.8 and related sections
- Add `acb-starter-javascript` to §5.8 Starter Kit table
- Add javascript/ to file structure section
- Add `acb-starter-javascript` to published template repos table

The JavaScript starter already exists in starters/javascript/ with:
- Dockerfile, CI workflow, README, package.json
- Node.js built-in http module, zero dependencies

This registers it as an official starter kit alongside the other 6 languages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:21:05 -04:00
jedarden
d3d655b9c9 Evolver: Fix nsjail integration for complete sandbox coverage
- Add /opt to nsjail bindmounts so Rust toolchain (/opt/rust) is accessible
  during sandboxed validation of Rust bots
- Explicitly enable Alpine community repository in Dockerfile to ensure
  nsjail package can be installed (nsjail lives in community, not main)
- nsjail integration was already optional (falls back to plain exec if
  unavailable), but these changes ensure it actually works when enabled

This addresses bead bf-3f29: nsjail was listed in apk add but /opt wasn't
bindmounted, causing Rust validation to fail when UseNsjail=true.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:18:21 -04:00
jedarden
7137623f6a Evolver: Add nsjail and missing language runtimes (Rust, Java) to container
The evolver's validation pipeline supports Rust and Java bots, but the
container image was missing rustc and javac runtimes. Additionally, nsjail
was documented as part of the sandbox stage but not installed.

Changes:
- Add nsjail package (from Alpine community repo) for sandbox isolation
- Add openjdk-17-jdk for Java bot validation
- Install Rust toolchain (rustc) via rustup to /opt/rust for shared access
- Set PATH to include Rust binaries for the acb user

The validator already had graceful fallback when nsjail wasn't found in PATH,
but with nsjail installed, the sandbox stage now provides proper CPU/memory
resource limits during smoke testing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:16:23 -04:00
jedarden
5fabf5a672 Verification: Directed attack arrows from killers[] in combat_death events (bf-3jyd)
Verified complete implementation of §16.9 directed attack arrows feature:
- Engine emits combat_death events with killers array (bot_id, owner, position)
- TypeScript types properly define CombatDeathKiller and CombatDeathDetails
- Viewer draws solid arrows from each killer to victim with attacker player color
- Arrowheads point to victim tile center
- Backward compatibility maintained for old replays (proximity-inference fallback)
- Red explosion flash and X marker for death visualization

Related commits: 8e0aa5e (engine), 323c1e8 (viewer)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:13:26 -04:00
jedarden
359a5450ab Update predispatch sha 2026-05-22 15:10:55 -04:00
jedarden
bd7617772a Notes for bf-3krf: K8s deployments and ExternalSecrets for extended bot fleet
Documenting that this work was completed in commit 1c8f0ae.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:01:44 -04:00
jedarden
b3f6dcba49 Verification: Directed attack arrows from killers[] in combat_death events (bf-3jyd)
Verified that the feature implemented in commits 8e0aa5e (engine) and 323c1e8 (viewer) is complete and working:

Engine (engine/turn.go):
- executeCombat emits EventCombatDeath with killers[] array
- Each killer entry includes bot_id, owner, and position

Viewer (web/src/replay-viewer.ts):
- drawCombatEffects() handles combat_death events with killers[]
- Draws solid colored arrows from each killer to the victim
- Includes red explosion flash and X marker for death
- Maintains backward compatibility with old replays (proximity-inference fallback)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 15:00:16 -04:00
jedarden
1c8f0aea72 K8s deployments and ExternalSecrets for extended bot fleet
Add Deployment, ExternalSecret, and Service manifests for 10 new strategy bots:
- scout (Python)
- assassin (Rust)
- defender (C#)
- farmer (Go)
- kamikaze (Node)
- nomad (Python)
- opportunist (Go)
- pacifist (Node)
- phalanx (Rust)
- raider (Java)

Each bot includes:
- Deployment with ArgoCD Image Updater annotations
- ExternalSecret for OpenBao shared-secret
- ClusterIP service (bot-<name>.acb-bots.svc.cluster.local)

Resource allocations tailored per language (JVM/C#/Rust = higher, Go/Python/Node = lower)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 14:58:41 -04:00
jedarden
0079812c56 Verification notes for bf-3jyd: Directed attack arrows from killers[] in combat_death events
The feature was already fully implemented in commits 8e0aa5e and 323c1e8.
This commit documents the verification of that implementation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 14:53:27 -04:00
jedarden
323c1e8241 Viewer: directed attack arrows from killers[] in combat_death events (§16.9)
- Updated CombatDeathDetails type to include killers[] array with each killer's bot_id, owner, and position
- Modified drawCombatEffects() to handle combat_death events by drawing solid arrows from each killer to the victim
- Added drawArrow() helper method to draw arrows with arrowheads
- Maintained backward compatibility: old replays without combat_death events use proximity-inference lines

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 14:51:32 -04:00
jedarden
8e0aa5e1be Emit combat_death events with killers array in executeCombat
Modified executeCombat to emit EventCombatDeath events with a killers
array containing all enemy bots within attack radius of the killed bot.

Each killer entry includes bot_id, owner, and position, matching the
replay schema specification.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 14:48:19 -04:00
jedarden
cdb17ca8ca Spawn bots at all cores, increase default CoresPerPlayer to 2
Each player now starts with 2 cores and a bot at each, placing forces
mid-map from turn 1 and creating earlier conflict.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 23:38:22 -04:00
jedarden
676cd8bc64 Bug fix bf-1unj: Fix match card participant names cut off on mobile
- Add display: flex and align-items: center to .participant on mobile
- Change .participant-name from flex-shrink: 1 to flex: 1 for proper space allocation
- Add margin-left spacing to .participant-score and .winner-badge
- Ensures all participant info (name, score, winner badge) is visible on mobile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 18:34:19 -04:00
jedarden
3a5244fbae Bug fix bf-1unj: Fix match card participant names cut off on mobile
- Change .match-participants to column layout on mobile for better width distribution
- Allow .participant elements to shrink (flex-shrink: 1)
- Remove max-width constraint from .participant-name
- Ensures participant names, scores, and Winner badge are all visible

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 18:33:08 -04:00
jedarden
7d38196302 Bug fix bf-5mkq: Document enrichment pipeline investigation
Investigated why all matches have enriched: false. Root cause is
corrupted R2 credentials in OpenBao that prevent the acb-enrichment
service from uploading AI commentary.

Key findings:
- R2 credentials at secret/rs-manager/ai-code-battle/r2 are corrupted
- endpoint/secret-key values are swapped
- Enrichment service cannot upload to R2
- Fix script exists but requires cluster access

Blocker: Expired kubeconfig (bf-5nap) prevents cluster access
and execution of the fix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 18:31:39 -04:00
jedarden
60531c66f2 Bug fix bf-2vkw: Fix replay viewer blank when navigating to /watch/replay/:id directly
When navigating to /watch/replay/:id (e.g., from the "Closest Match" link in rivalries), params.url was undefined, causing the viewer to show "Enter a replay URL to load" message. Fixed by constructing the URL from params.id when params.url is not set, using the pattern /r2/replays/MATCHID.json.gz.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 18:26:33 -04:00
jedarden
bb3c6d8d64 Bug fix bf-3dy1: Add R2 credentials to worker deployment for direct replay upload
The worker was only configured with B2 (ARMOR) credentials, so replays were
being uploaded to B2 but not to R2. The index builder's B2→R2 promotion
cycle only covers the last 24 hours, so older replays were not available
in R2, causing 404 errors when clicking "Watch Replay".

This fix adds R2 credentials to the worker deployment, allowing it to
upload replays directly to R2 (hot cache) in addition to B2 (cold archive).
This makes replays immediately available for viewing without waiting for
the promotion cycle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 18:25:04 -04:00
jedarden
2bd3448807 Bead bf-3mx7: Document winner badge fix completion
The bug fix was already applied in commit 9bcbd56. Updated notes to reflect:
- Fix is already in the codebase (using p.Won instead of p.BotID == m.WinnerID)
- Index builder will automatically regenerate static JSON on next 15m cycle
- No manual intervention required - production deployment will pick up the fix automatically

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 18:22:41 -04:00
jedarden
b9224517b4 Bead bf-3mx7: Document index builder requirement
The code fix for the winner badge bug has been applied. The index
builder needs to be run in an environment with Go installed to
regenerate static JSON files with correct winner badges.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 18:22:41 -04:00
jedarden
770d704bc1 Bead bf-3mx7: Document winner badge fix completion
The code fix was already applied in commit 6fe778b. This commit
adds documentation noting that the index builder needs to be run
to regenerate static JSON with correct winner badges.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 17:59:02 -04:00
jedarden
9bcbd566b6 Bug fix bf-3mx7: Fix match index winner badge - use p.Won instead of comparing BotID with WinnerID
The WinnerID field is a player-slot integer as string (e.g. "2"), not a bot_id.
The SQL query already computes the correct winner status in p.Won field.

Fixed in 3 functions:
- matchToSummary: Changed Won: p.BotID == m.WinnerID to Won: p.Won
- buildPlaylistMatch: Changed Won: p.BotID == m.WinnerID to Won: p.Won
- ratingUpsetMagnitude: Use p.Won to identify winner instead of comparing with m.WinnerID
- maxScoreDiff: Use p.Won to identify winner instead of comparing with m.WinnerID
- isEvolutionBreakthrough: Find winner using p.Won before checking if evolved

This fixes the issue where 984/1000 prod matches had winner_id set but all participants showed won: false.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 17:59:02 -04:00
jedarden
af52f05594 Bug fix bf-5nap: Document match creation outage investigation
Matches stopped being created after 2026-05-09. The iad-acb kubeconfig on
ex44 has expired credentials, preventing cluster access for diagnosis.

Created comprehensive diagnostic documentation covering:
- Cluster architecture and components (matchmaker, workers)
- Step-by-step diagnostic procedures for kubectl access
- Pod status checks and log analysis commands
- Database verification queries
- Service restart procedures
- Known issues from prior incidents (R2 credentials corruption)

Next steps:
1. Renew iad-acb token from Rackspace Spot UI
2. Update kubeconfig on ex44
3. Execute diagnostic commands to identify root cause
4. Restart services as needed
5. Verify match creation resumes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 17:52:47 -04:00
jedarden
b27272de5a Phase 10: Fix narrative engine tests to match exact specs
- Fix TestBuildNarrativePrompt_Comeback to check for current ELO
  instead of old rating (comeback arc shows bottom 25%→top 25%)
- Fix TestDetectRivalryArcs to use 10+ matches (grudge match spec)
  instead of only 5 matches

Story arc detection (per §3.7 chronicles):
✓ Comeback bots: recovered from bottom 25% to top 25%
✓ Grudge matches: same pair meets 10+ times
✓ Underdog victories: bottom-10 beats top-10

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 15:10:42 -04:00
jedarden
0e6a4977b6 Phase 10: §3.7 chronicles - Update story arc detection to exact specs
- detectComebackArcs: Now detects bottom 25% → top 25% climb (was peak→trough→recovery)
- detectRivalryArcs: Now detects 10+ total meetings grudge matches (was 5+ recent matches)
- detectUpsetArcs: Now detects bottom-10 beats top-10 (was biggest ELO gap)
- Updated narrative prompts to reflect new comeback arc specification
- Updated weekly chronicles prompt for comeback arcs

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 15:07:23 -04:00
jedarden
bc857d10bc Phase 10: Fix API documentation routing and add schema download link
- Fix /docs/api route to go directly to API docs page instead of redirecting
- Fix docs.ts link to point to /compete/docs/api instead of itself
- Add download button for replay-schema-v1.json in API docs
- Reorder router routes to ensure /docs/api is matched before /docs

The API documentation at /docs/api now correctly shows the OpenAPI-style
endpoint documentation for all static JSON file paths on Pages, R2, and B2,
including the versioned replay format specification.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 15:02:25 -04:00
jedarden
c5557016cd Phase 10: Accessibility suite - keyboard shortcuts overlay
Added comprehensive keyboard shortcuts overlay modal and missing shortcuts
for the replay viewer:

- New keyboard shortcuts overlay (activated by ? or / key) showing all
  available shortcuts in an accessible modal dialog
- Added missing shortcuts: V (cycle view mode), E (toggle event timeline),
  C (toggle commentary), Shift+arrows (jump 10 turns)
- Updated visible shortcuts list in sidebar to include all shortcuts
- Modal is fully accessible with ARIA roles, keyboard navigation, and
  respects prefers-reduced-motion
- All shortcuts are WCAG 2.1 Level AA compliant

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 14:57:27 -04:00
jedarden
a4bdeba8fd Phase 10: Live evolution observatory - evolver live.json feed + observatory page
Evolver writes live.json to R2 every cycle. Observatory page polls and
renders live feed + lineage tree + meta shift chart.

- Added ACB_R2_UPLOAD_ENABLED env var to enable automatic R2 upload during run loop
- CycleState tracks real-time evolution cycle status (generation, phase, candidate, validation, evaluation)
- Export() now includes cycle info when cycleState is provided
- runCycle() integrated with live observatory exports at each phase transition
- exportLiveQuiet() for mid-cycle status updates without verbose logging
- Fixed function signature mismatches for exportLiveQuiet calls

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 14:52:17 -04:00
jedarden
b15fa4d970 phase-10: verify weekly meta report blog implementation
Phase 10 deliverables verified complete:
- Weekly meta report generation (blog.go)
  - Template-based reports with ELO movers, dominant strategies
  - LLM-enhanced narrative sections (spotlight, evolution deep dive, looking ahead)
- Story arc detection and chronicle generation (narrative.go)
  - Rise, fall, rivalry, upset, evolution milestone, comeback arcs
  - Sports-journalism style LLM prompts with §13.2 critical moments
- Weekly chronicles file (chronicles-YYYY-WW.json)
- Web frontend blog pages (blog.ts)
  - Blog listing with filters (all, meta-report, chronicle)
  - Individual post rendering with markdown support
  - Tag cloud and responsive layout

All tests passing, web build successful.
2026-05-08 14:33:45 -04:00
jedarden
0028100c64 Phase 9: Map voting + positional fairness monitoring - verify existing implementation
Verified all Phase 9 deliverables already in place:
- PostgreSQL map_votes table (UNIQUE constraint on map_id, voter_id)
- POST /api/vote-map endpoint (+1/-1 votes, rate-limited)
- GET /api/vote/map/{map_id} endpoint for vote counts
- Positional fairness monitoring: tickFairnessAudit with 5-step lifecycle
  * updateMapFairnessStats: recompute per-slot win rates
  * flagUnfairMaps: probation for >10pp deviation
  * retireDislikedMaps: force-retire at < -20 net votes
  * pruneLowEngagementMaps: monthly bottom 10% pruning
  * promoteClassicMaps: top-5 sustained (3+ months) to classic
- maps/index.json includes NetVotes from aggregation

All tests pass (mapvote, map_fairness, index-builder).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 14:30:46 -04:00
jedarden
c66dc893fa phase-8: win probability sparkline + critical moments in replay viewer
The win probability sparkline component is now fully integrated:

1. Worker (engine/winprob.go): Monte Carlo rollout computes per-turn win
   probabilities, detectCriticalMoments identifies turns where win prob
   shifts >15% with template-based descriptions.

2. Replay storage (engine/replay.go): win_prob and critical_moments arrays
   stored in replay JSON, written by match worker after each match.

3. Web component (web/src/components/win-prob.ts): WinProbSparkline class
   renders the graph with critical moment markers (dashed vertical lines),
   click-to-scrub interaction, and current turn indicator.

4. Replay page integration (web/src/pages/replay.ts): initWinProb() sets up
   the sparkline with player colors, legend, prev/next critical moment
   navigation buttons, and keyboard shortcuts ([/]).

The sparkline displays one line per player with area fill gradient,
percentage labels (0%, 50%, 100%), critical moment diamonds with
delta labels, and updates in real-time as the replay plays.
2026-05-08 14:17:26 -04:00
jedarden
199a2ea0fe phase-9: implement match event timeline with computed events
- Client-side event extraction from replay turn data
- Icon ribbon overlaid on replay viewer timeline
- Click-to-jump to event moment
- Computed events: mass death (5+ bots), spawn wave (3+ spawns),
  momentum shift (win prob crosses 50%), critical moment (>15% shift)
- Energy milestone detection (3+ energy collected)
- Hover tooltips with event descriptions
- Updated icons matching plan §14.8 specification

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 11:39:04 -04:00
jedarden
b93ea06d4c phase-9: implement bot profile cards with Canvas-rendered PNG and OG tags
Per §14.10 of the plan, implemented shareable bot profile cards:
- Canvas-rendered PNG cards (800x450) with bot stats and branding
- Open Graph tags for social sharing (og:image points to /r2/cards/{bot_id}.png)
- "Share Card" button on bot profile page downloads the card as PNG
- Card displays: name, rating, rank badge, owner, archetype, win rate, stats
- Evolved badge, signature move, and recent rival info
- Responsive styles for desktop and mobile

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 11:30:07 -04:00