checkpoint post gui2_parity

This commit is contained in:
2026-02-24 22:02:06 -05:00
parent 828f728d67
commit ea84168ada
11 changed files with 63 additions and 189 deletions

View File

@@ -1,5 +0,0 @@
# Track gui2_parity_20260224 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -1,8 +0,0 @@
{
"track_id": "gui2_parity_20260224",
"type": "feature",
"status": "new",
"created_at": "2026-02-24T18:38:00Z",
"updated_at": "2026-02-24T18:38:00Z",
"description": "Investigate differences left between gui.py and gui_2.py. Needs to reach full parity, so we can sunset guy.py"
}

View File

@@ -1,43 +0,0 @@
# Implementation Plan: GUI 2.0 Feature Parity and Migration
This plan follows the project's standard task workflow to ensure full feature parity and a stable transition to the ImGui-based `gui_2.py`.
## Phase 1: Research and Gap Analysis [checkpoint: 36988cb]
Identify and document the exact differences between `gui.py` and `gui_2.py`.
- [x] Task: Audit `gui.py` and `gui_2.py` side-by-side to document specific visual and functional gaps. [fe33822]
- [x] Task: Map existing `EventEmitter` and `ApiHookClient` integrations in `gui.py` to `gui_2.py`. [579b004]
- [x] Task: Write failing tests in `tests/test_gui2_parity.py` that identify missing UI components or broken hooks in `gui_2.py`. [7c51674]
- [x] Task: Verify failing parity tests. [0006f72]
- [x] Task: Conductor - User Manual Verification 'Phase 1: Research and Gap Analysis' (Protocol in workflow.md) [9f99b77]
## Phase 2: Visual and Functional Parity Implementation [checkpoint: ad84843]
Address all identified gaps and ensure functional equivalence.
- [x] Task: Implement missing panels and UX nuances (text sizing, font rendering) in `gui_2.py`. [a85293f]
- [x] Task: Complete integration of all `EventEmitter` hooks in `gui_2.py` to match `gui.py`. [9d59a45]
- [x] Task: Verify functional parity by running `tests/test_gui2_events.py` and `tests/test_gui2_layout.py`. [450820e]
- [x] Task: Address any identified regressions or missing interactive elements. [2d8ee64]
- [x] Task: Conductor - User Manual Verification 'Phase 2: Visual and Functional Parity Implementation' (Protocol in workflow.md) [ad84843]
## Phase 3: Performance Optimization and Final Validation [checkpoint: 611c897]
Ensure `gui_2.py` meets performance requirements and passes all quality gates.
- [x] Task: Conduct performance benchmarking (FPS, CPU, Frame Time) for both `gui.py` and `gui_2.py`. [312b0ef]
- [x] Task: Optimize rendering and docking logic in `gui_2.py` if performance targets are not met. [d647251]
- [x] Task: Verify performance parity using `tests/test_gui2_performance.py`. [d647251]
- [x] Task: Run full suite of automated GUI tests with `live_gui` fixture on `gui_2.py`. [d647251]
- [x] Task: Conductor - User Manual Verification 'Phase 3: Performance Optimization and Final Validation' (Protocol in workflow.md) [14984c5]
## Phase 4: Deprecation and Cleanup
Finalize the migration and decommission the original `gui.py`.
- [x] Task: Rename gui.py to gui_legacy.py. [c4c47b8]
- [x] Task: Update project entry point or documentation to point to `gui_2.py` as the primary interface. [b92fa90]
- [x] Task: Final project-wide link validation and documentation update. [14984c5]
- [x] Task: Conductor - User Manual Verification 'Phase 4: Deprecation and Cleanup' (Protocol in workflow.md) [14984c5]
## Phase: Review Fixes
- [x] Task: Apply review suggestions [6f1e00b]
---
[checkpoint: 6f1e00b]

View File

