Commits
Marek Vsechovsky committed 0c237ec8ffa
Session 151, Step 7: Continue re-checking output file for changes after it is deemed finished; update Wf S4 UI dynamically - AIM-2814 Continue re-checking output file for changes after it is deemed finished; update Wf S4 UI dynamically Outcome: **AIM-2814:** Replaced per-task recheck timers with a single global timer (`_startS4GlobalRecheckTimer`) that monitors all active S4 tabs simultaneously. Added state comparison guard in `updateS4TaskInPlace` to prevent full re-renders when validation state is unchanged. Removed forced tab switch from `_notifyS4TaskStateChange` that was causing the UI to jump to whichever task the global timer just validated. Replaced CSS animation with `requestAnimationFrame`-driven progress bars. Made timer idempotent to prevent bar resets on tab switch. Removed competing signal timer that caused button flickering. Fixed broken async recheck guard, removed dead renderS4ValidationRow, fixed permanent signal stop. Removed competing 5s file recheck timer. Fixed F.toast to toast. **`dashboard-workflow.js` — Fixed broken recheck-in-progress guard (async race):** - `_recheckInProgress` was set/unset synchronously around the async `validateS4Task()` call, so it was always `false` by the time `_finishS4Validation` ran. Every validation caused a full UI re-render. - Moved `_recheckInProgress = true` into the async path (before `_finishS4Validation`) and `_recheckInProgress = false` after each `s4TaskUpdated` call in all three exit paths (success, warning, error) - Removed the broken sync-around-async `_recheckInProgress` and `_validationInProgress` flags from the global timer **`dashboard-workflow.js` — Removed dead `renderS4ValidationRow` function:** - Had zero callers — buttons are rendered directly in `renderS4DynamicArea` (s >= 5 block) - Removed 80 lines of dead code **`dashboard-workflow.js` — Fixed signal restart after stop (permanent):** - `_wfS4SignalStarted` is no longer reset on stop, preventing `_notifyS4TaskStateChange` from restarting the signal - Added guard in `renderS4DynamicArea`: only calls `wfStartS4ReadySignal` if `!task._wfS4SignalStarted` Progress bars across all tabs now reset simultaneously on each timer tick, and newly rendered bars are positioned at the correct cycle point via `animation-delay`.