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:
ed
2026-06-29 16:35:20 -04:00
parent f3cd7bc2ff
commit 3d87f8e7ed
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ import pytest
_PROJECT_ROOT: Path = Path(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
_SCRIPTS_DIR: Path = _PROJECT_ROOT / "tests" / "artifacts" / "tier2_state" / "default_layout_install_20260629"
_GUI_SCRIPT: str = "sloppy.py"
_GUI_SCRIPT: str = str(_PROJECT_ROOT / "sloppy.py")
_INI_FILENAME: str = "manualslop_layout.ini"