3.2 KiB
3.2 KiB
Specification: GUIv2 Feature Parity
1. Overview
This track aims to bring gui_2.py (the imgui-bundle based UI) to feature parity with the existing gui.py (the dearpygui based UI). This involves porting several major systems and features to ensure gui_2.py can serve as a viable replacement and support the latest project capabilities like automated testing and advanced diagnostics.
2. Functional Requirements
FR1: Port Core Architectural Systems
- FR1.1: Event-Driven Architecture:
gui_2.pyMUST be refactored to use theevents.pymodule for handling API lifecycle events, decoupling the UI from the AI client. - FR1.2: MCP File Tools Integration:
gui_2.pyMUST integrate and usemcp_client.pyto provide the AI with native, sandboxed file system capabilities (read, list, search).
FR2: Port Major Features
- FR2.1: API Hooks System: The full API hooks system, including
api_hooks.pyandapi_hook_client.py, MUST be integrated intogui_2.py. This will enable external test automation and state inspection. - FR2.2: Performance & Diagnostics: The performance monitoring capabilities from
performance_monitor.pyMUST be integrated. A new "Diagnostics" panel, mirroring the one ingui.py, MUST be created to display real-time metrics (FPS, CPU, Frame Time, etc.). - FR2.3: Prior Session Viewer: The functionality to load and view previous session logs (
.logfiles from the/logsdirectory) MUST be implemented, including the distinctive "tinted" UI theme when viewing a prior session.
FR3: UI/UX Alignment
- FR3.1: 'Hub' UI Layout: The windowing layout of
gui_2.pyMUST be refactored to match the "Hub" paradigm ofgui.py. This includes creating:Context HubAI Settings HubDiscussion HubOperations Hub
- FR3.2: Agent Capability Toggles: The UI MUST include checkboxes or similar controls to allow the user to enable or disable the AI's agent-level tools (e.g.,
run_powershell,read_file). - FR3.3: Full Theme Integration: All new UI components, windows, and controls MUST correctly apply and respond to the application's theming system (
theme_2.py).
3. Non-Functional Requirements
- NFR1: Stability: The application must remain stable and responsive during and after the feature porting.
- NFR2: Maintainability: The new code should follow existing project conventions and be well-structured to ensure maintainability.
4. Acceptance Criteria
- AC1:
gui_2.pysuccessfully launches without errors. - AC2: The "Hub" layout is present and organizes the UI elements as specified.
- AC3: The Diagnostics panel is present and displays updating performance metrics.
- AC4: The API hooks server starts and is reachable when
gui_2.pyis run with the appropriate flag. - AC5: The AI can successfully use file system tools provided by
mcp_client.py. - AC6: The "Prior Session Viewer" can successfully load and display a log file.
- AC7: All new UI elements correctly reflect the selected theme.
5. Out of Scope
- Deprecating or removing
gui.py. Both will coexist for now. - Any new features not already present in
gui.py. This is strictly a porting and alignment task.