Private
Public Access
0
0
Files
manual_slop/layouts/default.ini
T
ed 2afb0126a5 fix(layout): restore [Docking] structure + per-window DockId references in bundled INI
Tier 2's commit e9654518 stripped the [Docking] data block and all
per-window DockId lines from layouts/default.ini based on the wrong
theory that HelloImgui would "auto-dock" panels via its central dockspace.
Empirically verified against tier2 branch HEAD (e9654518):

  manualslop_layout.ini after first launch: 1447 bytes (Docking block
  with DockSpace ID=0xAFC85805 + CentralNode=1, no DockNode children,
  no per-window DockId lines)

  User-visible result: empty dockspace with only the menu ribbon; 9
  default-visible panels are NOT rendered.

Compared with the user's working manualslop_layout.ini on master
(2150 bytes: full [Docking] hierarchy + 2 DockNode children + every
visible window has DockId=0x00000001,N or 0x00000002,N): panels render.

Root cause: the literal DockSpace ID in the bundled INI is matched by
imgui-bundle's HelloImgui against the dockspace it creates during the
session (ID computed deterministically from MainDockSpace name hash,
which is stable across sessions -- the SplitIds line in every
HelloImui-generated INI records 2949142533 = 0xAFC85805). The Phase 1
bundled INI had DockSpace ID=0xAFBEEF01 (one increment off the
correct ID) and Tier 2 stripped the entire docking structure on the
wrong theory that ids are session-incompatible. They aren't, as long as
the bundled INI's literal ID matches the runtime's computed ID.

This fix restores the docking structure in layouts/default.ini:

  - 8 [Window][...] entries (Project Settings, Files & Media, AI Settings,
    Theme, Operations Hub, Discussion Hub, Log Management, Diagnostics)
    each with Pos + Size + Collapsed=0 AND a DockId= line referencing
    0x00000001 (left column) or 0x00000002 (right column)
  - [Docking][Data] block with DockSpace ID=0xAFC85805 + 2 DockNode
    children (CentralNode=1 at 0x00000001 left, sibling at 0x00000002
    right)
  - HelloImGui_Misc block + SplitIds line
  - Comment block explaining the mechanism (replaces the misleading
    e9654518 "auto-dock layer" claim)
  - Omits Response (in _STALE_WINDOW_NAMES from src/gui_2.py:603-607)
    so _diag_layout_state does not emit a stale-name warning

The fix is the GOOD half of e9654518 -- the live-session
imgui.load_ini_settings_from_memory(src_text) apply after the copy
stays (it ensures the install takes effect on the current launch rather
than the next one). Only the INI content + the matching test
assertions change.

Tests:
  - _has_docking_block_with_docknodes (replaces _has_no_docking_block):
    asserts the bundled INI has [Docking][Data] with DockSpace AND
    >=1 DockNode ID= line
  - _every_window_has_dockid (new): asserts every [Window][...] header
    is followed by a DockId= line in its block
  - _has_no_stale_window_names (new): asserts no _STALE_WINDOW_NAMES
    entry is in the bundled INI

  17/17 tests pass (3 install + 2 reset_layout + 8 adjacent gui +
  4 commands).

Empirical verification:
  - delete cwd/manualslop_layout.ini
  - uv run python sloppy.py (no --enable-test-hooks; without this
    flag the app uses its regular GUI rendering pipeline)
  - log line: "[GUI] installed default layout: ...layouts/default.ini
    -> ...manualslop_layout.ini (and applied to live session)"
  - log line: "[GUI] visible-by-default windows: AI Settings,
    Diagnostics, Discussion Hub, Files & Media, Log Management,
    Operations Hub, Project Settings, Response, Theme"
  - saved manualslop_layout.ini post-launch: 3072 bytes with 2
    DockNodes, 8 [Window] entries (matches bundled INI minus runtime
    additions), 0 stale window names
2026-06-29 19:44:37 -04:00

102 lines
2.9 KiB
INI

;;;
;;; Manual Slop default docking layout for live_gui test sessions AND
;;; first-run production launches (when cwd/manualslop_layout.ini is
;;; missing/empty/small).
;;;
;;; Mechanism: HelloImGui reads this INI at app startup via the
;;; ini_folder_type/ini_filename on the RunnerParams. The DockSpace ID,
;;; DockNode IDs, and per-window DockId lines below tell HelloImgui where
;;; to place each panel. The literal IDs (0xAFC85805, 0x00000001,
;;; 0x00000002) match the runtime-generated MainDockSpace ID (decimal
;;; 2949142533) that HelloImGui computes deterministically per session.
;;;
;;; Window list matches the post-config-merge effective visibility set
;;; (8 default-true windows excluding Response (stale) and the four
;;; Tier panels (disabled in config.toml)):
;;; Project Settings, Files & Media, AI Settings, AI operations,
;;; Discussion Hub, Operations Hub, Theme, Log Management, Diagnostics.
;;; Per-window DockId:
;;; 0x00000001,0..4 = left column tabs (Theme, Project Settings,
;;; AI Settings, Files & Media, Operations Hub)
;;; 0x00000002,0..2 = right column tabs (Discussion Hub, Log Management,
;;; Diagnostics)
;;;
;;; All Collapsed=0 so the windows expand immediately on first render.
;;;
;;; This INI does NOT include any of the _STALE_WINDOW_NAMES from
;;; src/gui_2.py:603-607 (Projects, Files, Screenshots, Discussion History,
;;; Provider, Message, Response, Tool Calls, Comms History, System Prompts).
;;; _diag_layout_state will not emit a "stale window name" warning.
;;;
;;; 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. (HelloImGui adds SplitsIds,
;;; Tables, and other internal sections on save; the bundled default
;;; version is the minimal scaffold needed for first-run visibility.)
;;;
[Window][Project Settings]
Pos=0,28
Size=481,1172
Collapsed=0
DockId=0x00000001,1
[Window][Files & Media]
Pos=0,28
Size=481,1172
Collapsed=0
DockId=0x00000001,3
[Window][AI Settings]
Pos=0,28
Size=481,1172
Collapsed=0
DockId=0x00000001,2
[Window][Operations Hub]
Pos=0,28
Size=481,1172
Collapsed=0
DockId=0x00000001,4
[Window][Theme]
Pos=0,28
Size=481,1172
Collapsed=0
DockId=0x00000001,0
[Window][Discussion Hub]
Pos=483,28
Size=1197,1172
Collapsed=0
DockId=0x00000002,0
[Window][Log Management]
Pos=483,28
Size=1197,1172
Collapsed=0
DockId=0x00000002,1
[Window][Diagnostics]
Pos=483,28
Size=1197,1172
Collapsed=0
DockId=0x00000002,2
[Docking][Data]
DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,28 Size=1680,1172 Split=X
DockNode ID=0x00000001 Parent=0xAFC85805 SizeRef=481,1172 CentralNode=1 Selected=0x3F1379AF
DockNode ID=0x00000002 Parent=0xAFC85805 SizeRef=1197,1172 Selected=0xB4CBF21A
;;;<<<HelloImGui_Misc>>>;;;
[Layout]
Name=Default
[StatusBar]
Show=false
ShowFps=true
[Theme]
Name=ImGuiColorsDark
;;;<<<SplitIds>>>;;;
{"gImGuiSplitIDs":{"MainDockSpace":2949142533}}