Files
stack/agents/darkwing/work/queue-55/out/probe-round3.mjs
T
jason.woltjeandClaude Opus 5.5 26926d183a docs(queue-55): row 55 round 3 candidate packet, R3 and B1 (darkwing)
One rule for Filbert's R3 and Dewey's B1: y resolves only while the
whole decide box is shown. Adds N9 widths, the start-unguarded and
timeout fixes, and two defects found by the cheap tests (wrap at
graphemes, answer render throw). 51/51 mutants killed; gate on
122b1223 green, cli 110.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 14:59:13 -05:00

26 lines
1.2 KiB
JavaScript

import { test } from "node:test";
// The smallest row count that shows a gated decision with a task, per width, for a short and a long
// question. Run: CLI=<checkout>/packages/cli node --test probe-round3.mjs
const CLI = process.env.CLI;
const { App } = await import(`${CLI}/src/app.mjs`);
const { decideShown } = await import(`${CLI}/src/screens.mjs`);
const { broker } = await import(`${CLI}/tests/helpers.mjs`);
test("probe", async (t) => {
for (const long of [false, true]) {
const bus = broker(t);
const question = long ? Array.from({ length: 90 }, (_, i) => `word${i}`).join(" ") : "Push the release?";
bus.raise("git.push.protected", { target: "refactor", blocking: true, task_ref: "vikunja:1/7", question });
const a = new App({ business: "demo", transport: (b) => bus.transport(b), cols: 120, rows: 40, refreshMs: 0, askMs: 0 });
await a.start(); await a.input("1");
const o = a.state.overlay;
const out = [];
for (const cols of [40, 50, 60, 80, 120]) {
let min = null;
for (let rows = 10; rows <= 40; rows++) if (decideShown(o, cols, rows)) { min = rows; break; }
out.push(`${cols}:${min}`);
}
console.log(long ? "long" : "short", out.join(" "));
a.quit("q");
}
});