mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Unit Tests went red on main after #639 with one failure: the Escape test saw a fully rendered dialog but zero apiPut calls, so the handler never ran. Escape is the only control in that file wired through a document listener in a passive effect; every other control is an onClick prop attached at commit, which is why the sibling close-button test passed in the same run. Could not reproduce it: 50 isolated and whole-file runs stayed green, and a probe counting document keydown registrations shows the listener is already attached when findByText resolves locally, so the window only opens under CI contention. Rather than bet on an unconfirmed mechanism, settle effects and retry the dispatch until the dismissal lands. handleDismiss guards on `busy` and the settings write is idempotent, so repeats are harmless. Still non-vacuous: pointing the handler at a key that never fires fails the test in about a second. 30 consecutive whole-file runs clean, full unit suite 7,474 passing.