c8a17e3a29b1a9052d91d5df486e02e8de1af78b
4 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5ab23f9eea |
fix(layout): make 2-column dock layout actually auto-apply
The pre-run install wrote the bundled INI to cwd, and the _install_default_layout_if_empty helper applies it via imgui.load_ini_settings_from_memory() when cwd is empty. But the GUI was rendering all panels as floating windows at default position (60, 60) with no DockId, despite the bundled INI having a full [Docking][Data] block with DockSpace + DockNodes + per-window DockIds. Root cause analysis (via imgui.save_ini_settings_to_memory() at runtime): 1. With default_imgui_window_type=provide_full_screen_dock_space: HelloImGui creates its own DockSpace at runtime, overriding the INI's DockSpace settings. The DockSpace ID matches (0xAFC85805) but the Split/X and child DockNodes from the bundled INI are discarded. Runtime INI shows: 'DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,28 Size=1666,1172 CentralNode=1' (no DockNodes, no DockIds honored). 2. The pre-run install writes the INI to disk, but HelloImGui's load_user_pref runs BEFORE post_init, so even a perfect on-disk INI doesn't get re-applied to the current session's dock state unless we call imgui.load_ini_settings_from_memory() after the first frame. Two-part fix: A. src/gui_2.py line 678: change default_imgui_window_type from 'provide_full_screen_dock_space' to 'no_default_window'. Without the auto-created DockSpace, HelloImGui honors the INI's full docking tree structure. B. src/gui_2.py _post_init (line 575): always call imgui.load_ini_settings_from_memory() after _install_default_layout runs, regardless of whether the cwd INI was empty. This re-applies the bundled INI to the live session after the first frame is rendered, so the panels are docked correctly on the current launch. Layouts/default.ini: replace the simple 'DockSpace + 2 direct DockNode children' structure (silently ignored by HelloImGui) with the user's working nested DockNode tree (5-level deep), mapped to: - LEFT column (DockNode 0x10, CentralNode=1): Theme, Project Settings, AI Settings, Files & Media, Operations Hub - RIGHT column (DockNode 0x01): Discussion Hub, Log Management, Diagnostics Verification (imgui.save_ini_settings_to_memory at runtime after 15s + first frame): - LEFT column windows: Pos=0,28, Size=881,1697 (5 panels stacked) - RIGHT column windows: Pos=883,28, Size=1183,1697 (3 panels stacked) - [Docking][Data] block fully preserved (DockSpace + 8 DockNodes) - All 8 panels docked (not floating) Tests: - tests/test_default_layout_install.py: 3/3 PASS - tests/test_api_hooks_gui_health_live.py: 1/1 PASS - tests/test_command_palette_sim.py: 7/7 PASS - tests/test_saved_presets_sim.py: 2/2 PASS - tests/test_live_gui_integration_v2.py: 3/3 PASS |
||
|
|
2afb0126a5 |
fix(layout): restore [Docking] structure + per-window DockId references in bundled INI
Tier 2's commit |
||
|
|
e965451842 |
fix(layout): strip stale dockspace IDs from bundled INI; force live-session apply
Bundled layouts/default.ini (relocated from tests/artifacts/ in Phase 1) contained a [Docking] data block with a hardcoded DockSpace ID 0xAFBEEF01 plus per-window DockId references to nodes 0x10 and 0x11. Those IDs were captured at the time the layout was first generated; on any fresh session HelloImgui computes dockspace IDs dynamically (typically a hash of the dockspace name + creation order) so the hardcoded literal is stale by the first render and the orphan docking instructions are silently dropped. Result: window positions stored in the INI render the windows as floating at their absolute Pos coordinates, but the auto-created dockspace captures the full window body, hiding them all. User observed empty dockspace with only the menu ribbon rendering. Two-part fix: 1. layouts/default.ini: remove [Docking] data block and per-window DockId lines. Comment rewritten to explain why the auto-dock strategy is the only session-stable option. Each [Window] entry now has only Pos + Size + Collapsed=0, so HelloImgui's auto-dock layer places the panels as tabs in the central dockspace on first render. 2. _install_default_layout_if_empty: after writing the bundled INI to disk, also call imgui.load_ini_settings_from_memory(src_text) to force the live HelloImgui session to apply the new INI. Without this, the install only takes effect on the NEXT launch (since HelloImgui reads cwd/manualslop_layout.ini BEFORE the post_init callback fires). With it, first-launch panels appear immediately. Tests: - tests/test_default_layout_install.py assertions updated: instead of checking for a per-window DockId line, the install now verifies (a) [Window][Project Settings] entry exists, (b) the INI has at least one [Window] entry, (c) the INI has no [Docking] data block. - New _assert_live_session_apply() on tests 1 and 2 verifies the "(and applied to live session)" log line appears in stderr, confirming imgui.load_ini_settings_from_memory was invoked. 17/17 tests pass (3 install + 2 reset_layout + 8 adjacent gui/commands). |
||
|
|
7577d7d28b |
chore(layouts): introduce layouts/ directory + src/layouts.py; relocate default layout asset
TIER-2 READ AGENTS.md, conductor/workflow.md, conductor/edit_workflow.md, conductor/tier2/githooks/forbidden-files.txt, conductor/tracks/tier2_leak_prevention_20260620/spec.md, conductor/code_styleguides/data_oriented_design.md, conductor/code_styleguides/error_handling.md, conductor/code_styleguides/type_aliases.md, conductor/product-guidelines.md, conductor/code_styleguides/python.md, docs/guide_meta_boundary.md before Phase 1 Task 1.10. Phase 1 of default_layout_install_20260629: - tests/artifacts/manualslop_layout_default.ini -> layouts/default.ini (git mv preserves history; same content, new parallel-to-themes home) - src/paths.py: layouts: Path field + SLOP_GLOBAL_LAYOUTS env override + get_layouts_dir() accessor (mirror themes at 60/83/150/210+) - src/layouts.py: new LayoutFile @dataclass(frozen=True, slots=True) + load_layouts_from_dir/file + load_layouts_from_disk consumer (mirror src/theme_models.py + src/theme_2.py; Result drain per error_handling) - tests/conftest.py:709: reads from layouts/default.ini |