mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 16:02:28 +00:00
70b90c41dc
* fix: prevent React app editor from overwriting files on theme switch The ui_builder iframe src embeds the dark-mode flag, so toggling theme reloads it. iframeLoaded was sticky-true, so the populate effect didn't refire and the iframe's default "Hello World" template clobbered the user's files via its initial setFiles message. Reset iframeLoaded on darkMode change and suppress inbound setFiles from the iframe until our files are re-pushed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix: cancel suppress timer on rapid theme toggles On a second theme toggle while the previous reload's clear-timer was still pending, that timer would fire mid-reload and drop suppression before the iframe finished booting — letting the iframe's default template setFiles overwrite the user's files. Track the timer ID, cancel it whenever we re-assert suppression, and fold the two 500ms timers into one. Race identified by cubic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>