docs: update CLAUDE.md with current state and bug history

This commit is contained in:
2026-08-17 22:47:06 -03:00
parent 351f9e12db
commit 2ba5995534
+24
View File
@@ -50,3 +50,27 @@ See `docs/COLLABORATIVE-DESIGN-PRINCIPLE.md` for full protocol and examples.
## Context Management
@.claude/docs/context-management.md
## Current State (Aug 2026)
### Critical Bugs Fixed
- **StackOverflow** — `CheckDetector.IsInCheck` called `GetAvailableMoves()` on enemy King, which called `GameManager.IsInCheck()` → infinite recursion. Fixed: use `GetAttackSquares()`.
- **Empty board** — `BoardManager.SetupBoard` returned early when CampaignState had no identities. Fixed: fallback to `PlacePieces()`.
- **State stuck in Dialogue** — CampaignManager transitioned to Dialogue before `StartDialogue` returned true. Fixed: only transition on success.
- **DimBG blocking input** — Full-screen overlay with `m_RaycastTarget:1` blocked all clicks. Fixed: deactivated in `PromotionUI.Awake()`.
- **PauseMenuController** — Used non-existent "Pause" input button. Fixed: use `KeyCode.Escape` only.
- **SceneTransitionManager** — Used `Time.deltaTime` with `timeScale=0`. Fixed: `Time.unscaledDeltaTime` + `WaitForSecondsRealtime`.
### Architecture
- **Purgatory mode** (`Mono/`) is main/production codebase
- **Classic mode** (`Mono/Classic/`) is separate simpler mode
- **Board tile size**: 10.24 units, Camera ortho size 45
- **Campaign flow**: MainMenu → CampaignManager.StartCampaign() → Chapter1 scene → SetupBoard → TransitionToChapterIntro → dialogue → TransitionToPlaying
### Git History
- `351f9e1` — fix: StackOverflow in King.GetAvailableMoves → IsInCheck recursion
- `801de79` — fix: empty board + state stuck in Dialogue
- `c5915c2` — fix: DimBG, PauseMenu, SceneTransition
- `0725372` — fix: CampaignManager race condition, DialogueUI null safety
- `bf3bec3` — fix: compilation errors (stale csproj, InputSystem, Assembly)
- `b539aa4` — Initial commit (568 files, 41786 insertions)