From 2d035c1fda2df2a7eff08a8797903576742d22c7 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 1 Jun 2026 17:43:50 -0400 Subject: [PATCH] chore(conductor): Add new track 'fix_imgui_keys_down_20260601' --- conductor/tracks.md | 7 ++++++- .../fix_imgui_keys_down_20260601/index.md | 5 +++++ .../metadata.json | 8 ++++++++ .../fix_imgui_keys_down_20260601/plan.md | 13 ++++++++++++ .../fix_imgui_keys_down_20260601/spec.md | 20 +++++++++++++++++++ 5 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 conductor/tracks/fix_imgui_keys_down_20260601/index.md create mode 100644 conductor/tracks/fix_imgui_keys_down_20260601/metadata.json create mode 100644 conductor/tracks/fix_imgui_keys_down_20260601/plan.md create mode 100644 conductor/tracks/fix_imgui_keys_down_20260601/spec.md diff --git a/conductor/tracks.md b/conductor/tracks.md index 37221f89..dcc88521 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -269,4 +269,9 @@ This file tracks all major tracks for the project. Each track has its own detail --- - [x] **Track: Fix GUI Crashes in Tool Preset Manager and Discussion Hub** -*Link: [./tracks/gui_crash_fixes_20260531/](./tracks/gui_crash_fixes_20260531/)* \ No newline at end of file +*Link: [./tracks/gui_crash_fixes_20260531/](./tracks/gui_crash_fixes_20260531/)* + +--- + +- [ ] **Track: Fix `keys_down` AttributeError in ImGui IO** +*Link: [./tracks/fix_imgui_keys_down_20260601/](./tracks/fix_imgui_keys_down_20260601/)* diff --git a/conductor/tracks/fix_imgui_keys_down_20260601/index.md b/conductor/tracks/fix_imgui_keys_down_20260601/index.md new file mode 100644 index 00000000..551b9782 --- /dev/null +++ b/conductor/tracks/fix_imgui_keys_down_20260601/index.md @@ -0,0 +1,5 @@ +# Track fix_imgui_keys_down_20260601 Context + +- [Specification](./spec.md) +- [Implementation Plan](./plan.md) +- [Metadata](./metadata.json) diff --git a/conductor/tracks/fix_imgui_keys_down_20260601/metadata.json b/conductor/tracks/fix_imgui_keys_down_20260601/metadata.json new file mode 100644 index 00000000..bb8449c7 --- /dev/null +++ b/conductor/tracks/fix_imgui_keys_down_20260601/metadata.json @@ -0,0 +1,8 @@ +{ + "track_id": "fix_imgui_keys_down_20260601", + "type": "bug", + "status": "new", + "created_at": "2026-06-01T00:00:00Z", + "updated_at": "2026-06-01T00:00:00Z", + "description": "Fix AttributeError: 'IO' object has no attribute 'keys_down' when pressing hotkeys" +} diff --git a/conductor/tracks/fix_imgui_keys_down_20260601/plan.md b/conductor/tracks/fix_imgui_keys_down_20260601/plan.md new file mode 100644 index 00000000..852665d4 --- /dev/null +++ b/conductor/tracks/fix_imgui_keys_down_20260601/plan.md @@ -0,0 +1,13 @@ +# Implementation Plan: Fix `keys_down` AttributeError + +## Phase 1: Investigation and Implementation +- [ ] Task: Investigate ImGui API + - [ ] Identify the correct `imgui-bundle` equivalent for `io.keys_down` (e.g., `imgui.is_key_pressed(imgui.Key.r, False)`). + - [ ] Search the codebase for any other instances of `io.keys_down` that need updating. +- [ ] Task: Apply Fixes + - [ ] Modify `src/gui_2.py` (around line 695) to replace `io.keys_down[ord('R')]` with the modern API call. + - [ ] Apply the same fix to any other locations found during the codebase search. +- [ ] Task: Verification + - [ ] Start the application locally and trigger the `Ctrl+Alt+R` shortcut to confirm it no longer crashes. + - [ ] Ensure general application stability. +- [ ] Task: Conductor - User Manual Verification 'Phase 1: Investigation and Implementation' (Protocol in workflow.md) diff --git a/conductor/tracks/fix_imgui_keys_down_20260601/spec.md b/conductor/tracks/fix_imgui_keys_down_20260601/spec.md new file mode 100644 index 00000000..98a6fa71 --- /dev/null +++ b/conductor/tracks/fix_imgui_keys_down_20260601/spec.md @@ -0,0 +1,20 @@ +# Specification: Fix `keys_down` AttributeError in ImGui IO + +## 1. Overview +The application crashes with an `AttributeError: 'IO' object has no attribute 'keys_down'` in `src/gui_2.py` at line 695. This occurs when the application attempts to check if specific keys (like 'R' for the `Ctrl+Alt+R` hot-reload shortcut) are pressed using the legacy `io.keys_down` array, which is no longer available or supported in the current `imgui-bundle` version. + +## 2. Functional Requirements +* **Update Key State Queries:** Refactor the codebase (specifically `src/gui_2.py` and any other occurrences) to replace usages of `io.keys_down[ord('X')]` with the modern and correct ImGui API for querying key states (e.g., `imgui.is_key_down(imgui.Key.r)` or equivalent based on `imgui-bundle` specifications). +* **Restore Hotkeys:** Ensure that the hot-reload shortcut (`Ctrl+Alt+R`) and any other affected shortcuts function correctly without crashing the application. + +## 3. Non-Functional Requirements +* **Maintain Compatibility:** The fix must be compatible with the currently installed version of `imgui-bundle` and Python 3.11+. + +## 4. Acceptance Criteria +* Pressing `Ctrl+Alt+R` triggers the hot-reload functionality (or handles the shortcut gracefully) without raising an `AttributeError`. +* A codebase search confirms no remaining uses of `io.keys_down` exist. +* The application starts and runs normally without immediate exceptions in the event loop. + +## 5. Out of Scope +* Adding new hotkeys. +* Refactoring the entire hot-reload architecture (only fixing the input detection).