Private
Public Access
0
0

Merge remote-tracking branch 'origin/master' into tier2/default_layout_install_20260629

This commit is contained in:
2026-06-29 19:35:01 -04:00
4 changed files with 418 additions and 0 deletions
@@ -0,0 +1,79 @@
{
"track_id": "default_layout_install_followup_20260629",
"name": "Default Layout Install — Followup (Restore Docking Structure)",
"status": "active",
"branch": "tier2-clone/tier2/default_layout_install_20260629",
"created": "2026-06-29",
"owner": "Tier 1 (initialized); implementation delegated to Tier 2/3.",
"blocked_by": [],
"blocks": [],
"scope": {
"new_files": [],
"modified_files": [
"layouts/default.ini (replace broken 2516-byte content with working ~2200-byte structure: [Docking] block + DockSpace ID=0xAFC85805 + 2 DockNode children + per-window DockId references for 12 default-true windows)",
"tests/test_default_layout_install.py (flip assertions: was asserting 'no [Docking] block exists'; now asserts '[Docking][Data] with DockSpace + DockNode children exists' + 'every default-visible window has DockId line')",
"docs/reports/TRACK_COMPLETION_default_layout_install_20260629.md (append FOLLOWUP addendum noting e9654518 INI-strip half was based on wrong theory)",
"conductor/tracks.md (add row for this followup track)",
"conductor/tracks/default_layout_install_followup_20260629/state.toml (phase + task progression tracking)"
],
"deleted_files": []
},
"estimated_effort": {
"method": "scope (per workflow.md Tier 1 Track Initialization Rules. NO day estimates.)",
"phase_1": "7 tasks: 1 read working INI + 1 read DockSpace IDs + 1 inventory default-true windows + 1 inventory stale names + 1 write new INI + 1 replace comment block + 1 commit",
"phase_2": "6 tasks: 1 read current test assertions + 2 flip assertions + 1 run tests + 1 run adjacent batch + 1 commit",
"phase_3": "3 tasks: 1 read TRACK_COMPLETION + 1 append addendum + 1 commit",
"phase_4": "6 tasks: 1 empirical screenshot verify + 1 INI-content verify + 1 checkpoint commit + 1 state update + 1 plan update + 1 tracks.md row"
},
"verification_criteria": [
"G1: layouts/default.ini on tier2 branch has [Docking][Data] block with DockSpace ID=0xAFC85805 (= runtime-generated 2949142533) + 2 DockNode children + per-window DockId=0x00000001,N or 0x00000002,N for the 12 default-true windows (Project Settings, Files & Media, AI Settings, Tier 1: Strategy, Tier 2: Tech Lead, Tier 3: Workers, Tier 4: QA, Discussion Hub, Operations Hub, Theme, Log Management, Diagnostics)",
"G2: layouts/default.ini comment block at top accurately describes the working mechanism (NOT 'auto-dock without DockIds'; describes runtime-generated DockSpace ID + DockNode hierarchy + per-window DockId references)",
"G3: tests/test_default_layout_install.py assertions flipped from negative (no [Docking] block / no DockId) to positive ([Docking][Data] with DockSpace + DockNode children exists; every default-visible window has a DockId line)",
"G4: docs/reports/TRACK_COMPLETION_default_layout_install_20260629.md has a FOLLOWUP addendum citing this track + the wrong-theory diagnosis + the empirical evidence",
"G5: tests/conftest.py:709 layout preload still works (file path unchanged; only contents of layouts/default.ini changed)",
"VC_no_stale_window_warning: empirical test launch on the fixed tier2 branch produces ZERO '[GUI] WARNING: layout has N stale window name(s)' lines in stderr (verify by deleting cwd/manualslop_layout.ini + launching + grep stderr for the warning)",
"VC_panels_actually_render: empirical test launch on the fixed tier2 branch shows 12 panels visible (Project Settings, Files & Media, AI Settings, Tier 1: Strategy, Tier 2: Tech Lead, Tier 3: Workers, Tier 4: QA, Discussion Hub, Operations Hub, Theme, Log Management, Diagnostics) — verified by user screenshot OR by INI content asserting all 12 [Window][X] entries + DockIds persist after first launch",
"VC_installer_preserved: _install_default_layout_if_empty (src/gui_2.py:1478) is unchanged from Phase 2; only layouts/default.ini content changes. The live-session imgui.load_ini_settings_from_memory() apply (e9654518's GOOD half) is preserved verbatim"
],
"regressions_and_pre_existing_failures": [
"e9654518 'fix(layout): strip stale dockspace IDs from bundled INI; force live-session apply' on tier2-clone/tier2/default_layout_install_20260629 broke the bundled INI by removing the [Docking] block + per-window DockId references. THIS TRACK SUPERSEDES THAT HALF of e9654518. The OTHER half (live-session imgui.load_ini_settings_from_memory() apply in src/gui_2.py:1478) is CORRECT and is preserved."
],
"pre_existing_failures_remaining": [],
"deferred_to_followup_tracks": [
{
"title": "panel_defs_fleury_migration",
"description": "Migrate the ~40 imperative render_x functions in src/gui_2.py into declarative PanelDef records per Ryan Fleury's raddbg 'type view' / 'lens' pattern. The original default_layout_install_20260629 track already documents this as the eventual normalization target (see conductor/tracks/default_layout_install_20260629/spec.md §'Eventual Normalization Target' + docs/transcripts/_9_bK_WjuYY_ryan_fleury_raddbg_walkthrough.json @7697s).",
"track_status": "not yet initialized"
}
],
"risk_register": [
{
"id": "R1",
"description": "DockSpace ID 0xAFC85805 may not be stable across HelloImGui versions. If imgui_bundle upgrades and the hash algorithm changes, the bundled INI's literal ID will stop matching the runtime-generated ID and panels will revert to invisible.",
"likelihood": "low",
"impact": "panels disappear on imgui_bundle upgrade",
"mitigation": "Phase 4 Task 4.1 includes a screenshot verify that pins the ID empirically. If a future imgui_bundle upgrade changes the ID, the canonical fix is to (a) launch sloppy.py fresh, (b) read the new SplitIds line from the saved manualslop_layout.ini, (c) update layouts/default.ini's DockSpace ID + splitIds line to match. This is a 1-line patch, not a track."
},
{
"id": "R2",
"description": "The bundled INI references 12 default-true windows from _default_windows. If a future refactor renames one of those windows, the bundled INI will reference a non-existent window and the panel won't render — _diag_layout_state will warn.",
"likelihood": "medium (renames have happened before per _STALE_WINDOW_NAMES)",
"impact": "one panel disappears post-refactor",
"mitigation": "tests/test_default_layout_install.py should cross-reference _default_windows at test-time (iterate the keys where v=True and assert each appears in layouts/default.ini). Phase 2 Task 2.3 should add this dynamic cross-check so any future refactor that renames a window fails the install test loudly."
},
{
"id": "R3",
"description": "The user's working master INI has stale 'Response' entry (in _STALE_WINDOW_NAMES). If we copy that INI as the bundled template, the warning persists. Phase 1 Task 1.5 must explicitly NOT include Response.",
"likelihood": "low (we know about it; Task 1.4 inventories the must-not-appear set)",
"impact": "stale warning persists in new installs",
"mitigation": "Task 1.4 inventory + Task 1.5 explicit exclusion + Task 2.4 RED test that asserts NO _STALE_WINDOW_NAMES appear in layouts/default.ini"
},
{
"id": "R4",
"description": "Tier 2's tests/test_default_layout_install.py has been touched twice now (Phase 2 RED + e9654518 weakening). The next agent reading the test might be confused by the assertion history. The Phase 3 FOLLOWUP addendum documents this; the git log on the test file tells the story too.",
"likelihood": "low (git log preserves history)",
"impact": "documentation confusion for next agent",
"mitigation": "Phase 3 FOLLOWUP addendum explicitly notes 'e9654518 weakened the test assertions; this followup flipped them back'; commit messages on the test file reference this back-and-forth."
}
]
}
@@ -0,0 +1,145 @@
## Phase 1: Restore the bundled INI to a working structure
Focus: replace the broken `layouts/default.ini` (Tier 2's `e9654518` stripped the `[Docking]` block + per-window `DockId` references) with a working version that mirrors the user's working `manualslop_layout.ini` on master.
- [ ] Task 1.1: Read user's working INI as the template
- WHERE: `manualslop_layout.ini` on master branch (2150 bytes)
- WHAT: confirm the exact structure to mirror — 9 `[Window][X]` entries with `DockId=0x00000001,N` or `0x00000002,N`, `[Docking][Data]` with `DockSpace ID=0xAFC85805` + 2 `DockNode` children, `SplitIds` line
- HOW: `Get-Content manualslop_layout.ini` to read the entire file
- SAFETY: pure read
- [ ] Task 1.2: Identify the runtime DockSpace ID + DockNode ID space
- WHERE: `manualslop_layout.ini` SplitIds line at the bottom
- WHAT: confirm `MainDockSpace:2949142533` (= `0xAFC85805`) is the literal ID HelloImGui will look for
- HOW: `Select-String` for `SplitIds` and `DockSpace ID=`
- SAFETY: pure read; informational for Task 1.5
- [ ] Task 1.3: Inventory the canonical visible windows to dock
- WHERE: `src/app_controller.py:2083-2108` (`_default_windows` dict)
- WHAT: list the 12 default-true windows; cross-reference with `app.show_windows` post-init via `_diag_layout_state`'s "visible-by-default" log to get the actual 9 (the discrepancy is that `setdefault` in `App.__init__:406-415` adds a few more keys that `_default_windows` doesn't include, and vice versa)
- HOW: read the dict + the setdefault block; build a final list of `[Window][X]` entries that the bundled INI must contain
- SAFETY: pure read; the final list is the source-of-truth for Task 1.5
- [ ] Task 1.4: Inventory the must-NOT-appear names
- WHERE: `src/gui_2.py:603-607` (`_STALE_WINDOW_NAMES` set)
- WHAT: confirm `{"Projects", "Files", "Screenshots", "Discussion History", "Provider", "Message", "Response", "Tool Calls", "Comms History", "System Prompts"}` must NOT appear in `layouts/default.ini` as `[Window][X]` entries — particularly `Response` (which the user's working INI accidentally still has, triggering the stale warning)
- HOW: `Select-String _STALE_WINDOW_NAMES -Context 8`; manual scan of Task 1.1's template INI for any matches
- SAFETY: pure read
- [ ] Task 1.5: Write the new `layouts/default.ini`
- WHERE: `layouts/default.ini` on `tier2-clone/tier2/default_layout_install_20260629` branch (currently 2516 bytes, broken — no `[Docking]`, no `DockId`)
- WHAT: replace with a working INI that has:
- All 12 default-true windows from Task 1.3 with `Pos=...`, `Size=...`, `Collapsed=0`, and `DockId=0x00000001,N` (left column tabs 0-5) or `DockId=0x00000002,N` (right column tabs 0-5)
- `[Docking][Data]` block with `DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,28 Size=1680,1172 Split=X`
- `DockNode ID=0x00000001 Parent=0xAFC85805 SizeRef=... CentralNode=1 Selected=0x3F1379AF` (left column)
- `DockNode ID=0x00000002 Parent=0xAFC85805 SizeRef=... Selected=0xB4CBF21A` (right column)
- `SplitIds` line: `{"gImGuiSplitIDs":{"MainDockSpace":2949142533}}`
- `HelloImGui_Misc` block at the end (Theme, StatusBar, Layout)
- **No `Response`** (it's in `_STALE_WINDOW_NAMES`); **no `Projects`/`Files`/etc.** either
- HOW: `git show e9654518:layouts/default.ini > /tmp/before.ini` to capture the current broken version, then `manual-slop_edit_file` with a single `old_string` covering the whole file body and `new_string` being the replacement; OR `git checkout tier2-clone/tier2/default_layout_install_20260629 -- layouts/default.ini && manual-slop_edit_file` if the `old_string` approach is too fragile
- SAFETY: file replace; verify with `git diff layouts/default.ini` after
- [ ] Task 1.6: Replace the misleading comment block
- WHERE: top of `layouts/default.ini`
- WHAT: replace the e9654518 comment block claiming "auto-dock layer handles the layout" with an accurate comment explaining:
- DockSpace ID `0xAFC85805` = runtime-generated `MainDockSpace` (= decimal `2949142533` per SplitIds)
- Per-window `DockId=` lines tell HelloImGui which DockNode each window goes into
- Literal IDs are stable because HelloImGui reads them from the INI before generating anything
- "Auto-dock without DockIds" is a misconception; without DockIds the dockspace has no tabs and windows float at `Pos` but get clipped
- HOW: same `manual-slop_edit_file` as Task 1.5 (single write); preserve 1-space indent + line length
- SAFETY: docstring-style edit; verify with `Get-Content layouts/default.ini | Select-Object -First 20`
- [ ] Task 1.7: Commit phase 1 with git note
- WHAT: `fix(layout): restore Docking structure + DockId references in layouts/default.ini`
- HOW: standard atomic commit on `tier2-clone/tier2/default_layout_install_20260629` branch; git note = "Tier 2's e9654518 stripped the [Docking] block + per-window DockId references from layouts/default.ini based on the wrong theory that HelloImGui would auto-dock without them. Empirically verified: Tier 2's broken INI is 1447 bytes (no DockNode children, no DockId lines) and renders 0 panels; user's working INI is 2150 bytes (full [Docking] hierarchy + per-window DockId) and renders all panels. The literal IDs work because HelloImGui reads them from the INI before generating anything. Restoring the structure with DockSpace ID=0xAFC85805 (= runtime-generated 2949142533) + 2 DockNode children + per-window DockId references matches what makes panels visible."
- SAFETY: branch-bound; no risk to master
## Phase 2: Flip the test assertions
Focus: `e9654518` weakened `tests/test_default_layout_install.py` to assert the OPPOSITE of what we want (no `[Docking]` block = good). Flip those assertions.
- [ ] Task 2.1: Find and read current test assertions
- WHERE: `tests/test_default_layout_install.py` (e9654518's test update)
- WHAT: find the 3 tests updated by e9654518; identify which assertions assert "no `[Docking]` block" or "no DockId" — those are inverted and need flipping
- HOW: `Select-String -Path tests/test_default_layout_install.py -Pattern "no [Docking]|no DockId|strip.*Docking"` to find the inverted assertions
- SAFETY: pure read
- [ ] Task 2.2: Flip the "no Docking block" assertion to "Docking block exists"
- WHERE: `tests/test_default_layout_install.py`, the test that asserts "no `[Docking]` block"
- WHAT: replace with the positive assertion: "the bundled INI contains `[Docking][Data]` with `DockSpace ID=` + at least one `DockNode ID=` child"
- HOW: `manual-slop_edit_file` with surgical find-replace; preserve 1-space indent
- SAFETY: test-only change; verify by running the test before/after
- [ ] Task 2.3: Flip the "no DockId per window" assertion to "DockId per visible window"
- WHERE: `tests/test_default_layout_install.py`, the test that asserts windows have no `DockId=`
- WHAT: replace with the positive assertion: "every default-visible window in the bundled INI has a `DockId=0x00000001,N` or `DockId=0x00000002,N` line"
- HOW: same approach as Task 2.2; ideally re-write to iterate `app_controller._default_windows` keys that are True and assert each has a DockId
- SAFETY: test-only
- [ ] Task 2.4: Run the test suite — RED expected, then GREEN
- WHERE: `tests/test_default_layout_install.py`
- WHAT: `uv run pytest tests/test_default_layout_install.py -v --tb=short --timeout=120`
- Expected after Task 2.1-2.3: GREEN (the new INI from Phase 1 has the right structure; the flipped assertions now match it)
- SAFETY: standard test run; per `conductor/workflow.md` use the batched runner for batch verification: `uv run python scripts/run_tests_batched.py --filter test_default_layout_install`
- [ ] Task 2.5: Run adjacent test batches to confirm no regression
- WHERE: `tests/test_gui*.py`, `tests/test_workspace_profiles_sim.py`
- HOW: `uv run python scripts/run_tests_batched.py --tier test_gui*`
- Expected: no regression; the bundled INI change only affects test workspaces (which read the file via conftest:709) and live first-run scenarios
- SAFETY: per `conductor/workflow.md` batched runner only
- [ ] Task 2.6: Commit phase 2 with git note
- WHAT: `fix(test): flip install-test assertions to assert Docking structure exists (was inverted by e9654518)`
- HOW: standard atomic commit on the same branch
- SAFETY: test-only commit
## Phase 3: Update Tier 2's TRACK_COMPLETION report with the FOLLOWUP addendum
Focus: Tier 2 wrote `docs/reports/TRACK_COMPLETION_default_layout_install_20260629.md` claiming the track shipped successfully. Add a FOLLOWUP addendum noting that the INI-stripping half of `e9654518` was wrong, and that this followup track (`default_layout_install_followup_20260629`) is the correction.
- [ ] Task 3.1: Read the existing TRACK_COMPLETION report
- WHERE: `docs/reports/TRACK_COMPLETION_default_layout_install_20260629.md`
- WHAT: confirm what Tier 2 claimed (especially the "all phases shipped" / "panels visible post-install" claims)
- HOW: `Get-Content` the file; note the section headings so the addendum can be appended in a coherent place
- SAFETY: pure read
- [ ] Task 3.2: Append FOLLOWUP addendum
- WHERE: end of `docs/reports/TRACK_COMPLETION_default_layout_install_20260629.md`
- WHAT: add a section titled "FOLLOWUP: `default_layout_install_followup_20260629` (post-merge correction)" with:
- Summary: Tier 2's `e9654518` strip-the-docking fix was based on a wrong theory; the new followup track restores the `[Docking]` + per-window `DockId` references
- Diagnosis: literal IDs in INI ARE used by HelloImGui (when INI exists); without `[Docking]` children + `DockId` lines, the dockspace is empty and panels don't render
- Evidence: user's working master INI is 2150 bytes with full structure; Tier 2's broken INI is 1447 bytes without it; first-launch screenshots confirm 0 vs all panels
- Action: see `conductor/tracks/default_layout_install_followup_20260629/spec.md` for the full correction
- Status of `e9654518`'s "good half" (live-session `load_ini_settings_from_memory()` apply): KEPT — that's still the right fix
- HOW: `manual-slop_edit_file` with `old_string` = last paragraph of the report, `new_string` = last paragraph + new section
- SAFETY: append-only; do not rewrite Tier 2's content
- [ ] Task 3.3: Commit phase 3 with git note
- WHAT: `docs(reports): add FOLLOWUP addendum to TRACK_COMPLETION noting e9654518 INI strip was wrong`
- HOW: standard atomic commit
- SAFETY: doc-only
## Phase 4: Empirical verification + checkpoint
Focus: prove the fix actually works by spawning the app on the corrected branch and confirming panels render.
- [ ] Task 4.1: Spawn sloppy.py on the fixed branch, observe via screenshot
- WHERE: Tier 2's working tree at `tier2-clone/tier2/default_layout_install_20260629` after this track's 3 commits
- WHAT: `cd C:\projects\manual_slop_tier2 && uv run python sloppy.py` (or use `start sloppy.py`); observe via screenshot that the 9 default-visible panels actually render (Project Settings, Files & Media, AI Settings, Discussion Hub, Operations Hub, Theme, Log Management, Diagnostics, Response — wait, Response is NOT default-true in `_default_windows`; the 9 visible-by-default per the diagnostic = 9 default-true windows, NOT including `Response`)
- HOW: launch + screenshot capture (the user can do this manually; or the worker can use a headless render and INI-content assertion via `live_gui`)
- SAFETY: spawn + observe + kill (don't leave dangling process)
- [ ] Task 4.2: Check the saved INI post-launch matches the expected structure
- WHERE: `C:\projects\manual_slop_tier2\manualslop_layout.ini` after the test launch
- WHAT: assert the INI has:
- 9 (or 12) `[Window][X]` entries (one per default-visible window)
- All have `DockId=0x00000001,N` or `0x00000002,N`
- `[Docking][Data]` block with `DockSpace ID=0xAFC85805` + 2 `DockNode` children
- **No** `[GUI] WARNING: layout has N stale window name(s)` in the stderr log
- File size ~2200 bytes (vs the broken 1447)
- HOW: read the file + the startup log
- SAFETY: pure read
- [ ] Task 4.3: Checkpoint commit + verification git note
- WHAT: `conductor(checkpoint): end of default_layout_install_followup_20260629 (Docking restored, panels render empirically)`
- HOW: standard atomic commit with empty body; attach a long-form git note documenting the diagnosis, the 3-phase fix, the empirical screenshot evidence, and the recommended merge action (cherry-pick `5ad062b1..HEAD` from tier2 branch onto master)
- SAFETY: empty commit allowed per `conductor/workflow.md` §"Phase Completion Verification"
- [ ] Task 4.4: Update `state.toml` to mark all phases complete
- WHERE: `conductor/tracks/default_layout_install_followup_20260629/state.toml`
- WHAT: set every phase status to "completed" + every task to "completed" + the verification flags to true
- HOW: edit the file with the commit SHAs
- SAFETY: state file only
- [ ] Task 4.5: Commit final plan + state updates
- WHAT: `conductor(state): mark default_layout_install_followup_20260629 all phases complete`
- HOW: standard atomic commit
- SAFETY: state file only
- [ ] Task 4.6: Append this track to `conductor/tracks.md`
- WHERE: `conductor/tracks.md`
- WHAT: add a row noting the followup track + its status
- HOW: standard `git add conductor/tracks.md && git commit -m "conductor(tracks): add followup row"`
- SAFETY: track-list only; no semantic change
@@ -0,0 +1,132 @@
# Track Specification: Default Layout Install — Followup (Restore Docking Structure)
## Overview
The `default_layout_install_20260629` track shipped with a follow-up fix (`e9654518 fix(layout): strip stale dockspace IDs from bundled INI; force live-session apply`) that turned out to be based on a wrong theory of how HelloImGui dockspace IDs work. The fix stripped the `[Docking]` data block AND every per-window `DockId=` line from `layouts/default.ini`, replacing them with a comment block claiming HelloImGui would "auto-dock" the panels via its central dockspace.
**It does not work.** Empirically verified against `tier2-clone/tier2/default_layout_install_20260629` HEAD (`e9654518`):
- `manualslop_layout.ini` after first launch is **1447 bytes**, contains only a `[Docking]` block with `DockSpace ID=0xAFC85805` and `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** (verified via screenshot 2026-06-29).
By contrast, the user's working main repo `manualslop_layout.ini` is **2150 bytes** and contains a full `[Docking]` block with `DockSpace` + **2 `DockNode` children** (`0x00000001` CentralNode + `0x00000002` sibling) **and every visible window has a `DockId=0x00000001,N` or `0x00000002,N` line**. Panels render. The only warning is a "stale `Response` window name" because `_STALE_WINDOW_NAMES = {... "Response", ...}` was updated post-refactor but the user's INI was preserved from a pre-refactor session.
The follow-up tracks Tier 2's `e9654518` commit and replaces the broken `layouts/default.ini` with a properly-structured version. It also adds an end-to-end "render-time" test that asserts panels are actually rendered (not just that the INI has DockIds) — the original `e9654518` test was weakened to assert "no `[Docking]` block exists," which would happily pass even when no panels render.
**Tier 2 already shipped everything else correctly** — Phase 1 (`layouts/` + `src/layouts.py` mirroring themes/), Phase 2 (install helper + drain wiring), Phase 3 (reset_layout path cleanup), and the **GOOD part of `e9654518`** (live-session `imgui.load_ini_settings_from_memory()` apply — that part IS correct because HelloImGui reads `ini_filename` BEFORE `_post_init` fires, so the live re-apply is needed for same-session visibility). Those stay. Only the `layouts/default.ini` content and the matching test assertions need to change.
## Current State Audit (as of `e9654518` on `tier2-clone/tier2/default_layout_install_20260629`, master `42eb880f`)
### Already Implemented (DO NOT re-implement)
- **`layouts/` directory at repo root + `src/paths.py` `layouts` field + `src/layouts.py` loader** (Phase 1 of `default_layout_install_20260629`, commit `7577d7d2`) — mirrors the `themes/` pattern. The directory exists, the loader reads it, the path resolution works. Verified: `Test-Path C:\projects\manual_slop_tier2\layouts\default.ini` → True.
- **`_install_default_layout_if_empty` helper + `_install_default_layout_if_empty_result` drain helper** (Phase 2, commits `f3cd7bc2` + `3d87f8e7` + `cf5244b1`). The decision rule is correct: "empty INI" = file missing OR size < 1000 bytes OR zero `[Window][` lines → copy bundled → dst.
- **Live-session `imgui.load_ini_settings_from_memory(src_text)` apply after copy** (the GOOD half of `e9654518`, line +1478 in `src/gui_2.py`):
```python
# and ALSO calls imgui.load_ini_settings_from_memory(src_text) so the
# current live HelloImGui session applies the bundled docking positions
# immediately (HelloImGui reads ini_filename BEFORE the post_init callback
# fires, so a write-to-disk-only install wouldn't take effect on the
# current launch's render loop).
```
This part is **correct** and **must stay**. Verified: without this call, even a perfect INI would not take effect on the current launch's render loop (HelloImGui reads cwd INI at `immapp.run()` startup, before `_post_init` runs).
- **`commands.reset_layout` path cleanup** (Phase 3, commit `3b966288`): dead `tests/artifacts/live_gui_workspace/...` reference removed; only cwd-relative `"manualslop_layout.ini"` consulted.
- **`tests/test_reset_layout.py`** (Phase 3): asserts `inspect.getsource(commands.reset_layout)` has no `tests/artifacts/...` string. Passes.
- **`_default_windows` (canonical list)**: `src/app_controller.py:2083-2108` defines which windows exist + their default-visible state. The default-true windows (12) are: `Project Settings`, `Files & Media`, `AI Settings`, `Tier 1: Strategy`, `Tier 2: Tech Lead`, `Tier 3: Workers`, `Tier 4: QA`, `Discussion Hub`, `Operations Hub`, `Theme`, `Log Management`, `Diagnostics`. The default-false windows (10) are: `MMA Dashboard`, `Task DAG`, `Usage Analytics`, `Tier 1`/`Tier 2`/`Tier 3`/`Tier 4` (singular, pre-rename), `Message`, `Response`, `Tool Calls`, `Text Viewer`. **Bundled INI should match this list** — name exactly, default-visible-true entries docked, default-visible-false entries absent (so they don't generate the `[GUI] WARNING: layout has N stale window name(s) that no longer exist` warning).
- **`_STALE_WINDOW_NAMES`** (canonical "must not appear" list): `src/gui_2.py:603-607` defines `{"Projects", "Files", "Screenshots", "Discussion History", "Provider", "Message", "Response", "Tool Calls", "Comms History", "System Prompts"}`. Bundled INI must NOT contain any of these as `[Window][X]` entries or `_diag_layout_state` will emit the stale warning.
- **User's working `manualslop_layout.ini` (2150 bytes, master branch)**: the canonical structure this track must reproduce. Contains:
- 9 `[Window][X]` entries: `Project Settings`, `Files & Media`, `AI Settings`, `Theme`, `Discussion Hub`, `Operations Hub`, `Response`, `Log Management`, `Diagnostics` (all default-true + the stale `Response`)
- Per-window `DockId=0x00000001,N` or `0x00000002,N` lines (consistent with the DockNode IDs in the same `[Docking]` block)
- `[Docking][Data]` block with `DockSpace ID=0xAFC85805` + `DockNode ID=0x00000001` (CentralNode=1) + `DockNode ID=0x00000002` (sibling)
- SplitIds line: `{"gImGuiSplitIDs":{"MainDockSpace":2949142533}}` — note `2949142533 = 0xAFC85805`, the runtime-generated MainDockSpace ID
### Gaps to Fill (This Track's Scope)
- **GAP-1: `layouts/default.ini` has NO docking structure** (the core bug). Currently contains only `Pos=...`, `Size=...`, `Collapsed=0` for 12 windows; no `[Docking]` block with DockNode children; no per-window `DockId` lines. When this INI is installed, HelloImGui creates an empty dockspace (no tabs, no children) and the windows float at their `Pos` — but the full-screen dockspace captures the viewport, hiding them all.
- **GAP-2: Tier 2's commit message is misleading future readers**. `e9654518`'s body says "HelloImgui's auto-dock layer places the panels as tabs in the central dockspace on first render" — this claim is FALSE. Without explicit `DockId` references, HelloImGui's central dockspace has no children to dock into. The comment block at the top of `layouts/default.ini` (rewritten by `e9654518`) propagates the same wrong theory into the file itself.
- **GAP-3: `tests/test_default_layout_install.py` assertions are weakened**. `e9654518` updated the tests to assert "no `[Docking]` data block exists" — which is the OPPOSITE of what we want. The next agent reading the test would conclude that "bundled INI without docking structure is correct." The assertions must be flipped: `DockId=` lines SHOULD exist for each visible window; `[Docking][Data]` block SHOULD have DockSpace + at least one DockNode child.
- **GAP-4: No render-time verification**. Both the original spec test (`tests/test_default_layout_install.py`) and Tier 2's `e9654518` follow-up only assert INI *content*, not that panels actually render. The fundamental thing we want to verify is "after install, panels are visible on the current launch." The only honest way to assert this without depending on `imgui_test_engine` (separate track `test_engine_integration_20260627`) is to use the `live_gui` fixture to spawn the app, read back `app.show_windows` (already known correct), then check the saved INI for a real `[Docking]` hierarchy + per-window DockId references. If both are present, panels render (verified empirically against the user's working main repo INI; if absent, panels don't render — verified empirically against Tier 2's broken INI).
## Goals
- **G1.** Replace `layouts/default.ini` (currently 2516 bytes, no docking structure) with a working version (target ~2200 bytes, full `[Docking]` hierarchy + per-window `DockId` references for the 12 default-visible windows). The new file must:
- Use the runtime-generated `DockSpace ID=0xAFC85805` (= `2949142533` from the user's working INI SplitIds line) so HelloImGui matches the literal ID against the dockspace it creates
- Define 2 `DockNode` children (left column CentralNode=1, right column sibling) with IDs in the same numeric space (`0x00000001` + `0x00000002` work; the exact values don't matter as long as they're consistent within the file)
- Reference the 12 default-visible windows with `DockId=0x00000001,N` (left column tabs) and `DockId=0x00000002,N` (right column tabs)
- NOT contain any of `_STALE_WINDOW_NAMES` (`Projects`, `Files`, `Screenshots`, `Discussion History`, `Provider`, `Message`, `Response`, `Tool Calls`, `Comms History`, `System Prompts`) — particularly `Response` which the user's working INI accidentally still has
- Match the per-window `Pos`/`Size` from the user's working INI so panels render at the same screen positions
- **G2.** Replace the misleading comment block at the top of `layouts/default.ini` (written by `e9654518` claiming "HelloImgui auto-docks") with an accurate comment explaining:
- The `[Docking]` block uses runtime-generated DockSpace ID `0xAFC85805` (= `2949142533`)
- Per-window `DockId=` lines tell HelloImGui which DockNode each window goes into
- The literal IDs are stable because HelloImGui reads them from the INI before generating anything
- "Auto-dock without DockIds" is a misconception; without DockIds the dockspace has no tabs and windows float at `Pos` but get clipped
- **G3.** Flip the test assertions in `tests/test_default_layout_install.py` that `e9654518` weakened. Replace "no `[Docking]` block" with "contains `[Docking][Data]` with DockSpace + ≥1 DockNode child"; replace "no DockId per window" with "every visible window has `DockId=...,...` line." Keep the existing `_assert_live_session_apply()` helper that confirms `imgui.load_ini_settings_from_memory()` was called.
- **G4.** Update `docs/reports/TRACK_COMPLETION_default_layout_install_20260629.md` (Tier 2's existing completion report at `d4116f19`) with a FOLLOWUP addendum noting that `e9654518` was incorrect on the INI-stripping half and that the layout works once the proper `[Docking]` structure is restored. The addendum cites this track as the correction.
- **G5.** Update the canonical `tests/conftest.py:709` layout preload — it currently reads from `layouts/default.ini` (Phase 1 path update). After G1, that file is correct, so no further conftest change is needed. Verify with `tests/test_gui*.py` and `tests/test_workspace_profiles_sim.py` that the live_gui fixture still works.
## Non-Functional Requirements
- **NO new `src/<thing>.py` files** (per `conductor/workflow.md` file-naming rule). All code changes are surgical edits to existing files: `layouts/default.ini` (replace content), `tests/test_default_layout_install.py` (flip assertions), `docs/reports/TRACK_COMPLETION_default_layout_install_20260629.md` (add FOLLOWUP addendum).
- **NO day estimates** in track artifacts (per `conductor/workflow.md` §"Tier 1 Track Initialization Rules" — HARD BAN).
- **NO opaque types** — the INI file is plain text; the test file is Python with `@dataclass(frozen=True, slots=True)` per project convention (no `dict[str, Any]`).
- **The literal ID `0xAFC85805` MUST be used as the DockSpace ID.** This is empirically verified to be the runtime-generated MainDockSpace ID (see the SplitIds line in the user's working INI). Using any other literal ID (Tier 2's `e9654518` used no DockSpace ID at all, the Phase 1 INI used `0xAFBEEF01` which does NOT match the runtime ID) would either be ignored or break.
- **Atomic per-task commits** with git notes (per `conductor/workflow.md` §"Task Workflow" step 9-10). This track inherits the `tier2-clone/tier2/default_layout_install_20260629` branch (do NOT create a new branch — the fix lands as a fixup commit on top of `e9654518`).
## Architecture Reference
- **Empirical ground truth (working INI)**: `manualslop_layout.ini` on master (2150 bytes). The DockSpace ID `0xAFC85805` matches the runtime-generated ID `2949142533` recorded in the `SplitIds` line at the end of every HelloImGui-generated INI. This is the canonical reference for what `layouts/default.ini` should look like.
- **Empirical ground truth (broken INI)**: `manualslop_layout.ini` saved by `tier2-clone/tier2/default_layout_install_20260629` after first launch (1447 bytes). No DockNode children; no per-window `DockId` lines. Result: panels not rendered. This is the canonical reference for what to AVOID.
- **Live-session `load_ini_settings_from_memory()` apply** (`src/gui_2.py:1478-1480`, the GOOD half of `e9654518`): KEEP this. This is the right fix for the "HelloImGui reads INI before post_init fires" timing issue.
- **Install helper `_install_default_layout_if_empty`** (`src/gui_2.py:1478`, Phase 2): KEEP this verbatim. Only the bundled INI content changes; the install logic is correct.
- **`_default_windows` map** (`src/app_controller.py:2083-2108`): the canonical list of windows that exist in the current build. Bundled INI must reference exactly these names (modulo the Tier 1-4 group renaming: the singular `Tier 1`/`Tier 2`/`Tier 3`/`Tier 4` are gone, replaced by `Tier 1: Strategy` / `Tier 2: Tech Lead` / `Tier 3: Workers` / `Tier 4: QA` — and `_default_windows` reflects this).
- **`_STALE_WINDOW_NAMES` set** (`src/gui_2.py:603-607`): bundled INI must NOT contain any of these as `[Window][X]` entries. `_diag_layout_state` will emit a stale warning otherwise.
- **`show_windows` state at startup** (verified empirically via the Hook API): 27 entries, 9 visible by default. But `_default_windows` (the canonical list) has 12 default-true. The discrepancy is because `app_controller.py:_default_windows` is the *merged* default (used when the INI is missing) and `gui_2.py:App.__init__` `setdefault` adds 3 more (`Context Preview`, `External Tools`, `Shader Editor`, `Undo/Redo History`) that aren't in `_default_windows` — those should NOT be in the bundled INI because they default to False in the canonical list.
Wait — `setdefault` only ADDS missing keys. So the 9 visible-by-default reported by the diagnostic = the 12 from `_default_windows` MINUS the 3 that the `_default_windows` map itself doesn't include. Let me check the actual list more carefully during implementation. The relevant invariant: **bundled INI should reference ONLY windows that exist AND have `show_windows[X] = True` after `App.__init__` runs**. That set is what's visible in the diagnostic log.
## Out of Scope
- **Replacing layout state via `imgui_test_engine`** (`conductor/tracks/test_engine_integration_20260627/spec.md`) — separate follow-up track. G4's regression test uses INI content + `show_windows` state + the existing `live_gui` fixture; pixel-level visual regression waits for the engine.
- **Migrating panel definitions to Fleury-style `PanelDef` data records** — separate deferred track per the original `default_layout_install_20260629` track spec's "Eventual Normalization Target" section.
- **Adding more than one bundled layout** — `default.ini` is enough; users can hand-author `my-layout.ini` and switch via WorkspaceProfile.
- **Restructuring `_install_default_layout_if_empty`'s heuristic**. The "missing OR <1000 bytes OR zero `[Window][` lines" rule works. Don't touch it.
- **Removing the `_STALE_WINDOW_NAMES` set** — it's a useful safety net; this track just ensures bundled INI doesn't trigger it.
## See Also
- `manualslop_layout.ini` on master (2150 bytes) — the canonical reference for the working INI structure that this track must reproduce in `layouts/default.ini`
- `manualslop_layout.ini` on `tier2-clone/tier2/default_layout_install_20260629` HEAD (`e9654518`, 1447 bytes) — the canonical reference for what to AVOID
- `src/app_controller.py:2083-2108` — `_default_windows` map (canonical list of windows + default visibility)
- `src/gui_2.py:603-607` — `_STALE_WINDOW_NAMES` set (bundled INI must avoid these names)
- `src/gui_2.py:1478` — `_install_default_layout_if_empty` (the install helper; the GOOD half of `e9654518`'s `load_ini_settings_from_memory()` apply stays)
- `conductor/tracks/default_layout_install_20260629/spec.md` — parent track spec (Phase 1-3 + the e9654518 follow-up)
- `conductor/tracks/test_engine_integration_20260627/spec.md` — ImGui Test Engine (separate track; once shipped, G4's INI-content assertion can be replaced with pixel-level verification)
- `docs/reports/TRACK_COMPLETION_default_layout_install_20260629.md` — Tier 2's existing completion report (G4 of this track adds a FOLLOWUP addendum here)
@@ -0,0 +1,62 @@
# Track state for default_layout_install_followup_20260629
# Updates Tier 2's e9654518 followup that broke the bundled INI
[meta]
track_id = "default_layout_install_followup_20260629"
name = "Default Layout Install — Followup (Restore Docking Structure)"
status = "active"
current_phase = 0
last_updated = "2026-06-29"
[blocked_by]
# None. This track is independent.
[blocks]
# None.
[phases]
phase_1 = { status = "pending", checkpoint_sha = "", name = "Restore the bundled INI to a working structure" }
phase_2 = { status = "pending", checkpoint_sha = "", name = "Flip the test assertions" }
phase_3 = { status = "pending", checkpoint_sha = "", name = "Update Tier 2's TRACK_COMPLETION report with the FOLLOWUP addendum" }
phase_4 = { status = "pending", checkpoint_sha = "", name = "Empirical verification + checkpoint" }
[tasks]
# Phase 1 (7 tasks)
t1_1 = { status = "pending", commit_sha = "", description = "Read user's working INI as the template (manualslop_layout.ini on master, 2150 bytes)" }
t1_2 = { status = "pending", commit_sha = "", description = "Identify the runtime DockSpace ID + DockNode ID space (SplitIds line: MainDockSpace=2949142533=0xAFC85805)" }
t1_3 = { status = "pending", commit_sha = "", description = "Inventory the canonical visible windows to dock (from src/app_controller.py:_default_windows; 12 default-true)" }
t1_4 = { status = "pending", commit_sha = "", description = "Inventory the must-NOT-appear names (from src/gui_2.py:_STALE_WINDOW_NAMES; must scrub Response from template)" }
t1_5 = { status = "pending", commit_sha = "", description = "Write the new layouts/default.ini (full [Docking] + DockNode children + per-window DockId for 12 windows, no Response)" }
t1_6 = { status = "pending", commit_sha = "", description = "Replace the misleading e9654518 comment block (auto-dock myth) with accurate mechanism description" }
t1_7 = { status = "pending", commit_sha = "", description = "Commit phase 1 with git note (why the literal IDs work + the empirical evidence)" }
# Phase 2 (6 tasks)
t2_1 = { status = "pending", commit_sha = "", description = "Read current tests/test_default_layout_install.py assertions; find the inverted 'no [Docking]' / 'no DockId' assertions" }
t2_2 = { status = "pending", commit_sha = "", description = "Flip 'no [Docking] block' assertion to '[Docking][Data] with DockSpace + DockNode children exists'" }
t2_3 = { status = "pending", commit_sha = "", description = "Flip 'no DockId per window' assertion to 'every default-visible window has DockId line'" }
t2_4 = { status = "pending", commit_sha = "", description = "Run the test suite (RED expected before flip, GREEN after)" }
t2_5 = { status = "pending", commit_sha = "", description = "Run adjacent test batches (test_gui* + test_workspace_profiles_sim) — no regression" }
t2_6 = { status = "pending", commit_sha = "", description = "Commit phase 2 with git note (flipped assertions back; tier2 had inverted them)" }
# Phase 3 (3 tasks)
t3_1 = { status = "pending", commit_sha = "", description = "Read existing docs/reports/TRACK_COMPLETION_default_layout_install_20260629.md to find coherent append point" }
t3_2 = { status = "pending", commit_sha = "", description = "Append FOLLOWUP addendum citing this track + wrong-theory diagnosis + empirical evidence + action" }
t3_3 = { status = "pending", commit_sha = "", description = "Commit phase 3 with git note" }
# Phase 4 (6 tasks)
t4_1 = { status = "pending", commit_sha = "", description = "Spawn sloppy.py on fixed tier2 branch; observe via screenshot (or headless live_gui) that 12 panels actually render" }
t4_2 = { status = "pending", commit_sha = "", description = "Check saved INI post-launch: 12 [Window][X] + all DockIds + [Docking] block + no stale warning" }
t4_3 = { status = "pending", commit_sha = "", description = "Checkpoint commit + verification git note (diagnosis + 3-phase fix + empirical evidence + recommended merge action)" }
t4_4 = { status = "pending", commit_sha = "", description = "Update state.toml: all phases + tasks completed + verification flags true" }
t4_5 = { status = "pending", commit_sha = "", description = "Commit final plan + state updates" }
t4_6 = { status = "pending", commit_sha = "", description = "Append row to conductor/tracks.md + commit" }
[verification]
phase_4_g1_ini_has_docking_structure = false
phase_4_g2_ini_comment_accurate = false
phase_4_g3_test_assertions_flipped = false
phase_4_g4_track_completion_followup_added = false
phase_4_g5_conftest_still_works = false
phase_4_vc_no_stale_window_warning = false
phase_4_vc_panels_actually_render = false
phase_4_vc_installer_preserved = false