Prechádzať zdrojové kódy

Fix stale "Waiting for next pattern" UI after skipping pause

Clear pause_time_remaining and original_pause_time when a new pattern
starts executing, not just after the pause loop ends. This prevents
stale waiting state from showing in the UI if skip was triggered
during a pause period.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris 2 týždňov pred
rodič
commit
9af82531e4
1 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 4 0
      modules/core/pattern_manager.py

+ 4 - 0
modules/core/pattern_manager.py

@@ -1041,6 +1041,10 @@ async def run_theta_rho_files(file_paths, pause_time=0, clear_pattern=None, run_
                 file_path = state.current_playlist[idx]
                 logger.info(f"Running pattern {idx + 1}/{len(state.current_playlist)}: {file_path}")
 
+                # Clear pause state when starting a new pattern (prevents stale "waiting" UI)
+                state.pause_time_remaining = 0
+                state.original_pause_time = None
+
                 # Execute the pattern with optional clear pattern
                 await run_theta_rho_file(
                     file_path,