@@ -1,29 +0,0 @@
# Specification: GUI 2.0 Feature Parity and Migration
## Overview
The project is transitioning from `gui.py` (Dear PyGui-based) to `gui_2.py` (ImGui Bundle-based) to leverage advanced multi-viewport and docking features not natively supported by Dear PyGui. This track focuses on achieving full visual, functional, and performance parity between the two implementations, ultimately enabling the decommissioning of the original `gui.py`.
## Functional Requirements
1. **Visual Parity:**
- Ensure all panels, layouts, and interactive elements in `gui_2.py` match the established UX of `gui.py`.
- Address nuances in UX, such as text panel sizing and font rendering, to ensure a seamless transition for existing users.
2. **Functional Parity:**
- Verify that all backend hooks (API metrics, context management, MCP tools, shell execution) work identically in `gui_2.py`.
- Ensure all interactive controls (buttons, inputs, dropdowns) trigger the correct application state changes.
3. **Performance Parity:**
- Benchmark `gui_2.py` against `gui.py` for FPS, frame time, and CPU/memory usage.
- Optimize `gui_2.py` to meet or exceed the performance metrics of the original implementation.
## Non-Functional Requirements
- **Multi-Viewport Stability:** Ensure the ImGui-bundle implementation is stable across multiple windows and docking configurations.
- **Deprecation Workflow:** Establish a clear path for renaming `gui.py` to `gui_legacy.py` for a transition period.
## Acceptance Criteria
- [ ] `gui_2.py` successfully passes the full suite of GUI automated verification tests (e.g., `test_gui2_events.py`, `test_gui2_layout.py`).
- [ ] A side-by-side audit confirms visual and functional parity for all core Hub panels.
- [ ] Performance benchmarks show `gui_2.py` is within +/- 5% of `gui.py` metrics.
- [ ] `gui.py` is renamed to `gui_legacy.py`.
## Out of Scope
- Introducing new UI features or backend capabilities not present in `gui.py`.
- Modifying the core `EventEmitter` or `AiClient` logic (unless required for GUI hook integration).

View File

