From db1f74997caad946b91bdb98cfe3a32a0a676a6e Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 11 Mar 2026 19:45:55 -0400 Subject: [PATCH] chore(conductor): Add new track 'Undo/Redo History Support' --- conductor/tracks.md | 4 ++ .../undo_redo_history_20260311/index.md | 5 +++ .../undo_redo_history_20260311/metadata.json | 8 ++++ .../tracks/undo_redo_history_20260311/plan.md | 29 ++++++++++++++ .../tracks/undo_redo_history_20260311/spec.md | 38 +++++++++++++++++++ 5 files changed, 84 insertions(+) create mode 100644 conductor/tracks/undo_redo_history_20260311/index.md create mode 100644 conductor/tracks/undo_redo_history_20260311/metadata.json create mode 100644 conductor/tracks/undo_redo_history_20260311/plan.md create mode 100644 conductor/tracks/undo_redo_history_20260311/spec.md diff --git a/conductor/tracks.md b/conductor/tracks.md index ca9abc7..b32d683 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -73,6 +73,10 @@ This file tracks all major tracks for the project. Each track has its own detail *Link: [./tracks/discussion_takes_branching_20260311/](./tracks/discussion_takes_branching_20260311/)* *Goal: Non-linear discussion timelines via tabbed "takes", message branching, and synthesis generation workflows.* +10. [ ] **Track: Undo/Redo History Support** + *Link: [./tracks/undo_redo_history_20260311/](./tracks/undo_redo_history_20260311/)* + *Goal: Robust, non-provider based undo/redo for text inputs, UI controls, discussion mutations, and context management. Includes hotkey support and a history list view.* + --- ### Additional Language Support diff --git a/conductor/tracks/undo_redo_history_20260311/index.md b/conductor/tracks/undo_redo_history_20260311/index.md new file mode 100644 index 0000000..f66bc28 --- /dev/null +++ b/conductor/tracks/undo_redo_history_20260311/index.md @@ -0,0 +1,5 @@ +# Track undo_redo_history_20260311 Context + +- [Specification](./spec.md) +- [Implementation Plan](./plan.md) +- [Metadata](./metadata.json) diff --git a/conductor/tracks/undo_redo_history_20260311/metadata.json b/conductor/tracks/undo_redo_history_20260311/metadata.json new file mode 100644 index 0000000..d2e4637 --- /dev/null +++ b/conductor/tracks/undo_redo_history_20260311/metadata.json @@ -0,0 +1,8 @@ +{ + "track_id": "undo_redo_history_20260311", + "type": "feature", + "status": "new", + "created_at": "2026-03-11T20:15:00Z", + "updated_at": "2026-03-11T20:15:00Z", + "description": "Undo/Redo history support for non-provider based user actions: text inputs, UI controls, discussion structure, and context management." +} diff --git a/conductor/tracks/undo_redo_history_20260311/plan.md b/conductor/tracks/undo_redo_history_20260311/plan.md new file mode 100644 index 0000000..6cfc7cd --- /dev/null +++ b/conductor/tracks/undo_redo_history_20260311/plan.md @@ -0,0 +1,29 @@ +# Implementation Plan: Undo/Redo History Support + +This plan implements a robust undo/redo system focusing on text inputs, control states, and discussion structure. + +## Phase 1: History Core Logic & State Management +- [ ] Task: Design and implement a generic `HistoryManager` class to handle undo/redo stacks and state snapshots. +- [ ] Task: Write failing tests for the `HistoryManager` core logic, including capacity limits and basic undo/redo functionality. +- [ ] Task: Implement `HistoryManager` to pass tests, ensuring it correctly manages a fixed stack of 50-100 actions. +- [ ] Task: Conductor - User Manual Verification 'Phase 1: History Core Logic & State Management' (Protocol in workflow.md) + +## Phase 2: Text Input & Control Undo/Redo +- [ ] Task: Integrate `HistoryManager` with `src/gui_2.py` for system prompt and discussion entry text fields. +- [ ] Task: Implement state snapshots for AI model parameter sliders (Temperature, Top-P) and checkboxes. +- [ ] Task: Write simulation tests using `live_gui` to verify undo/redo for text edits and control changes. +- [ ] Task: Conductor - User Manual Verification 'Phase 2: Text Input & Control Undo/Redo' (Protocol in workflow.md) + +## Phase 3: Discussion & Context Structure Mutation +- [ ] Task: Implement undo/redo for adding, deleting, and reordering discussion entries in `src/app_controller.py`. +- [ ] Task: Extend the history system to track context file and screenshot additions/removals in `src/aggregate.py`. +- [ ] Task: Write failing tests for reverting and redoing complex discussion tree mutations. +- [ ] Task: Implement mutation tracking and restoration logic to pass tests. +- [ ] Task: Conductor - User Manual Verification 'Phase 3: Discussion & Context Structure Mutation' (Protocol in workflow.md) + +## Phase 4: UI Features - Hotkeys & History List +- [ ] Task: Implement global hotkey handling for `Ctrl+Z` and `Ctrl+Y` / `Ctrl+Shift+Z` in the main GUI loop. +- [ ] Task: Create a dedicated 'History List' panel in `src/gui_2.py` showing a scrollable list of recent actions. +- [ ] Task: Implement functionality to jump to a specific historical state via the History List. +- [ ] Task: Write final integration tests for the full undo/redo cycle across all supported areas. +- [ ] Task: Conductor - User Manual Verification 'Phase 4: UI Features - Hotkeys & History List' (Protocol in workflow.md) diff --git a/conductor/tracks/undo_redo_history_20260311/spec.md b/conductor/tracks/undo_redo_history_20260311/spec.md new file mode 100644 index 0000000..3aa3cea --- /dev/null +++ b/conductor/tracks/undo_redo_history_20260311/spec.md @@ -0,0 +1,38 @@ +# Specification: Undo/Redo History Support + +## 1. Overview +This track implements a robust, non-provider based Undo/Redo system within the Manual Slop GUI. It allows users to revert and redo common UI actions, focusing on text inputs, control states, and discussion structure, without impacting AI-generated content or remote state. + +## 2. Functional Requirements + +### 2.1 Supported Actions +- **Text Inputs:** Undo/redo for system prompts, discussion entries, and any editable text boxes. +- **UI Controls:** Revert changes to sliders (Temperature, Top-P), checkboxes, and preset selections. +- **Discussion Structure:** Support undo/redo for deleting or inserting discussion entries. +- **Context Management:** Undo/redo for additions and removals of context files and screenshots. + +### 2.2 History Management +- **Capacity:** A fixed limit of 50-100 actions in the undo stack. +- **Scope:** History is session-specific and not persisted between application restarts. +- **Exclusions:** Actions triggering AI vendor API requests or MMA track progression are explicitly excluded from the undo system. + +### 2.3 User Interface +- **Hotkeys:** Implementation of standard `Ctrl+Z` (Undo) and `Ctrl+Y` / `Ctrl+Shift+Z` (Redo) shortcuts. +- **History List View:** A dedicated visual 'History List' panel showing recent actions, allowing users to jump back to specific points in the timeline. + +## 3. Non-Functional Requirements +- **Low Overhead:** The history system must have minimal impact on UI responsiveness. +- **Thread Safety:** Ensure state snapshots and restorations are thread-safe within the GUI loop. + +## 4. Acceptance Criteria +- [ ] Users can undo and redo text edits in the system prompt and discussion fields. +- [ ] UI control changes (sliders, presets) are correctly captured and restorable. +- [ ] Discussion entry deletions/insertions can be reverted and redone. +- [ ] Context additions/removals are tracked in the history. +- [ ] `Ctrl+Z` and `Ctrl+Y` hotkeys work as expected. +- [ ] The History List view accurately displays and allows jumping between states. + +## 5. Out of Scope +- Undo/redo for AI model generations or vendor API calls. +- Undo/redo for MMA execution state transitions. +- Persistent history across application restarts.