From 410d81fb3f77feef1a4926ccdbb3574a2ad72f74 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 29 Jun 2026 22:18:25 -0400 Subject: [PATCH] fix(track): correct line numbers in default_layout_extract spec/plan for master (not cruft branch) The spec was drafted while the working tree was on tier2/post_module_taxonomy_de_cruft_20260627, but the track targets master. 2 line numbers were from the cruft branch, not master: - src/commands.py reset_layout: spec said :342-378 + :371; master is :248-275 + :268 - src/command_palette.py: spec said 208 lines; master is 165 lines Also added a Branch State Warning section documenting: - main working tree is on tier2/post_module_taxonomy_de_cruft_20260627 (NOT master) - module_taxonomy_refactor_20260627 + post_module_taxonomy_de_cruft_20260627 are NOT merged to master - this track does NOT depend on those cruft tracks - master worktree at C:\projects\manual_slop_master is the editing surface All other line numbers (App._post_init:566, App.run:619, _run_immapp_result:691, _post_init_callback_result:1449, render_persona_editor_window:3433, orphan end_child:6990, paths.py themes:60/83/150/209-216/295) verified correct against master. --- .../tracks/default_layout_extract_20260629/plan.md | 2 +- .../tracks/default_layout_extract_20260629/spec.md | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/conductor/tracks/default_layout_extract_20260629/plan.md b/conductor/tracks/default_layout_extract_20260629/plan.md index a8310746..26e31b88 100644 --- a/conductor/tracks/default_layout_extract_20260629/plan.md +++ b/conductor/tracks/default_layout_extract_20260629/plan.md @@ -201,7 +201,7 @@ Focus: Apply the 2 surgical fixes that don't require new infrastructure. - COMMIT: `fix(gui): remove orphan imgui.end_child() in render_tier_stream_panel except handler` - [ ] **Task 4.2: Cherry-pick reset_layout dead-path cleanup** - - WHERE: `src/commands.py:371` — delete the line that hardcodes `tests/artifacts/manualslop_layout_default.ini`. + - WHERE: `src/commands.py:268` — delete the line `os.path.join("tests", "artifacts", "live_gui_workspace", "manualslop_layout.ini"),` from the `layout_paths` list inside `reset_layout`. - WHAT: Apply tier-2's `3b966288`. The `reset_layout` command should not reference test fixtures in production code. - HOW: Read `src/commands.py:365-380` → identify the line that hardcodes `tests/artifacts/manualslop_layout_default.ini` → delete it. If the surrounding logic needs adjustment (e.g. fallback to a different path), update the fallback. - SAFETY: 1-space indent. CRLF. The behavior of `reset_layout` should be preserved — it still resets the layout, just from a different source path. diff --git a/conductor/tracks/default_layout_extract_20260629/spec.md b/conductor/tracks/default_layout_extract_20260629/spec.md index 7ee83d97..ed9a7ca9 100644 --- a/conductor/tracks/default_layout_extract_20260629/spec.md +++ b/conductor/tracks/default_layout_extract_20260629/spec.md @@ -4,13 +4,17 @@ Extract tier-2's GOOD work on the default layout setup (the `layouts/` directory, the install-on-empty-INI helpers, the pre-run install timing fix, and the orphan-end-child cleanup) into `master`, and replace the previous tier-2 "fake" verification (INI content assertions only) with a HARD 4-layer visual verification protocol that catches the "panels don't render" regression every time it occurs. -## Current State Audit (as of commit `fe9e2827`) +## Current State Audit (as of commit `466d2656` on master) + +### Branch State Warning + +The main working tree at `C:\projects\manual_slop` is currently on branch `tier2/post_module_taxonomy_de_cruft_20260627` (NOT master). This track targets `master`. All line numbers below are from `master` (verified via `git show master:src/gui_2.py`). The cruft-elimination tracks (`module_taxonomy_refactor_20260627` + `post_module_taxonomy_de_cruft_20260627`) are NOT merged to master — they live on tier-2 branches only. This track does NOT depend on those cruft tracks; it depends only on `cruft_elimination_20260627` (which IS merged to master) + the themes infrastructure in `src/paths.py` (which is on master). A separate master worktree exists at `C:\projects\manual_slop_master` for editing on the master branch without disturbing the cruft-branch working tree. ### Already Implemented on Master - `src/paths.py:60,83,150,209-216` — themes infrastructure (the pattern to mirror for layouts): `themes: Path` field in `_AppPaths`, default `root_dir / "themes"`, env override `SLOP_GLOBAL_THEMES`, getters `get_global_themes_path()` and `get_project_themes_path(project_root)`, plus the path info dict entry at line 295. - `src/theme_2.py:340-346` + `src/theme_models.py:181-225` — themes loader pair (the pattern to mirror for layouts): `load_themes_from_disk()` calls `get_global_themes_path()` then `load_themes_from_dir(path, scope)`; the latter iterates children, parses, builds typed `@dataclass(frozen=True, slots=True)` records, drains errors via `Result + ErrorInfo`. -- `src/gui_2.py:1776` — `from src.command_palette import render_palette_modal`. **MASTER WORKS**: `src/command_palette.py` EXISTS (208 lines, has `Command`, `ScoredCommand`, `CommandRegistry`, `render_palette_modal`). Tier-2 broke because they deleted `src/command_palette.py` in `module_taxonomy_refactor_20260627` (commit `3dd153f7`). +- `src/gui_2.py:1776` — `from src.command_palette import render_palette_modal`. **MASTER WORKS**: `src/command_palette.py` EXISTS (165 lines, has `Command`, `ScoredCommand`, `CommandRegistry`, `render_palette_modal`). Tier-2 broke because they deleted `src/command_palette.py` in `module_taxonomy_refactor_20260627` (commit `3dd153f7`, NOT merged to master). - `src/gui_2.py:580-611` — `_diag_layout_state` (one-shot startup diagnostic that logs `show_windows` count + INI file size + stale window name warnings). Used as the install verification hook. - `src/gui_2.py:619-703` — `App.run`. Calls `_run_immapp_result(self)` at line 691. HelloImGui reads `runner_params.ini_filename` ("manualslop_layout.ini") from cwd at load_user_pref time, BEFORE `callbacks.post_init` fires. - `src/gui_2.py:566-578` — `App._post_init`. Calls `_post_init_callback_result` and `_diag_layout_state`. Fires AFTER HelloImGui has loaded the INI from disk. @@ -18,7 +22,7 @@ Extract tier-2's GOOD work on the default layout setup (the `layouts/` directory - `src/gui_2.py:1658-1660` — orphan-end-child bug was refactored OUT of `_tier_stream_scroll_sync_result` (the helper that was previously buggy). The orphan at line 6990 (in `render_tier_stream_panel`'s except block) STILL exists on master. - `src/gui_2.py:6981-6991` — `render_tier_stream_panel` has the latent orphan-end-child bug: `try: ... imgui.end_child()` at line 6988; `except (TypeError, AttributeError): imgui.end_child()` at line 6990. When the try block raises (e.g. `len(None)`), the second `end_child()` fires with no matching `begin_child()` and ImGui emits "In window 'MainDockSpace': Missing End()". Currently latent because `len(content)` rarely raises. - `tests/conftest.py:700-712` — pre-baked `tests/artifacts/manualslop_layout_default.ini` shipped to fresh test workspaces. Hardcoded path (cwd-relative test fixture) — violates "production code uses cwd-relative paths only" rule. -- `src/commands.py:342-378` — `reset_layout` command with hardcoded `tests/artifacts/manualslop_layout_default.ini` path at line 371 (per the source code, dead code in production). +- `src/commands.py:248-275` — `reset_layout` command with hardcoded `tests/artifacts/live_gui_workspace/manualslop_layout.ini` path at line 268 (dead code in production; references a test-fixture path that doesn't exist in production cwd). - `conductor/tracks/default_layout_install_20260629/` — Tier-1 track scaffolding from this session. States the user's intent. - `conductor/tracks/default_layout_install_followup_20260629/` — Tier-1 followup track that supersedes Tier-2's wrong-theory `e9654518` strip-docking fix. @@ -99,7 +103,7 @@ The tier-2 track was marked "SHIPPED" based on: ### FR3. Surgical Cherry-Picks - F3.1. Cherry-pick `c2155593 fix(gui): remove orphan imgui.end_child() in render_tier_stream_panel except handler`. Apply the 1-line deletion to `src/gui_2.py:6990`. Tier-2 verified this fixes an imgui "Missing End()" error in MainDockSpace when the tier-stream try-block raises. Latent on master but real. -- F3.2. Cherry-pick `3b966288 chore(commands): remove dead test-fixture path from reset_layout`. Apply the deletion to `src/commands.py:371` (the `tests/artifacts/...` hardcoded path). +- F3.2. Cherry-pick `3b966288 chore(commands): remove dead test-fixture path from reset_layout`. Apply the deletion to `src/commands.py:268` (the `tests/artifacts/live_gui_workspace/manualslop_layout.ini` hardcoded path in the `layout_paths` list). ### FR4. Layer 1 — Per-Panel Render Sentinel - F4.1. New test file `tests/test_panels_visible_after_install.py`. Imports `live_gui` fixture from `tests/conftest.py`.