Skip to content

fix(client): build the manager a world's run_gui made and run its on_start - #201

Open
lallaria wants to merge 1 commit into
mainfrom
didi/manager-on-start-db3535
Open

lallaria wants to merge 1 commit into
mainfrom
didi/manager-on-start-db3535

Conversation

@lallaria

@lallaria lallaria commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Scope

The post-takeover build of a world client's own GUI manager, and its Kivy on_start override.

Description

  • 27 installed worlds (factorio, kh2, oot, sc2, ...) make a GameManager in their own run_gui. Its async_run took over the live app without ever calling its build(), so their custom tabs never appeared. The takeover now hands that manager to LegacyKvuiClientBuilder, which builds it in place of the make_gui() class.
  • GameManager.build_for_live_app accepts that existing manager and runs its on_start after the build, as Kivy's App.run does. Failures are logged and the build is kept. The new no-op GameManager.on_start keeps super().on_start() working, and stops a manager without an override from forwarding to the live app's on_start.
  • Pairs with fix(app): build a world's run_gui manager and run its on_start after the takeover mwgg-gui#85, which builds a run_gui-made MultiMDApp subclass (tboir) and runs its on_start.

Not covered by unit tests: a headless probe of the real frontend on both branches ran a run_gui GameManager through the real takeover. Its custom tab was added, and its on_start ran once. On main, it was never built.

…start

CommonClient.py: the takeover hands the manager a world's own run_gui made to GameClient before ctx.ui becomes the live app.
ClientBuilder.py: LegacyKvuiClientBuilder builds that instance in place of the make_gui() class.
kvui.py: GameManager.build_for_live_app takes an existing manager and runs its on_start after the build; GameManager.on_start is the no-op target for super().on_start().
test/general/test_client_compat.py: world-made manager resolution, the takeover hand-off, and build_for_live_app's on_start.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant