mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-22 20:29:18 +01:00
The local act helper wrapped flushSync, which flushes render work but not passive effects. The install dialog seeds its state in a useEffect, so tests added a setTimeout(0) hop to give it a chance to run. A setTimeout callback and React's own scheduler task queue in a different order each run, so the hop sometimes lost the race and the test read stale state. Delegate the helper to React's own act, which flushes passive effects before it resolves, and remove the now-unneeded timing hops. Co-authored-by: Paperclip <noreply@paperclip.ing>