fix(gui): wire _install_default_layout_if_empty_result into App._post_init
App._post_init now resolves src = paths.get_layouts_dir()/default.ini and dst = Path.cwd()/manualslop_layout.ini, then calls the drain-plane helper before the warmup-complete registration block. Errors drain to self._startup_timeline_errors per the data-oriented convention, so a missing bundled layout (e.g. partial wheel install) does not crash the GUI: panels just stay invisible until the user drops a real INI in. Test fix: test_default_layout_install._GUI_SCRIPT was a relative path, but the subprocess Popen runs with cwd = temp_workspace where sloppy.py does not exist. Switched to an absolute path via _PROJECT_ROOT, the same pattern conftest.py:648 uses for the live_gui fixture.
This commit is contained in:
@@ -574,6 +574,12 @@ class App:
|
||||
# _io_pool thread; it only sets primitive state on the App, which
|
||||
# is safe. The render_warmup_status_indicator() function reads
|
||||
# the timestamp to show a brief "ready" tag for 3 seconds.
|
||||
src_layout_path: Path = paths.get_layouts_dir() / "default.ini"
|
||||
dst_layout_path: Path = Path.cwd() / "manualslop_layout.ini"
|
||||
install_result: Result[bool] = _install_default_layout_if_empty_result(self, src_layout_path, dst_layout_path)
|
||||
if not install_result.ok:
|
||||
if not hasattr(self, "_startup_timeline_errors"): self._startup_timeline_errors = []
|
||||
self._startup_timeline_errors.append(("_install_default_layout", install_result.errors[0]))
|
||||
if hasattr(self.controller, "on_warmup_complete"):
|
||||
cb_result = _post_init_callback_result(self)
|
||||
if not cb_result.ok:
|
||||
|
||||
Reference in New Issue
Block a user