Files
aetherbound-guild/docs/plans/M35_BATTLE_RESULT_PAGE_VIEW_REFACTOR.md
T

5.4 KiB
Raw Blame History

M35 Battle Result Page View Refactor

Status

  • Plan: M35_BATTLE_RESULT_PAGE_VIEW_REFACTOR
  • Status: COMPLETE
  • Activated: 2026-08-25
  • Baseline: 4875ea4 (M34_KNOCKOUT_REVIEW_PAGE_VIEW_REFACTOR_COMPLETE)
  • Owner authorization: the Owner asked to continue splitting page Views after the M34 Knockout Review pilot. This plan is the next bounded extraction in the ordered M34 handoff map.

Objective

Extract the OUT-001 Battle Result page from entry_shell.gd into a passive, UI-only ABGBattleResultPageView while preserving the M27-accepted settled result, causal-chain and decisive-event presentation, Coin/XP totals, Knockout summary, diagnosis toggle, Continue target, focus order, touch surfaces, localization and normal 100% visual output.

This is a structural View migration, not a battle, settlement, reward, economy, Save or visual redesign.

Target boundary

EntryShell / composition root
  -> BattleResultPageController.snapshot()
  -> presentation-ready ViewData
  -> ABGBattleResultPageView.render(ViewData)
  -> explicit diagnosis / continue intents
  -> EntryShell application command boundary
  -> toggle_battle_result_diagnosis() / continue_from_battle_result()

Ownership rules

  1. ABGBattleResultPageView owns only Godot nodes, layout, focus, local localization/formatting and intent emission.
  2. The View does not import or call BattleService, Save, the compatibility facade, RuntimeContentRegistry, current_screen or EntryShell globals.
  3. ABGBattleResultPageController remains the authority for copied settled result, decisive event, causal chain, Knockout identities, economy facts, diagnosis state and continuation eligibility.
  4. EntryShell remains the composition root and translates only explicit diagnosis and continue intents through deferred connections.
  5. Battle settlement, receipts, Knockout/Reward/Recovery continuation and Save semantics remain unchanged.

Player-visible stopping point

  • The player sees the same Result frame, outcome, objective, decisive event, Coin/XP totals, Knockout summary, causal chain, optional diagnosis detail and footer controls as the M27-accepted page.
  • Cause Details toggles the existing diagnosis state without changing any settlement facts.
  • Continue follows the existing controller target: Knockout Review, Reward Choice or Recovery.
  • A controller-invalid snapshot renders the existing invalid-state message.

Ordered steps

M35-A — Architecture contract and inventory (COMPLETE)

  • Freeze the OUT-001 stopping point, dependency direction and forbidden imports before product code changes.
  • Inventory the current Result composition, UI-only formatting helpers, diagnosis/Continue command boundary and exact node names.
  • Record the M27 normal-capture equivalence target.
  • Commit and push this activation boundary before Runtime product changes.

M35-B — Passive View extraction (COMPLETE)

  • Add ABGBattleResultPageView under runtime/entry/views/.
  • Reuse ABGPageView and ABGPageContext from M32–M34.
  • Preserve exact Result node names and normal 100% layout.
  • Mount the View from EntryShell and translate only diagnosis and continue intents.
  • Keep controller, BattleService, receipt and continuation semantics unchanged.
  • Complete at source 7ba4326.

M35-C — Focused verification (COMPLETE)

  • Add ABG_M35_BATTLE_RESULT_VIEW_CONTRACT_OK.
  • Run the focused Result controller/View and M12/M27/M28/M29/M30 route regressions.
  • Run the DEV-5 candidate and full MVP first-cycle audit through the owned test-attempt runner with strict diagnostics and exact-once markers.
  • Compare normal Result captures with the M27 baseline at the four required fixtures/locales.
  • Complete at source 7ba4326; evidence is recorded in docs/runtime/M35_BATTLE_RESULT_PAGE_VIEW_VISUAL_AUDIT.md.

M35-D — Handoff (COMPLETE)

  • Record source-bound evidence and visual equivalence in a runtime audit.
  • Close only Battle Result; do not claim Knockout, Reward, Recovery, Risk, Market or live Battle Views are migrated by this plan.
  • Leave the next extraction as a separately activated plan.
  • Complete at source 4a2bb82; the final durable status closure is recorded in the subsequent docs-only closure commit.

Frozen scope

  • No battle/result/reward/recovery/economy/Save semantic changes.
  • No visual redesign, asset generation, localization rewrite or 130% scope.
  • No mass rewrite of entry_shell.gd.
  • No deletion of compatibility/history files, .uid, .import or prototype_incremental/.
  • No packaging, iOS export, signing, deployment, store or release work.

Acceptance checks

  • ABG_M35_BATTLE_RESULT_VIEW_CONTRACT_OK exactly once.
  • Existing ABG_M27_BATTLE_RESULT_CONTROLLER_OK, M12/DEV-5 candidate and ABG_MVP_FIRST_CYCLE_AUDIT_OK remain green.
  • Extracted View has no forbidden service/content/route imports and emits only diagnosis/continue intents.
  • Battle Result normal 100% captures remain visually equivalent to the M27 baseline at required fixtures and locales.
  • Focused source is committed, pushed and tracked files are clean.

Commit boundaries

  • M35-A: plan/checkpoint activation.
  • M35-B: View and EntryShell integration.
  • M35-C: focused verification/evidence.
  • M35-D: handoff/closure.

Final handoff

ABG M35 BATTLE RESULT VIEW PILOT COMPLETE

M35 is closed. No M36 plan is active; the next extraction requires a new Owner-authorized durable plan.