@@ -8,9 +8,9 @@ system_prompt = ""
[theme]
palette = "Gold"
font_path = ""
font_size = 14.0
scale = 1.5
scale = 1.2000000476837158
font_path = ""
[projects]
paths = [

View File

@@ -121,7 +121,7 @@ history = [
[discussion.discussions."test gemini mock interaction"]
git_commit = ""
last_updated = "2026-02-23T22:59:50"
last_updated = "2026-02-24T21:42:09"
history = []
[agent.tools]

View File

@@ -12,7 +12,7 @@ ViewportPos=43,95
ViewportId=0x78C57832
Size=897,649
Collapsed=0
DockId=0x00000002,0
DockId=0x00000007,0
[Window][Files]
ViewportPos=3125,170
@@ -33,7 +33,7 @@ DockId=0x0000000A,0
Pos=0,17
Size=1680,730
Collapsed=0
DockId=0x00000011,0
DockId=0x00000007,0
[Window][Provider]
ViewportPos=43,95
@@ -41,7 +41,7 @@ ViewportId=0x78C57832
Pos=0,651
Size=897,468
Collapsed=0
DockId=0x00000002,0
DockId=0x00000007,0
[Window][Message]
Pos=0,749
@@ -78,11 +78,10 @@ Collapsed=0
DockId=0x0000000F,2
[Window][Theme]
ViewportPos=43,95
ViewportId=0x78C57832
Size=897,1896
Pos=0,17
Size=432,858
Collapsed=0
DockId=0x00000002,0
DockId=0x00000007,2
[Window][Text Viewer - Entry #7]
Pos=379,324
@@ -90,16 +89,16 @@ Size=900,700
Collapsed=0
[Window][Diagnostics]
Pos=1190,794
Size=490,406
Pos=863,794
Size=817,406
Collapsed=0
DockId=0x00000006,0
[Window][Context Hub]
Pos=0,17
Size=270,728
Size=432,858
Collapsed=0
DockId=0x00000011,0
DockId=0x00000007,0
[Window][AI Settings Hub]
Pos=406,17
@@ -108,46 +107,45 @@ Collapsed=0
DockId=0x0000000D,0
[Window][Discussion Hub]
Pos=1190,17
Size=490,775
Pos=863,17
Size=817,775
Collapsed=0
DockId=0x00000005,0
[Window][Operations Hub]
Pos=272,17
Size=916,1183
Pos=434,17
Size=427,858
Collapsed=0
DockId=0x00000010,0
DockId=0x0000000E,0
[Window][Files & Media]
Pos=0,17
Size=270,728
Size=432,858
Collapsed=0
DockId=0x00000011,1
DockId=0x00000007,1
[Window][AI Settings]
Pos=0,747
Size=270,453
Pos=0,877
Size=861,323
Collapsed=0
DockId=0x00000012,0
DockId=0x00000013,0
[Docking][Data]
DockNode ID=0x00000007 Pos=43,95 Size=897,1896 Split=Y
DockNode ID=0x00000002 Parent=0x00000007 SizeRef=1029,1119 Selected=0x8CA2375C
DockNode ID=0x00000001 Parent=0x00000007 SizeRef=1029,775 Selected=0x8B4EBFA6
DockNode ID=0x00000008 Pos=3125,170 Size=593,1157 Split=Y
DockNode ID=0x00000009 Parent=0x00000008 SizeRef=1029,147 Selected=0x0469CA7A
DockNode ID=0x0000000A Parent=0x00000008 SizeRef=1029,145 Selected=0xDF822E02
DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=216,256 Size=1680,1183 Split=Y
DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,17 Size=1680,1183 Split=Y
DockNode ID=0x0000000C Parent=0xAFC85805 SizeRef=1362,1041 Split=X Selected=0x5D11106F
DockNode ID=0x00000003 Parent=0x0000000C SizeRef=1188,1183 Split=X
DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=X Selected=0xF4139CA2
DockNode ID=0x0000000E Parent=0x0000000B SizeRef=270,1183 Split=Y Selected=0xF4139CA2
DockNode ID=0x00000011 Parent=0x0000000E SizeRef=422,728 CentralNode=1 Selected=0xF4139CA2
DockNode ID=0x00000012 Parent=0x0000000E SizeRef=422,453 Selected=0x7BD57D6A
DockNode ID=0x00000010 Parent=0x0000000B SizeRef=916,1183 Selected=0x418C7449
DockNode ID=0x00000003 Parent=0x0000000C SizeRef=861,1183 Split=X
DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=Y Selected=0xF4139CA2
DockNode ID=0x00000002 Parent=0x0000000B SizeRef=1029,1119 Split=Y Selected=0xF4139CA2
DockNode ID=0x00000010 Parent=0x00000002 SizeRef=432,328 Split=X Selected=0x8CA2375C
DockNode ID=0x00000007 Parent=0x00000010 SizeRef=432,858 CentralNode=1 Selected=0x8CA2375C
DockNode ID=0x0000000E Parent=0x00000010 SizeRef=427,858 Selected=0x418C7449
DockNode ID=0x00000013 Parent=0x00000002 SizeRef=432,323 Selected=0x7BD57D6A
DockNode ID=0x00000001 Parent=0x0000000B SizeRef=1029,775 Selected=0x8B4EBFA6
DockNode ID=0x0000000D Parent=0x00000003 SizeRef=435,1186 Selected=0x363E93D6
DockNode ID=0x00000004 Parent=0x0000000C SizeRef=490,1183 Split=Y Selected=0x418C7449
DockNode ID=0x00000004 Parent=0x0000000C SizeRef=817,1183 Split=Y Selected=0x418C7449
DockNode ID=0x00000005 Parent=0x00000004 SizeRef=837,775 Selected=0x6F2B5B04
DockNode ID=0x00000006 Parent=0x00000004 SizeRef=837,406 Selected=0xB4CBF21A
DockNode ID=0x0000000F Parent=0xAFC85805 SizeRef=1362,451 Selected=0xDD6419BC

View File

@@ -35,5 +35,5 @@ active = "main"
[discussion.discussions.main]
git_commit = ""
last_updated = "2026-02-24T19:59:19"
last_updated = "2026-02-24T21:55:23"
history = []

View File

@@ -4,6 +4,13 @@ import time
import requests
import os
import signal
import sys
import os
# Ensure project root is in path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from api_hook_client import ApiHookClient
def kill_process_tree(pid):
"""Robustly kills a process and all its children."""
@@ -67,10 +74,17 @@ def live_gui(request):
kill_process_tree(process.pid)
pytest.fail(f"Failed to start {gui_script} with test hooks.")
client = ApiHookClient() # Initialize client here
try:
yield process, gui_script
finally:
print(f"\n[Fixture] Finally block triggered: Shutting down {gui_script}...")
# Reset the GUI state before shutting down
try:
client.reset_session()
time.sleep(1) # Give GUI time to process reset
except Exception as e:
print(f"[Fixture] Error resetting GUI session: {e}")
kill_process_tree(process.pid)
log_file.close()

View File

@@ -38,58 +38,5 @@ auto_add = true
[discussion.discussions.main]
git_commit = ""
last_updated = "2026-02-24T19:59:10"
history = [
"@1771981100.9238136\nUser:\nStress test entry 0 Stress test entry 0 Stress test entry 0 Stress test entry 0 Stress test entry 0",
"@1771981100.9238136\nUser:\nStress test entry 1 Stress test entry 1 Stress test entry 1 Stress test entry 1 Stress test entry 1",
"@1771981100.9238136\nUser:\nStress test entry 2 Stress test entry 2 Stress test entry 2 Stress test entry 2 Stress test entry 2",
"@1771981100.9238136\nUser:\nStress test entry 3 Stress test entry 3 Stress test entry 3 Stress test entry 3 Stress test entry 3",
"@1771981100.9238136\nUser:\nStress test entry 4 Stress test entry 4 Stress test entry 4 Stress test entry 4 Stress test entry 4",
"@1771981100.9238136\nUser:\nStress test entry 5 Stress test entry 5 Stress test entry 5 Stress test entry 5 Stress test entry 5",
"@1771981100.9238136\nUser:\nStress test entry 6 Stress test entry 6 Stress test entry 6 Stress test entry 6 Stress test entry 6",
"@1771981100.9238136\nUser:\nStress test entry 7 Stress test entry 7 Stress test entry 7 Stress test entry 7 Stress test entry 7",
"@1771981100.9238136\nUser:\nStress test entry 8 Stress test entry 8 Stress test entry 8 Stress test entry 8 Stress test entry 8",
"@1771981100.9238136\nUser:\nStress test entry 9 Stress test entry 9 Stress test entry 9 Stress test entry 9 Stress test entry 9",
"@1771981100.9238136\nUser:\nStress test entry 10 Stress test entry 10 Stress test entry 10 Stress test entry 10 Stress test entry 10",
"@1771981100.9238136\nUser:\nStress test entry 11 Stress test entry 11 Stress test entry 11 Stress test entry 11 Stress test entry 11",
"@1771981100.9238136\nUser:\nStress test entry 12 Stress test entry 12 Stress test entry 12 Stress test entry 12 Stress test entry 12",
"@1771981100.9238136\nUser:\nStress test entry 13 Stress test entry 13 Stress test entry 13 Stress test entry 13 Stress test entry 13",
"@1771981100.9238136\nUser:\nStress test entry 14 Stress test entry 14 Stress test entry 14 Stress test entry 14 Stress test entry 14",
"@1771981100.9238136\nUser:\nStress test entry 15 Stress test entry 15 Stress test entry 15 Stress test entry 15 Stress test entry 15",
"@1771981100.9238136\nUser:\nStress test entry 16 Stress test entry 16 Stress test entry 16 Stress test entry 16 Stress test entry 16",
"@1771981100.9238136\nUser:\nStress test entry 17 Stress test entry 17 Stress test entry 17 Stress test entry 17 Stress test entry 17",
"@1771981100.9238136\nUser:\nStress test entry 18 Stress test entry 18 Stress test entry 18 Stress test entry 18 Stress test entry 18",
"@1771981100.9238136\nUser:\nStress test entry 19 Stress test entry 19 Stress test entry 19 Stress test entry 19 Stress test entry 19",
"@1771981100.9238136\nUser:\nStress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20",
"@1771981100.9238136\nUser:\nStress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21",
"@1771981100.9238136\nUser:\nStress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22",
"@1771981100.9238136\nUser:\nStress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23",
"@1771981100.9238136\nUser:\nStress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24",
"@1771981100.9238136\nUser:\nStress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25",
"@1771981100.9238136\nUser:\nStress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26",
"@1771981100.9238136\nUser:\nStress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27",
"@1771981100.9238136\nUser:\nStress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28",
"@1771981100.9238136\nUser:\nStress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29",
"@1771981100.9238136\nUser:\nStress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30",
"@1771981100.9238136\nUser:\nStress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31",
"@1771981100.9238136\nUser:\nStress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32",
"@1771981100.9238136\nUser:\nStress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33",
"@1771981100.9238136\nUser:\nStress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34",
"@1771981100.9238136\nUser:\nStress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35",
"@1771981100.9238136\nUser:\nStress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36",
"@1771981100.9238136\nUser:\nStress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37",
"@1771981100.9238136\nUser:\nStress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38",
"@1771981100.9238136\nUser:\nStress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39",
"@1771981100.9238136\nUser:\nStress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40",
"@1771981100.9238136\nUser:\nStress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41",
"@1771981100.9238136\nUser:\nStress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42",
"@1771981100.9238136\nUser:\nStress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43",
"@1771981100.9238136\nUser:\nStress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44",
"@1771981100.9238136\nUser:\nStress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45",
"@1771981100.9238136\nUser:\nStress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46",
"@1771981100.9238136\nUser:\nStress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47",
"@1771981100.9238136\nUser:\nStress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48",
"@1771981100.9238136\nUser:\nStress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49",
"@2026-02-24T19:58:27\nUser:\nHello! This is an automated test. Just say 'Acknowledged'.",
"@2026-02-24T19:58:29\nAI:\nAcknowledged",
]
last_updated = "2026-02-24T21:55:18"
history = []

View File

@@ -9,18 +9,18 @@ from unittest.mock import patch
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from api_hook_client import ApiHookClient
import gui
import gui_legacy
def test_hooks_enabled_via_cli():
with patch.object(sys, 'argv', ['gui.py', '--enable-test-hooks']):
app = gui.App()
with patch.object(sys, 'argv', ['gui_legacy.py', '--enable-test-hooks']):
app = gui_legacy.App()
assert app.test_hooks_enabled is True
def test_hooks_disabled_by_default():
with patch.object(sys, 'argv', ['gui.py']):
with patch.object(sys, 'argv', ['gui_legacy.py']):
if 'SLOP_TEST_HOOKS' in os.environ:
del os.environ['SLOP_TEST_HOOKS']
app = gui.App()
app = gui_legacy.App()
assert getattr(app, 'test_hooks_enabled', False) is False
def test_live_hook_server_responses(live_gui):