Private
Public Access
0
0

chore(conductor): Add new track 'fix_imgui_keys_down_20260601'

This commit is contained in:
2026-06-01 17:43:50 -04:00
parent 7de5625b71
commit 2d035c1fda
5 changed files with 52 additions and 1 deletions
+6 -1
View File
@@ -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/)*
*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/)*
@@ -0,0 +1,5 @@
# Track fix_imgui_keys_down_20260601 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./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"
}
@@ -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)
@@ -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).