Files
aetherbound-guild/docs/plans/M39_PARTY_LINE_PAGE_VIEW_REFACTOR.md
T
2026-08-26 01:51:19 +08:00

6.9 KiB

M39 Party Line Page View Refactor

Status

  • Plan: M39_PARTY_LINE_PAGE_VIEW_REFACTOR
  • Status: COMPLETE
  • Activated: 2026-08-25
  • Baseline: 0fea312 (M38_RISK_BOARD_PAGE_VIEW_REFACTOR_COMPLETE)
  • Owner authorization: the Owner asked to continue decomposing Entry pages into the layered Passive View + Presenter/ViewData + Domain/Application Service architecture. Party Line is the next bounded preparation-page extraction after Readiness and Risk Board.

Objective

Extract the accepted Party Line page from entry_shell.gd into a passive, UI-only ABGPartyLinePageView while preserving the authored custom 16:9 composition, static master, PartyLineDiagram, cord/effects tracks, four-member line, preview-only selection/swap behavior, Undo/Reset/Save/Back commands, focus order, touch surfaces, localization and normal 100% output.

This is a structural View migration, not a FormationRiskService, formation rule, Save, Readiness, Risk or visual redesign.

Target boundary

EntryShell / composition root
  -> PartyLinePageController.snapshot()
  -> presentation-ready ViewData
  -> ABGPartyLinePageView.render(ViewData)
  -> explicit View intents
  -> EntryShell application command boundary
  -> existing preview/Undo/Reset/Save/Back commands

Ownership rules

  1. ABGPartyLinePageView owns only Godot nodes, normalized layout, diagram/ track presentation, focus and explicit intent emission.
  2. The View does not import or call FormationRiskService, Save, RuntimeContentRegistry, the compatibility facade, current_screen or EntryShell globals.
  3. ABGPartyLinePageController remains the authority for copied Company, Contract, formation, ordered Recruit, relation/coverage/threat, selection and command facts.
  4. EntryShell remains the composition root and translates only explicit select_member, undo, reset, save and back intents through deferred connections.
  5. Preview selection and swaps remain local until the existing Save command; FormationRiskService.save_order remains the only persistence authority.

Player-visible stopping point

  • The player sees the same Party Line parchment/master frame, four-member rear-left/front-right line, formation cord/effects layers, relation and first-threat summaries, orientation semantics and command rail as the M21 accepted page.
  • Selecting one member and then another emits the existing local selection or swap boundary; it never writes Save or receipts.
  • Undo and Reset keep their existing local/service behavior, Save opens the existing Readiness Review page, and Back returns to Guild.
  • Invalid controller data follows the existing formation-error route boundary.

Ordered steps

M39-A — Architecture contract and inventory (COMPLETE)

  • Freeze the Party Line stopping point, dependency direction and forbidden imports before product code changes.
  • Inventory the normalized canvas, static master, PartyLineDiagram, exact PartyLineTrack layer/z-order contract, four member nodes and five command intents.
  • Record the M21 normal-capture equivalence target at 760x360/zh_CN, 844x390/en, 1280x720/zh_CN and 1280x720/en.
  • Commit and push this activation boundary before Runtime product changes.

Closure: source dfddb17 freezes the Party Line normalized canvas, static master, PartyLineDiagram, cord/effects layer contract, four member nodes, five-intent boundary and M21 normal-capture equivalence target.

M39-B — Passive View extraction (COMPLETE)

  • Add runtime/entry/views/party_line_page_view.gd and the focused View contract test.
  • Reuse ABGPageView, ABGPageContext, ABGPartyLineTrack and ABGPartyLineDiagram while preserving the custom 16:9 composition.
  • Mount the View from EntryShell and translate only the five explicit intents.
  • Remove only the Party Line UI builder/helpers from EntryShell; keep FormationRiskService, local preview state, Save/Readiness handoff and route semantics intact.

Closure: source 0d59caa adds ABGPartyLinePageView, mounts it from EntryShell, removes the Party Line master builders/helpers and wires deferred select_member/undo/reset/save/back intents. The focused View contract and DEV-4 Party regression pass with strict diagnostics 0; the fixture-0 Party Line frames are byte-equivalent to the M21 baseline.

M39-C — Focused verification (COMPLETE)

  • Run the View contract, M21 controller, DEV-4 Party/Readiness/Risk, Formation and downstream route regressions through the owned test-attempt runner with strict diagnostics and exact-once markers.
  • Run the DEV-4 candidate and full MVP first-cycle audit.
  • Compare normal Party Line captures with the M21 baseline at all four required fixtures/locales.

Closure: source-bound attempts from source cf14bc8 pass the View, controller and route regressions, DEV-4 candidate and full MVP audit with strict diagnostics 0. Opening and preview-swap Party Line captures are byte-equivalent to the M21 baseline at all four fixtures/locales. Evidence is recorded in docs/runtime/M39_PARTY_LINE_PAGE_VIEW_VISUAL_AUDIT.md.

M39-D — Handoff (COMPLETE)

  • Record source-bound evidence and visual equivalence in docs/runtime/M39_PARTY_LINE_PAGE_VIEW_VISUAL_AUDIT.md.
  • Close only Party Line; Readiness, Risk, Market, Guild and Battle semantics remain outside this plan.
  • Update the checkpoint and development ledger, then push the focused closure.

Closure: the source-bound audit and ordered scope boundary are recorded in docs/runtime/M39_PARTY_LINE_PAGE_VIEW_VISUAL_AUDIT.md. M39 is complete; no later View migration is activated by this plan.

Frozen scope

  • No FormationRiskService, formation rule, Company, Contract, Risk, Battle, Economy, Save or Readiness 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_M39_PARTY_LINE_VIEW_CONTRACT_OK exactly once.
  • Existing ABG_M21_PARTY_LINE_CONTROLLER_OK, ABG_DEV4_PARTY_OK, ABG_DEV4_READY_OK, ABG_DEV4_RISK_OK, DEV-4 candidate and ABG_MVP_FIRST_CYCLE_AUDIT_OK remain green.
  • Extracted View has no forbidden service/content/route imports and emits only the five explicit intents.
  • Party Line normal 100% captures remain visually equivalent to the M21 baseline at all four fixtures/locales.
  • Focused source is committed, pushed and tracked files are clean.

Commit boundaries

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

Each boundary must pass its narrowest focused checks and be pushed before the next step becomes IN_PROGRESS; a failed check keeps the current step active.

Final handoff

ABG M39 PARTY LINE VIEW PILOT COMPLETE