You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wait_for_change and screen_diff: ignore regions, so a clock or spinner does not defeat them #400
Reuse idleOptionFields.ignoreRegions (same rect shape, same max) on wait_for_change and screen_diff, in target/image pixels.
Where
src/tools/waitForChange.ts:31-81
src/tools/screenDiff.ts:23-33
src/utils/diff.ts:97-135
src/utils/idle.ts:39-57
Problem
wait_for_change's inputs are target, exactTitle, mode change|settle|text, text/regex/gone, backend, alwaysOnTop, timeoutSec, settleSec, intervalMs, pixelThreshold, returnImage, keep; screen_diff's are a, b, pixelThreshold, returnImage. diffFrames (diff.ts:111) compares every 8x8 cell with no mask. cut_idle already solved the same problem: ignoreRegions: idleOptionFields.ignoreRegions.describe("Rectangles (a clock) left out of the freeze check.") (idle.ts:44), masked with drawbox at idle.ts:57.
Who benefits
mode: "settle" never settles and mode: "change" returns immediately on a target with a taskbar clock, a blinking caret, a progress spinner, or a live log pane, so agents fall back to fixed sleeps, which the server instructions tell them not to do. screen_diff reports the clock as a changed region in every before/after check, adding noise to UI verification.
Proposal
Reuse idleOptionFields.ignoreRegions (same rect shape, same max) on wait_for_change and screen_diff, in target/image pixels. Zero those rectangles in both bitmaps before diffFrames (or add an ignore: Rect[] to DiffOptions that skips cells overlapping them), scaled through the existing analysis-size factor. For text mode, drop OCR matches inside ignored rects.
Activity