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 mode "text": wait until OCR text appears or disappears #318
Agents have to loop find_text themselves to wait for "Build succeeded", paying a model round trip per poll. wait_for_change has pixel polling and find_text has OCR, but nothing joins them.
Where
src/tools/waitForChange.ts:31-36 (mode is change|settle)
src/tools/findText.ts (single grab, no polling)
src/utils/ocr.ts
Impact
Computer-use agents, CI scripts via screencast-mcp call, and golden-flow assertions (#269) would get a one-call wait.
Suggested fix
Add mode: "text" with query, regex, gone?: boolean. Run OCR only after a pixel change (reuse the existing diff) so a static screen costs nothing. Return the match box and elapsed time. Open questions: OCR cost per poll on large targets; minimum interval.
Acceptance criteria
mode text returns on appear/disappear with match box
Done in 0239ea9: wait_for_change mode "text" takes text (with regex and gone options). It OCRs once at the start and again only after a pixel change, then returns the match boxes, elapsed time and ocrReads. Verified with pure loop tests (src/tests/textWait.test.ts: already present, read only after a change, one read for a still screen, gone, cancel) and live calls through the tool layer: gone matched on the first read, an absent string timed out after a single read.
Activity
TMHSDigital commentedon Nov 15, 2026
Done in 0239ea9: wait_for_change mode "text" takes text (with regex and gone options). It OCRs once at the start and again only after a pixel change, then returns the match boxes, elapsed time and ocrReads. Verified with pure loop tests (src/tests/textWait.test.ts: already present, read only after a change, one read for a still screen, gone, cancel) and live calls through the tool layer: gone matched on the first read, an absent string timed out after a single read.