[READY][Gameplay] #287-G Extract canonical phase_view_model builder out of lobby.views hot path #316

Open
opened 2026-03-16 20:28:06 +01:00 by architecture-bot · 0 comments

Parent epic: #287

Problem statement

lobby/views.py currently mixes endpoint handling with construction of the canonical phase_view_model. That makes contract work slower, tests noisier, and future extraction into fupogfakta harder.

Expected value / why now

This is a fast, high-value refactor slice: it should reduce merge friction on the active gameplay path while directly helping both #308 and #311.

Acceptance criteria

  • Extract the canonical phase_view_model builder into a dedicated helper/module with focused tests.
  • Preserve the current API contract and existing gameplay behaviour.
  • Update tests so canonical phase expectations are validated at the helper boundary, not only through full endpoint tests.
  • PR references #287 and states how this reduces coupling in lobby/views.py.

Scope boundary

  • Not the full cartridge migration.
  • Not UI redesign.
  • Not changing game rules.
Parent epic: #287 ## Problem statement `lobby/views.py` currently mixes endpoint handling with construction of the canonical `phase_view_model`. That makes contract work slower, tests noisier, and future extraction into `fupogfakta` harder. ## Expected value / why now This is a fast, high-value refactor slice: it should reduce merge friction on the active gameplay path while directly helping both #308 and #311. ## Acceptance criteria - Extract the canonical `phase_view_model` builder into a dedicated helper/module with focused tests. - Preserve the current API contract and existing gameplay behaviour. - Update tests so canonical phase expectations are validated at the helper boundary, not only through full endpoint tests. - PR references #287 and states how this reduces coupling in `lobby/views.py`. ## Scope boundary - Not the full cartridge migration. - Not UI redesign. - Not changing game rules.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wpp/weirsoe-party-protocol#316