Private
Public Access
0
0

chore(conductor): Add new track 'Fix GUI Crashes in Tool Preset Manager and Discussion Hub'

This commit is contained in:
2026-05-31 22:27:31 -04:00
parent e2305ff49a
commit 22af041979
5 changed files with 59 additions and 1 deletions
+4 -1
View File
@@ -266,4 +266,7 @@ This file tracks all major tracks for the project. Each track has its own detail
- [x] **Track: Robust Live Simulation Verification**
---
---
- [ ] **Track: Fix GUI Crashes in Tool Preset Manager and Discussion Hub**
*Link: [./tracks/gui_crash_fixes_20260531/](./tracks/gui_crash_fixes_20260531/)*
@@ -0,0 +1,5 @@
# Track gui_crash_fixes_20260531 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)
@@ -0,0 +1,8 @@
{
"track_id": "gui_crash_fixes_20260531",
"type": "bug",
"status": "new",
"created_at": "2026-05-31T00:00:00Z",
"updated_at": "2026-05-31T00:00:00Z",
"description": "Fix GUI Crashes in Tool Preset Manager and Discussion Hub"
}
@@ -0,0 +1,16 @@
# Implementation Plan
## Phase 1: Fix Tool Preset Manager Crashes
- [ ] Task: Investigate `render_tool_preset_manager_content` in `src/gui_2.py` to identify the missing `current_cat_tools` initialization or scope.
- [ ] Task: Fix the `NameError` and ensure correct ImGui child window scoping (`EndChild` vs `End`) in the Tool Preset Manager.
- [ ] Task: Conductor - User Manual Verification 'Fix Tool Preset Manager Crashes' (Protocol in workflow.md)
## Phase 2: Fix Discussion Hub Crashes
- [ ] Task: Investigate `render_discussion_entries` in `src/gui_2.py` to address the `IndexError` when deleting a discussion entry during rendering.
- [ ] Task: Fix the `IndexError` (e.g. by deferring deletion or copying the list) and associated ImGui scoping errors (`PopID() too many times!`).
- [ ] Task: Conductor - User Manual Verification 'Fix Discussion Hub Crashes' (Protocol in workflow.md)
## Phase 3: Global Verification
- [ ] Task: Run `python scripts/check_imgui_scopes.py` to statically verify all ImGui scopes are correct across the codebase.
- [ ] Task: Run automated test suite to ensure no regressions were introduced.
- [ ] Task: Conductor - User Manual Verification 'Global Verification' (Protocol in workflow.md)
@@ -0,0 +1,26 @@
# Specification: Fix GUI Crashes in Tool Preset Manager and Discussion Hub
## Overview
This track addresses several critical crashes in the immediate-mode GUI (`gui_2.py`) related to the Tool Preset Manager and the Discussion Hub. These issues include Python exceptions (`NameError`, `IndexError`) and underlying ImGui rendering assertion failures (`PopID() too many times`, `Must call EndChild() and not End()!`).
## Functional Requirements
- **Tool Preset Manager Fixes:**
- Resolve the `NameError: name 'current_cat_tools' is not defined` when interacting with or modifying tool preset entries (e.g., changing approval from "auto" to "ask").
- Fix the ImGui scope mismatch (`Must call EndChild() and not End()!`) in the `tp_scroll_2FED8981` child window.
- **Discussion Hub Fixes:**
- Resolve the `IndexError: list index out of range` in `render_discussion_entries` that occurs when deleting a discussion entry.
- Fix the associated ImGui scope mismatches (`Calling PopID() too many times!`) in the `HistoryChild_AB39D74A` window and tabs that trigger after the exception occurs.
## Non-Functional Requirements
- **ImGui Scope Safety:** Ensure all ImGui push/pop and begin/end pairs are correctly matched, even when exceptions are raised or lists are modified during rendering. The use of `imscope` context managers should be verified.
- **Code Style:** Fixes must adhere to the 1-space indentation rule for Python code and follow the "ImGui Defer Patterns" described in the code style guides.
## Acceptance Criteria
- [ ] Modifying a tool preset (e.g., changing the approval status of `ts_cpp` tools) does not raise a `NameError` or crash the application.
- [ ] Deleting a discussion entry removes the entry visually and does not raise an `IndexError`.
- [ ] Both panels can be interacted with, opened, and closed without triggering ImGui assertion failures.
- [ ] The `scripts/check_imgui_scopes.py` linter passes without new errors.
## Out of Scope
- Adding new features to the Tool Preset Manager or Discussion Hub.
- General refactoring of the GUI outside of fixing these specific crash points.