- Add POST /api/sim/run-n-player endpoint accepting 2-4 deck IDs for
N-player batch simulations using the existing engine.run_n() method
- Add _run_sim_thread_n_player tracking per-seat wins and stats
- Create SimulatorPage.tsx with 4 deck selection slots, config row,
progress bar, results table, CSS bar chart, and per-game logs
- Add simulator types in frontend/src/types/simulator.ts
- Add /simulator route and nav bar to App.tsx
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. /api/lab/status: StatusResponse now includes run_id, games_completed,
total_games, current_decks aliases so the React SPA gets the field
names it expects.
2. /api/lab/decks returns {decks: [...]}, /api/lab/history returns
{results: [...]}, /api/lab/precons returns {precons: [...]} — but
the frontend expected bare arrays. Updated lab.ts API client to
unwrap these wrapper objects automatically.
Removed unused imports in DecksPage, TrainingPage, and decks.ts
that caused noUnusedLocals/noUnusedParameters errors during
the React build step in the installer.
Backend:
- POST /api/coach/chat: Multi-turn coaching chat with SSE streaming
- POST /api/coach/apply: Apply suggestions to deck (cut/add cards)
- GET /api/coach/cards-like: Embedding similarity search with ownership/price
- GET /api/coach/decks: Enhanced to show all decks with report status
- Goals config (power level, strategy, budget, focus areas) wired to prompts
- Session history with full diff tracking (cuts/adds/hints)
Frontend (complete CoachPage rewrite):
- Live multi-turn chat with streaming LLM responses
- Apply suggestions UI: checkbox cuts/adds, one-click apply to deck
- Goals config panel (power level slider, strategy chips, budget, focus areas)
- Session results view with summary, tips, mana advice, cuts, adds
- Session history browser with session drill-down
- Cards Like This search (embedding-powered card discovery)
- Price-aware card suggestions with collection ownership badges
- Responsive dark theme, tab navigation
- Fixed all ML types to match actual backend response shapes:
MLStatus (logging state + decision files), MLDataStatus (datasets,
checkpoints, eval results), MLTrainStatus (phases, metrics, result),
PPOTrainStatus (metrics with win_rate/reward/losses), TournamentStatus
- Updated training API client with full parameter support for all endpoints
- Rewrote TrainingPage with 5 clear pipeline phases:
Phase 1: Data Collection (toggle logging, view decision files)
Phase 2: Dataset & Model Artifacts (splits, checkpoints, eval, model info)
Phase 3: Supervised Training (epochs/lr/batch/patience, live progress,
phase badges, real-time metrics, final eval results)
Phase 4: PPO Reinforcement Learning (full config: iterations, episodes,
clip epsilon, entropy coeff, opponent selection, live win rate)
Phase 5: Tournament Evaluation (episodes, playstyle, leaderboard table)
- All sections are collapsible with live phase badges and progress bars
- Advanced config toggles for supervised and PPO training
- Proper mutex: can't start PPO while supervised is running, etc.
- Auto-refresh model info and data status when training completes
- Redesigned Recommendations tab with EDHREC / From Collection sub-tabs
- EDHREC sub-tab: fetches average deck data, groups by role, shows owned/missing status
- Collection sub-tab: shows cards from collection grouped by type, shortfall indicators
- Both sub-tabs support: checkbox selection, bulk add to deck, single add buttons
- Role badges with color-coding (Ramp, Draw, Removal, BoardWipe, etc.)
- Card hover preview for EDHREC recommendations
- Show only owned filter for EDHREC results
- Fixed API client types: EdhRecsResponse, CollectionRecsResponse wrappers
- Added EdhRecCard and CollectionRecCard interfaces