e965451842
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).
95 lines
2.5 KiB
INI
95 lines
2.5 KiB
INI
;;;
|
|
;;; Manual Slop default docking layout for live_gui test sessions
|
|
;;;
|
|
;;; Layout strategy: each window entry has Pos + Size + Collapsed=0 set
|
|
;;; explicitly so the window is registered at a known absolute position.
|
|
;;; No docking data block and no DockId references -- HelloImgui dockspace
|
|
;;; IDs are computed dynamically per session (typically a hash of the
|
|
;;; dockspace name and creation order), so any DockSpace ID literal baked
|
|
;;; into an INI is stale by the next render of a fresh session and its
|
|
;;; docking instructions are dropped as orphan. Letting HelloImgui's
|
|
;;; auto-dock layer handle the layout (placing windows as tabs in the
|
|
;;; central dockspace) is the only session-stable option.
|
|
;;;
|
|
;;; Window list (matches src/app_controller.py:_default_windows defaults
|
|
;;; plus the four Tier panels that the user prefers visible):
|
|
;;; Pos=0,29 Size=600,400 : Project Settings, Files and Media,
|
|
;;; AI Settings, Operations Hub, Theme
|
|
;;; Pos=600,29 Size=600,400 : Discussion Hub, Log Management,
|
|
;;; Diagnostics
|
|
;;; Pos=0,432 Size=400,300 : Tier 1 Strategy, Tier 2 Tech Lead,
|
|
;;; Tier 3 Workers, Tier 4 QA
|
|
;;;
|
|
;;; All Collapsed=0 so the windows expand immediately on first render.
|
|
;;;
|
|
;;; To iterate on this layout: open sloppy.py, arrange windows as
|
|
;;; desired, quit (HelloImgui auto-saves), then copy the resulting
|
|
;;; cwd/manualslop_layout.ini over this one. Strip the docking data
|
|
;;; block from the saved INI before copy (or just keep this default
|
|
;;; which auto-docks cleanly).
|
|
;;;
|
|
;;; Scrubbed entries: no Text Viewer / Tool Script / Inject File /
|
|
;;; AST Inspector / Context Preview / Patch modal etc. (transient or
|
|
;;; modal-by-default).
|
|
;;;
|
|
|
|
[Window][Project Settings]
|
|
Pos=0,29
|
|
Size=400,400
|
|
Collapsed=0
|
|
|
|
[Window][Files & Media]
|
|
Pos=0,432
|
|
Size=400,400
|
|
Collapsed=0
|
|
|
|
[Window][AI Settings]
|
|
Pos=410,29
|
|
Size=400,400
|
|
Collapsed=0
|
|
|
|
[Window][Operations Hub]
|
|
Pos=410,432
|
|
Size=400,400
|
|
Collapsed=0
|
|
|
|
[Window][Discussion Hub]
|
|
Pos=820,29
|
|
Size=400,600
|
|
Collapsed=0
|
|
|
|
[Window][Log Management]
|
|
Pos=820,640
|
|
Size=400,200
|
|
Collapsed=0
|
|
|
|
[Window][Diagnostics]
|
|
Pos=820,850
|
|
Size=400,250
|
|
Collapsed=0
|
|
|
|
[Window][Theme]
|
|
Pos=1230,29
|
|
Size=400,300
|
|
Collapsed=0
|
|
|
|
[Window][Tier 1: Strategy]
|
|
Pos=1230,340
|
|
Size=400,250
|
|
Collapsed=0
|
|
|
|
[Window][Tier 2: Tech Lead]
|
|
Pos=1230,600
|
|
Size=400,250
|
|
Collapsed=0
|
|
|
|
[Window][Tier 3: Workers]
|
|
Pos=1230,860
|
|
Size=400,200
|
|
Collapsed=0
|
|
|
|
[Window][Tier 4: QA]
|
|
Pos=1640,29
|
|
Size=400,300
|
|
Collapsed=0
|