Controller: one named handler per request instead of a 2,000 line function

serve_flow_request was one function of about 2,000 lines with 53 branches.
Its body now lives in FlowRequestServer: the arguments as reference members
under their parameter names and one member function per kind of request
(open_league_table, handle_bank_action, play_matchday, handle_savegame_file,
open_manager_join, ...). serve() asks the handlers in the original order and
keeps the guards between them. The code of every branch moved verbatim; six
lambdas that captured a parameter by name now use an init-capture of the same
object.

This is also the first step towards replacing screens one by one: a request
kind has a name and one place.

Verified: 211 of 211 tests; 9 headless careers and the UI walk (German and
English, about 5,460 steps each) identical.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude committed 2026-11-10 15:06:07 +01:00
1 parent 16b9b24c84
commit b7f748688c
1 file changed
+463 -143
+463 -143
View File
File diff suppressed because it is too large. Load diff