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.
This commit is contained in:
+7
-4
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user