conductor(checkpoint): Checkpoint end of Phase 1 - History Core Logic

This commit is contained in:
2026-05-04 23:39:10 -04:00
parent ca0bff684f
commit 9a699a5d91
3 changed files with 56 additions and 16 deletions
+40
View File
@@ -0,0 +1,40 @@
import sys
import os
# Add src to path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
from src.history import HistoryManager
def verify_phase_1():
print("Verifying Phase 1: History Core Logic...")
hm = HistoryManager(max_capacity=10)
# Test push
hm.push({"test": 1}, "initial")
if not hm.can_undo:
print("Error: can_undo should be true after push")
sys.exit(1)
# Test undo
entry = hm.undo({"test": 2}, "current")
if entry.state != {"test": 1}:
print(f"Error: expected state {{'test': 1}}, got {entry.state}")
sys.exit(1)
if entry.description != "initial":
print(f"Error: expected description 'initial', got {entry.description}")
sys.exit(1)
# Test redo
entry = hm.redo({"test": 1}, "back")
if entry.state != {"test": 2}:
print(f"Error: expected state {{'test': 2}}, got {entry.state}")
sys.exit(1)
if entry.description != "current":
print(f"Error: expected description 'current', got {entry.description}")
sys.exit(1)
print("Phase 1 verification PASSED.")
if __name__ == "__main__":
verify_phase_1()
+1 -1
View File
@@ -87,7 +87,7 @@ This file tracks all major tracks for the project. Each track has its own detail
*Link: [./tracks/discussion_hub_panel_reorganization_20260322/](./tracks/discussion_hub_panel_reorganization_20260322/)*
*Goal: Properly merge Session Hub into Discussion Hub (4 tabs: Discussion | Context Composition | Snapshot | Takes), establish Files & Media as project-level inventory, deprecate ui_summary_only, implement Context Composition and DAW-style Takes.*
10. [ ] **Track: Undo/Redo History Support**
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.*
+15 -15
View File
@@ -102,26 +102,26 @@ Collapsed=0
DockId=0x0000000D,0
[Window][Discussion Hub]
Pos=973,24
Size=1420,1443
Pos=1224,24
Size=1646,1800
Collapsed=0
DockId=0x00000006,0
[Window][Operations Hub]
Pos=0,24
Size=971,1443
Size=1222,1800
Collapsed=0
DockId=0x00000005,2
[Window][Files & Media]
Pos=973,24
Size=1420,1443
Pos=1224,24
Size=1646,1800
Collapsed=0
DockId=0x00000006,1
[Window][AI Settings]
Pos=0,24
Size=971,1443
Size=1222,1800
Collapsed=0
DockId=0x00000005,0
@@ -131,16 +131,16 @@ Size=416,325
Collapsed=0
[Window][MMA Dashboard]
Pos=973,24
Size=1420,1443
Pos=1224,24
Size=1646,1800
Collapsed=0
DockId=0x00000006,2
[Window][Log Management]
Pos=3360,26
Size=480,2134
Pos=1224,24
Size=1646,1800
Collapsed=0
DockId=0x00000004,0
DockId=0x00000006,3
[Window][Track Proposal]
Pos=709,326
@@ -407,7 +407,7 @@ DockId=0x00000006,1
[Window][Project Settings]
Pos=0,24
Size=971,1443
Size=1222,1800
Collapsed=0
DockId=0x00000005,1
@@ -535,12 +535,12 @@ Column 2 Width=150
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=0,24 Size=2393,1443 Split=X
DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,24 Size=2870,1800 Split=X
DockNode ID=0x00000003 Parent=0xAFC85805 SizeRef=2175,1183 Split=X
DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=X Selected=0xF4139CA2
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=1512,858 Split=X Selected=0x8CA2375C
DockNode ID=0x00000005 Parent=0x00000007 SizeRef=971,1681 CentralNode=1 Selected=0x7BD57D6A
DockNode ID=0x00000006 Parent=0x00000007 SizeRef=1420,1681 Selected=0x6F2B5B04
DockNode ID=0x00000005 Parent=0x00000007 SizeRef=1222,1681 CentralNode=1 Selected=0x7BD57D6A
DockNode ID=0x00000006 Parent=0x00000007 SizeRef=1646,1681 Selected=0x6F2B5B04
DockNode ID=0x0000000E Parent=0x0000000B SizeRef=1777,858 Selected=0x418C7449
DockNode ID=0x0000000D Parent=0x00000003 SizeRef=435,1186 Selected=0x363E93D6
DockNode ID=0x00000004 Parent=0xAFC85805 SizeRef=1162,1183 Split=X Selected=0x3AEC3498