refactor(engine): ambiguity burn-down batch 3 — board paint chain (171 → 47) #148

Merged
funman300 merged 1 commits from refactor/ambiguity-board-visuals into master 2026-07-07 03:57:21 +00:00
Owner

Batch 3 of #143, the big cluster: 112 Sprite/Transform pairs → deterministic paint pipeline.

  • BoardVisuals — every board painter (cards, markers, shadows, highlights, badges, labels) runs as one chain in data-flow order, after LayoutSystem::UpdateOnResize and GameMutation; table-plugin marker painters chain after it. Paint order is now frame-invariant.
  • UiTextFx — chrome text effects declared ambiguous_with(BoardVisuals) and each other: disjoint entity domains by construction.

Baseline ratchets 171 → 47 (from 302 this morning). Gates: ratchet green, clippy --all-targets -D warnings clean, full workspace suite green (the ~300 headless behaviour tests exercise the reordered painters directly).

Refs #143

🤖 Generated with Claude Code

Batch 3 of #143, the big cluster: **112 Sprite/Transform pairs → deterministic paint pipeline.** - **`BoardVisuals`** — every board painter (cards, markers, shadows, highlights, badges, labels) runs as one chain in data-flow order, after `LayoutSystem::UpdateOnResize` and `GameMutation`; table-plugin marker painters chain after it. Paint order is now frame-invariant. - **`UiTextFx`** — chrome text effects declared `ambiguous_with(BoardVisuals)` and each other: disjoint entity domains by construction. Baseline ratchets **171 → 47** (from 302 this morning). Gates: ratchet green, clippy `--all-targets -D warnings` clean, full workspace suite green (the ~300 headless behaviour tests exercise the reordered painters directly). Refs #143 🤖 Generated with [Claude Code](https://claude.com/claude-code)
funman300 added 1 commit 2026-07-07 03:57:20 +00:00
The Sprite/Transform cluster (112 pairs) was every board painter
racing every other one. Two structural moves:

- BoardVisuals set (card_plugin): all card/marker painters run as ONE
  deterministic chain in data-flow order — layout refinement → card
  authority (sync_cards_on_change) → flip anims → shadows → highlights
  → stock indicators → resize snapping → corner labels — with
  LayoutSystem::UpdateOnResize ordered before the whole set and the
  table plugin's marker painters chained after it. Paint order is now
  identical every frame instead of scheduler-dependent.

- UiTextFx set (ui_theme): chrome text effects (score pulse/floater,
  streak flourish, modal enter, focus-ring pulse) animate Transform on
  UI entities only; they are declared ambiguous with BoardVisuals and
  with each other — the entity domains are disjoint by construction.

All chain members are cheap and change-gated; sequential execution is
not a measurable cost for a card game. Existing ordering constraints
(fan-frac before sync, shadows after sync, snap after collect) are
preserved inside the chain.

Baseline ratchets 171 → 47. Remaining: long tail of small subjects
(input, event writers, AutoCompleteState, HudVisibility).

Refs #143

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
funman300 merged commit be478acde7 into master 2026-07-07 03:57:21 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#148