@@ -49,12 +49,6 @@ func isTUIActiveCheck() bool {
4949 return isTUIActive
5050}
5151
52- // logIfNotTUI logs only when SSE server is running but TUI is not active
53- func logIfNotTUI (format string , args ... interface {}) {
54- if globalSSEServer != nil && ! isTUIActiveCheck () {
55- log .Printf (format , args ... )
56- }
57- }
5852
5953func main () {
6054 // Handle command-line flags
@@ -383,26 +377,24 @@ func handleTUIShutdown(tuiApp *TUIApp) {
383377 defer ticker .Stop ()
384378
385379 for time .Now ().Before (deadline ) {
386- select {
387- case <- ticker .C :
388- // Count remaining processes
389- remainingCount := 0
390- for _ , tracker := range runningProcesses {
391- tracker .Mutex .RLock ()
392- if tracker .Status == StatusRunning || tracker .Status == StatusPending {
393- remainingCount ++
394- }
395- tracker .Mutex .RUnlock ()
380+ <- ticker .C
381+ // Count remaining processes
382+ remainingCount := 0
383+ for _ , tracker := range runningProcesses {
384+ tracker .Mutex .RLock ()
385+ if tracker .Status == StatusRunning || tracker .Status == StatusPending {
386+ remainingCount ++
396387 }
388+ tracker .Mutex .RUnlock ()
389+ }
397390
398- // Update modal
399- modal .UpdateProgress (remainingCount , totalProcesses )
391+ // Update modal
392+ modal .UpdateProgress (remainingCount , totalProcesses )
400393
401- if remainingCount == 0 {
402- // All processes terminated
403- time .Sleep (200 * time .Millisecond ) // Brief pause to show success
404- return
405- }
394+ if remainingCount == 0 {
395+ // All processes terminated
396+ time .Sleep (200 * time .Millisecond ) // Brief pause to show success
397+ return
406398 }
407399 }
408400
0 commit comments