@@ -1633,7 +1633,7 @@ <h3>Phases</h3>
16331633 let selection = new Set ( ) ;
16341634 let sortKey = 'status' ;
16351635 let sortDir = 1 ; // 1 asc, -1 desc
1636- let managerState = null ;
1636+ let graphSettings = null ;
16371637 // Stores last execution results (previous iteration) keyed by name
16381638 let lastExecutionResults = new Map ( ) ;
16391639 const enabledStateDisplay = {
@@ -1708,25 +1708,25 @@ <h3>Phases</h3>
17081708 } ) ;
17091709 }
17101710
1711- // Restored: central place to update UI state dependent on managerState
1711+ // Restored: central place to update UI state dependent on graphSettings
17121712 function updateManagerState ( ) {
1713- if ( ! managerState ) return ;
1713+ if ( ! graphSettings ) return ;
17141714 // Sync debug / verbose toggle button states
17151715 if ( debugBtn ) {
1716- if ( managerState . debugMode ) debugBtn . classList . add ( 'active' ) ;
1716+ if ( graphSettings . debugMode ) debugBtn . classList . add ( 'active' ) ;
17171717 else debugBtn . classList . remove ( 'active' ) ;
1718- debugBtn . setAttribute ( 'aria-pressed' , managerState . debugMode ? 'true' : 'false' ) ;
1719- debugBtn . title = managerState . debugMode ? 'Turn off debug logging' : 'Turn on debug logging' ;
1718+ debugBtn . setAttribute ( 'aria-pressed' , graphSettings . debugMode ? 'true' : 'false' ) ;
1719+ debugBtn . title = graphSettings . debugMode ? 'Turn off debug logging' : 'Turn on debug logging' ;
17201720 }
17211721 if ( verboseBtn ) {
1722- if ( managerState . verbose ) verboseBtn . classList . add ( 'active' ) ;
1722+ if ( graphSettings . verbose ) verboseBtn . classList . add ( 'active' ) ;
17231723 else verboseBtn . classList . remove ( 'active' ) ;
1724- verboseBtn . setAttribute ( 'aria-pressed' , managerState . verbose ? 'true' : 'false' ) ;
1725- verboseBtn . title = managerState . verbose ? 'Turn off verbose logging' : 'Turn on verbose logging' ;
1724+ verboseBtn . setAttribute ( 'aria-pressed' , graphSettings . verbose ? 'true' : 'false' ) ;
1725+ verboseBtn . title = graphSettings . verbose ? 'Turn off verbose logging' : 'Turn on verbose logging' ;
17261726 }
17271727 // Update play/pause visual state
17281728 const ppIcon = playPauseBtn . querySelector ( '.codicon' ) ;
1729- if ( ! managerState . pauseNextIteration ) {
1729+ if ( ! graphSettings . pauseNextIteration ) {
17301730 playPauseBtn . classList . add ( 'playing' ) ;
17311731 playPauseBtn . setAttribute ( 'aria-label' , 'Switch to manual (pause)' ) ;
17321732 playPauseBtn . title = 'Pause automatic iterations' ;
@@ -1743,12 +1743,12 @@ <h3>Phases</h3>
17431743 ppIcon . classList . add ( 'codicon-debug-start' ) ;
17441744 }
17451745 }
1746- parallelismInput . value = managerState . parallelism ;
1746+ parallelismInput . value = graphSettings . parallelism ;
17471747 managerStateEl . innerHTML = '' ;
17481748 // Highlight execute button if an iteration is scheduled
17491749 const executeBtn = document . getElementById ( 'execute-btn' ) ;
17501750 if ( executeBtn ) {
1751- if ( managerState . hasScheduledIteration ) {
1751+ if ( graphSettings . hasScheduledIteration ) {
17521752 executeBtn . classList . add ( 'queued' ) ;
17531753 executeBtn . title = 'Run once (changes detected)' ;
17541754 executeBtn . setAttribute ( 'aria-label' , 'Run once (changes detected)' ) ;
@@ -1787,7 +1787,7 @@ <h3>Phases</h3>
17871787 function updateStatusPill ( ) {
17881788 let pillStatus = 'Disconnected' ;
17891789 if ( ws && ws . readyState === WebSocket . OPEN ) {
1790- pillStatus = managerState ?. status || 'Unspecified' ;
1790+ pillStatus = graphSettings ?. status || 'Unspecified' ;
17911791 }
17921792 statusPill . className = '' ;
17931793 statusPill . classList . add ( 'status-pill' , 'status-' + pillStatus ) ;
@@ -1837,7 +1837,7 @@ <h3>Phases</h3>
18371837 ws . addEventListener ( 'open' , ( ) => {
18381838 log ( 'Connected' ) ;
18391839 setConnected ( true ) ;
1840- // Immediately reflect connected pre-sync (managerState may not yet be populated)
1840+ // Immediately reflect connected pre-sync (graphSettings may not yet be populated)
18411841 statusEmojiEl . textContent = statusEmoji ( 'Ready' ) ;
18421842 statusPill . textContent = overallStatusText ( 'Connected' ) ;
18431843 } ) ;
@@ -1916,7 +1916,7 @@ <h3>Phases</h3>
19161916 applyExecutionStates ( msg . currentExecutionStates ) ;
19171917 queuedStates . clear ( ) ;
19181918 if ( msg . queuedStates ) msg . queuedStates . forEach ( ( s ) => queuedStates . set ( s . name , s ) ) ;
1919- managerState = msg . managerState ;
1919+ graphSettings = msg . graphState ;
19201920 if ( msg . lastExecutionResults ) {
19211921 lastExecutionResults = new Map ( ) ;
19221922 msg . lastExecutionResults . forEach ( ( r ) => lastExecutionResults . set ( r . name , r ) ) ;
@@ -1934,7 +1934,7 @@ <h3>Phases</h3>
19341934 break ;
19351935 }
19361936 case 'sync-graph-state' : {
1937- managerState = msg . managerState ;
1937+ graphSettings = msg . graphState ;
19381938 break ;
19391939 }
19401940 case 'iteration-scheduled' : {
@@ -3653,22 +3653,22 @@ <h3>Phases</h3>
36533653 }
36543654 } ) ;
36553655 debugBtn . addEventListener ( 'click' , ( ) => {
3656- const newVal = ! managerState ?. debugMode ;
3656+ const newVal = ! graphSettings ?. debugMode ;
36573657 // Optimistic UI update
36583658 debugBtn . title = newVal ? 'Turn off debug logging' : 'Turn on debug logging' ;
36593659 sendCommand ( { command : 'set-debug' , value : newVal } ) ;
36603660 } ) ;
36613661 verboseBtn . addEventListener ( 'click' , ( ) => {
3662- const newVal = ! managerState ?. verbose ;
3662+ const newVal = ! graphSettings ?. verbose ;
36633663 verboseBtn . title = newVal ? 'Turn off verbose logging' : 'Turn on verbose logging' ;
36643664 sendCommand ( { command : 'set-verbose' , value : newVal } ) ;
36653665 } ) ;
36663666 parallelismInput . addEventListener ( 'change' , ( ) =>
36673667 sendCommand ( { command : 'set-parallelism' , parallelism : Number ( parallelismInput . value ) || 1 } )
36683668 ) ;
36693669 playPauseBtn . addEventListener ( 'click' , ( ) => {
3670- if ( ! managerState ) return ;
3671- const next = ! ! managerState . pauseNextIteration ; // current boolean
3670+ if ( ! graphSettings ) return ;
3671+ const next = ! ! graphSettings . pauseNextIteration ; // current boolean
36723672 // Toggle: if currently paused (true), set to false (resume automatic); otherwise set to true (pause)
36733673 sendCommand ( { command : 'set-pause-next-iteration' , value : ! next } ) ;
36743674 } ) ;
0 commit comments