KoalaTrapLord
2c67222de1
fix(lobby): wire OnConfirm to POST /api/game/start, save game_id to PlayerPrefs
...
- OnConfirm() now calls ApiClient.PostGameStart() with 4-seat config
- On success: saves BattleSeats + GameId + WsUrl to PlayerPrefs,
loads Battleground scene
- On failure: shows inline error label (red), re-enables Confirm button
- Added StartGameRequest/Response POCOs matching routes/game.py schema
- Added _errorLabel [SerializeField] for user-facing error feedback
2026-03-29 05:22:04 -04:00
KoalaTrapLord
d8238ec11f
feat(game): add routes/game.py + wire lab_api + fix GameWebSocketClient game_id URL
...
- routes/game.py: POST /api/game/start, POST /api/game/action (new)
- lab_api.py: import + register game_router
- GameWebSocketClient.cs: read game_id from PlayerPrefs, build
ws://{host}/ws/game/{game_id} — fixes URL mismatch with ws_game.py
2026-03-29 05:17:48 -04:00
KoalaTrapLord
7aed64a660
fix: add PostGameAction to ApiClient + update TODO.md all issues complete
...
- ApiClient.cs: add PostGameAction() wrapper → POST /api/game/action
(fixes compile error in HumanActionBar.cs)
- TODO.md: mark issues #145 , #146 , #147 , #149 , #150 , #151 as ✅
all 14 battleground issues now committed
2026-03-29 05:09:51 -04:00
KoalaTrapLord
e3497a8f74
feat( #149 ): add GameWebSocketClient with reconnect, ping, and main-thread dispatch
2026-03-28 20:05:35 -04:00
KoalaTrapLord
6a655628c8
feat( #151 ): add Play Live button to SimulationController
2026-03-28 20:04:42 -04:00
KoalaTrapLord
e3d4eb5785
feat( #147 #150 #151 ): add LobbySetupModal, ZoneViewerModal, EliminationHandler; add Play Live button to SimulationController
2026-03-28 20:03:43 -04:00
KoalaTrapLord
abee551ab4
feat( #146 ): add StackZoneController, StackItemView, and ManaPoolDisplay
2026-03-28 20:02:23 -04:00
KoalaTrapLord
9fdb6d29fb
chore: mark issues 1-8 as complete in task tracker
2026-03-28 19:58:00 -04:00
KoalaTrapLord
2c8c6c26bd
feat( #144 ): add TokenModel POCO, TokenPanelController, and TokenRowView
2026-03-28 19:57:00 -04:00
KoalaTrapLord
9ffefd463c
feat( #143 ): add CommanderZoneWidget with art crop, cast counter, and tax display
2026-03-28 19:56:24 -04:00
KoalaTrapLord
4c99957e76
feat( #142 ): add CardZone and CardView battlefield zone components
2026-03-28 19:56:09 -04:00
KoalaTrapLord
e5e25a7553
feat( #141 ): add TurnOrderBar and TurnOrderPill
2026-03-28 19:55:40 -04:00
KoalaTrapLord
8d56feee80
feat( #140 ): add PhaseTrackerWidget and PhaseStepButton
2026-03-28 19:55:17 -04:00
KoalaTrapLord
837bb3d6f9
feat( #139 ): add LifeTrackerWidget, CommanderDamageRow, PoisonCounter
2026-03-28 19:54:56 -04:00
KoalaTrapLord
98b81ceab2
feat( #138 ): add BattlegroundController scene orchestrator
2026-03-28 19:54:24 -04:00
KoalaTrapLord
fae04a9336
feat( #148 ): add GameStateManager singleton and GameState/SeatState POCOs
2026-03-28 19:54:01 -04:00
KoalaTrapLord
8fd155a925
feat( #143 ): add LoadArtCrop and LoadCardRaw (RawImage) to ImageCache
2026-03-28 19:53:25 -04:00
KoalaTrapLord
34ce9bfbf7
feat( #142 ): add [NonSerialized] battleground runtime state to CardModel
2026-03-28 19:53:09 -04:00
KoalaTrapLord
07010a71ed
chore: add battleground UI task tracker (2026-03-28)
2026-03-28 19:50:06 -04:00
KoalaTrapLord
ac536999eb
Update lab_api.pyfeat: wire validate_forge_config into lifespan startup
2026-03-28 14:48:43 -04:00
KoalaTrapLord
2e43511d87
feat: add validate_forge_config() startup check
...
Validates FORGE_DIR at startup with clear warning if cardsfolder not found.
Checks both forge-gui/res/cardsfolder and res/cardsfolder layouts.
2026-03-28 14:34:50 -04:00
KoalaTrapLord
1bebe38e66
fix: forge_card_loader path resolution + reset_forge_cache helper
...
- _get_cards_folder() now tries both forge-gui/res/cardsfolder and res/cardsfolder
so FORGE_DIR can point to either the repo root or the forge-gui subdirectory
- Add reset_forge_cache() to allow hot-reloading without server restart
2026-03-28 14:31:42 -04:00
KoalaTrapLord
eca1653024
fix: backfill basic lands on card_entries to guarantee 99 cards
...
The previous backfill operated on seen_names dict which silently
ignored basics already present (dict keys are unique). Now backfills
directly on card_entries list after Scryfall fetch, incrementing
quantity on existing basics or appending new CardEntry objects.
Distributes shortfall evenly across commander color identity basics.
2026-03-28 00:26:42 -04:00
KoalaTrapLord
08f1cb7581
fix(deckgen): backfill basic lands after cross-category dedup to reach 99 cards
2026-03-28 00:10:52 -04:00
KoalaTrapLord
9d9e8675a9
fix: restore missing # on line 27 section banner in rules.py (SyntaxError on import)
2026-03-27 23:36:02 -04:00
KoalaTrapLord
64526b7bee
fix: exclude lands from cmc_buckets in _build_deck_report_from_db (matches deck_service behaviour)
2026-03-27 20:38:49 -04:00
KoalaTrapLord
e9732d292f
fix: expand _land_kw, hoist to module level, guard has_real_data for cmc=0 lands after Forge lookup
2026-03-27 20:36:22 -04:00
KoalaTrapLord
fa5349ea7c
fix: basic land name fallback in _build_deck_report_from_db when type_line is missing from collection join
2026-03-27 20:32:15 -04:00
KoalaTrapLord
1c491bc2b0
fix: add Land role detection to _detect_card_roles (fixes basics showing as Unknown)
2026-03-27 20:28:35 -04:00
KoalaTrapLord
81fe5108d2
fix: coach_apply rollback on partial write, 4-space reindent; ws_game hoist inline imports
2026-03-27 20:24:55 -04:00
KoalaTrapLord
61fa37dc48
fix: lifespan indent error, get_running_loop, remove double rag init, register policy routes
2026-03-27 20:22:42 -04:00
KoalaTrapLord
0118950939
fix: add anthropic_api_key to Config with env-var default (fixes AttributeError in ASGI mode)
2026-03-27 20:20:45 -04:00
KoalaTrapLord
22cf23b24d
fix: correct query_cards kwarg names in coach_service (n= -> n_results=, colors= -> color_identity=)
2026-03-27 20:17:14 -04:00
KoalaTrapLord
0010b0f394
refactor: RAG improvements — shared card_text, Chroma fallback, staleness monitor ( fixes #133 , #134 , #135 ) ( #136 )
...
* refactor: add shared build_card_text() utility
* refactor: unify _build_document via shared card_text + add is_chroma_available/check_staleness (fixes #133 , #134 , #135 )
* refactor: delegate embeddings._build_card_text to shared utility
* feat: add background RAG staleness monitor to lab_api lifespan (fixes #135 )
2026-03-27 16:46:33 -04:00
KoalaTrapLord
d0cdafa66a
feat(rag): Phase 3 — inject RAG cards into coach prompts ( #132 )
...
* feat(rag): add RAG card injection to prompt_template.py
* feat(rag): wire RAG query into coach_service.py
* test(rag): add Phase 3 RAG injection tests
2026-03-27 15:20:49 -04:00
KoalaTrapLord
bcf558418a
fix(rag): squash all RAG/ChromaDB bugs #123–#130
...
Fixes critical API contract mismatch, batch_size wiring, lifespan init, failure tracking, build_meta persistence, mana_cost in embeddings, pyproject.toml deps, and adds full test suite.
Closes #123 , #124 , #125 , #126 , #127 , #128 , #129 , #130
2026-03-27 13:24:41 -04:00
KoalaTrapLord
61ac349445
fix: re-encode requirements.txt as UTF-8 (fixes pip install failure)
2026-03-27 11:14:34 -04:00
KoalaTrapLord
06ce5cc91a
fix(rules): add nonbasic land guard before creature fallback ( fixes #118 ) ( #122 )
2026-03-27 10:22:05 -04:00
KoalaTrapLord
fc2e9d88d5
feat(rag): wire ensure_rag_store into main() startup ( #121 )
2026-03-27 09:13:03 -04:00
KoalaTrapLord
4b0cd34eda
feat(rag): Phase 2 — ChromaDB vector index over bulk card DB ( #120 )
...
* feat(rag): Phase 2 — ChromaDB vector index over bulk card DB
* feat(rag): add routes/rag.py with build, search, status endpoints
* Update lab_api.pyfeat(rag): register rag_router in lab_api.py, remove old inline rag_status
* Update requirements.txtfeat(rag): add chromadb>=0.5.0 to requirements.txtfeat(rag): add chromadb to requirements.txt
2026-03-27 08:39:02 -04:00
KoalaTrapLord
83502ce726
feat: Phase 3/5 deep analysis + Quick Digest endpoint (issue #108 ) ( #119 )
...
* feat(coach): Phase 3/5 JSON schema + QUICK_DIGEST prompt (issue #108 )
- Append removalCoverage, rampQuality, drawEngineProfile, winConditions,
antiSynergyFlags, podPresence, tempoAssessment, metaMatchups to schema
- Add 8 new RULES for Phase 3/5 analysis
- Add QUICK_DIGEST_SYSTEM_PROMPT constant
- Add build_quick_system_prompt() function
* feat(coach): Phase 3/5 JSON parsing + run_quick_digest() (issue #108 )
* feat(routes): add POST /api/coach/decks/{deck_id}/quick endpoint (issue #108 )
* feat(coach): Phase 3/5 parsing + run_quick_digest() (issue #108 )
* feat(coach): Phase 3/5 parsing + run_quick_digest() (issue #108 )
- Import RemovalCoverage, RampQuality, DrawEngineProfile, WinCondition,
AntiSynergyFlag, PodPresence, TempoAssessment, MetaMatchup
- Add Phase 3/5 blocks to _populate_session_from_json()
- Add run_quick_digest() method
* feat(ui): Top Priority card + Quick/Deep buttons in coach.html (issue #108 )
* feat(coach): Phase 3/5 parsing + run_quick_digest() (issue #108 )
* feat(ui): wire Quick Digest button + displayTopPriority() (issue #108 )
2026-03-27 07:51:01 -04:00
KoalaTrapLord
8df5900ff9
feat(rag): Phase 1 — Scryfall bulk offline card database (SQLite FTS5) ( #117 )
...
* feat(rag): add scryfall_bulk.py — offline SQLite FTS5 card database (RAG Phase 1)
* feat(rag): wire ensure_bulk_db() into startup and add /api/rag/status endpoint (RAG Phase 1)
* fix: migrate on_event to lifespan handler, fix /api/rag/status route ordering
2026-03-27 07:16:55 -04:00
KoalaTrapLord
864cefb8d1
feat(coach): Phase 5 - add PodPresence, TempoAssessment, MetaMatchup models + isQuickDigest flag ( #108 )
2026-03-27 04:22:23 -04:00
KoalaTrapLord
6c03e56794
fix( #116 ): dual card_records fallback JOIN, card_type/card_category fields, simulator land detection
...
- deck_service._compute_deck_analysis: add LEFT JOIN card_records with COALESCE on all fields
- deck_service: add _classify_card_category() with oracle-text keyword matching
- deckbuilder.GET /api/decks/{id}/cards: add card_records fallback JOIN + COALESCE, emit card_type/card_category per card
- deepseek._fetch_deck_card_data: add card_records fallback JOIN so lands get correct type_line before enrich_card()
Closes #116
2026-03-27 04:10:17 -04:00
KoalaTrapLord
4b92a5f364
Update models.pyfeat(coach): Phase 3 - add RemovalCoverage, RampQuality, DrawEngineProfile, WinCondition, AntiSynergyFlag models ( #108 )
2026-03-27 04:01:25 -04:00
KoalaTrapLord
da0193eb11
Update coach_service.pyfeat(coach): Phase 2 - parse upgradePriority, commanderDependency, mulliganAnalysis in coach_service ( #108 )feat(coach): Phase 2 - parse new fields in coach_service ( #108 )
2026-03-27 03:45:32 -04:00
KoalaTrapLord
71e0db4985
feat(coach): Phase 2 - add upgradePriority, commanderDependency, mulliganAnalysis to prompt schema ( #108 )
2026-03-27 03:32:03 -04:00
KoalaTrapLord
825946ae75
fix(deckgen): Phase 1 - non-destructive smart substitution + 99-card guarantee ( #111 )
...
- Add SubstitutionMethod enum to track how each card was resolved
- smart_substitute() now always returns a valid card string (never None/drops)
fallback chain: exact -> fuzzy -> functional analog -> original kept -> basic land
- apply_substitutions() loop no longer silently drops cards on failure
- _pad_to_99() circuit breaker added before BuildResult validation
- Pre-validation count logging per category for fast regression diagnosis
- Startup assertion: sum(SLOT_BUDGET) == 99 raises on app boot if misconfigured
- Prompt injection: slot budget + exact card count requirement sent to LLM
- run_substitution() anthropic fallback failure now pads with basic land instead of leaving slot missing
- SubstitutionBatchResult gains padded_slots field (> 0 = circuit breaker fired)
2026-03-27 03:27:52 -04:00
KoalaTrapLord
bd4df0c263
Update models.pyfeat(coach): Phase 2 - add UpgradePriority, CommanderDependency, MulliganAnalysis models ( #108 )
2026-03-27 02:52:01 -04:00
KoalaTrapLord
113b5c63f0
docs: rewrite README to reflect full current feature set ( #115 )
2026-03-27 02:51:12 -04:00