Skip to content

An agent skill for creating detailed, interactive isometric illustrations of real-world machines and complex systems. Generates polished SVGs with optional WebGL shaders and 3D effects.

fix(drive): fail when an until action times out

aakash-kharb2561487524cf
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8152ae2..dca2609 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ All notable changes to Anatomy are recorded here. The format follows [Keep a Cha
### Fixed
+- `scripts/drive.mjs` now exits with status 1 and stops subsequent actions when an `until` condition times out.
+
- `examples/test-rig/` drew its glass button dark in the light theme. `stretch.css` now has light values for its own colours.
### Changed
diff --git a/scripts/drive.mjs b/scripts/drive.mjs
index ef2c90b..32bcb26 100644
--- a/scripts/drive.mjs
+++ b/scripts/drive.mjs
@@ -38,7 +38,7 @@ Fractions are 0..1 across the element.
pass code for keys that share a name ("Shift" + "ShiftRight", "Enter" + "NumpadEnter")
["slow", factor] run the page's requestAnimationFrame and performance.now clock at factor x real
time (0.05 = 20x slow motion) so sheets catch 100 ms events; ["slow", 1] restores it
- ["until", js, timeoutMs?] poll a JS expression until it is truthy (default 10 s), e.g. a readout reaching a phase
+ ["until", js, timeoutMs?] poll a JS expression until it is truthy (default 10 s); a timeout stops the run with exit 1
["eval", js] run JS in the page and print the result
["shot", out.png, sel?, scale?, [x,y,w,h]?] screenshot an element, or a region of it in CSS px
["lines", out.png?, sel?, options?] check every texture line's two ends: each must land on a stroke, a dot or an outline
@@ -236,7 +236,7 @@ async function main() {
}
await sleep(25);
}
- if (!ok) console.log(`until: timed out waiting for ${args[0]}`);
+ if (!ok) throw new Error(`until: timed out waiting for ${args[0]}`);
}
else if (kind === "shot") {
const [out, selector, scale, region] = args;