From 7a4f71e78bd1475799045cadc0c0636306acdbd4 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 7 Jun 2026 21:27:29 -0400 Subject: [PATCH] test(fix): Don't copy stale repo-root layout to live_gui workspace The repo-root manualslop_layout.ini references pre-hub-refactor window names that no longer exist in the current code (Projects/Files/Screenshots/Provider/System Prompts/etc.). HelloImGui silently drops unknown windows when loading the layout, causing "missing panels" in live_gui tests and in the user's interactive session. The previous "Preserve GUI layout for tests" block copied the stale repo-root layout into the live_gui workspace, infecting every live_gui test session with stale state. Fix: skip the copy. HelloImui will generate a fresh layout in the test workspace on shutdown, which then lives in the session-scoped workspace and is cleaned up at teardown. The repo-root manualslop_layout.ini is still TRACKED (I did not delete it; that's the user's call). They can: - Delete it manually, or - Run the existing "Reset Layout" command from the Command Palette (which deletes both repo-root and live_gui_workspace paths and forces HelloImGui to regenerate with the current window catalog). Verified: 6/6 targeted tests pass. --- tests/conftest.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index b9d52bb8..b1176e6e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -407,10 +407,13 @@ def live_gui() -> Generator[tuple[subprocess.Popen, str], None, None]: cred_file = project_root / "credentials.toml" mcp_file = project_root / "mcp_env.toml" - # Preserve GUI layout for tests - layout_file = Path("manualslop_layout.ini") - if layout_file.exists(): - shutil.copy2(layout_file, temp_workspace / layout_file.name) + # NOTE: do NOT copy repo-root manualslop_layout.ini to the test workspace. + # The repo-root layout is from a pre-hub-refactor era and references window + # names that no longer exist (Projects/Files/Screenshots/Provider/...). + # HelloImGui will silently drop them, causing missing panels in live_gui tests + # and in the user's interactive session. Let HelloImGui generate a fresh layout. + # The user can delete the stale repo-root manualslop_layout.ini or use the + # Reset Layout command (added in the Reset Layout track) to regenerate. # Link assets for fonts src_assets = project_root / "assets"