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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent epic: #287
Problem statement
lobby/views.pycurrently mixes endpoint handling with construction of the canonicalphase_view_model. That makes contract work slower, tests noisier, and future extraction intofupogfaktaharder.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
phase_view_modelbuilder into a dedicated helper/module with focused tests.lobby/views.py.Scope boundary