Files
stack/agents/darkwing/work/queue-69/build.md
T
jason.woltjeandClaude Opus 5.5 544563e3f5 agents: darkwing row 69 build packet (#1562)
Hidden decide box names the way out, its status line stops promising y,
tests for the narrow-terminal guard, U+18D08 and a cut help or detail
box. Candidate manifest c68e6582. Mutants 6/6 killed; gate 13 suites
green on dad20531 plus build.patch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 17:59:51 -05:00

5.7 KiB

Row 69, terminal app follow-up after row 55, build (Darkwing)

Issue #1562. Brief: docs/plans/2026-10-11_terminal-app-follow-up.md. Reviewers: Dewey and Filbert. The notes come from row 55 round 3: Dewey's comment 27308 and Filbert's comment 27309.

Base dad20531. No commit from dad20531 to 15ed3513 touches the four paths. Row 92's 57948a81 changed packages/cli/README.md after the old base the row was opened on, so I started from a fresh worktree.

build.patch is git diff --binary dad20531 of the four paths. Apply it with git apply --index to a detached worktree of dad20531, and sha256sum -c candidate-manifest.sha256 then gives 4/4 OK (checked on a fresh worktree).

What changed

  • packages/cli/src/screens.mjs, the hidden box only. It gains a third line, "Resize, or use mosaic decide.", shown while asking and while resolving.
  • packages/cli/src/app.mjs, render() only. While the overlay is a decide box and decideShown() is false, the frame's status line says "Too small to confirm here." in the warning style. state.status is left alone, so when the terminal grows and the box shows again, the Inbox's "Press 1-n to choose. You will see the decision again and confirm with y." comes back with it. Nothing else about y changed.
  • packages/cli/tests/app.test.mjs: three tests and one code point.
  • packages/cli/README.md: the hidden box's text, the status line, the too-small screen under 40 columns at any height, and the row counts as an example for a plain decision.

Two choices

The way out is short because of the smallest frame. At 40x10 the body has 5 rows and the box is 38 cells wide, 34 inside. The brief's sentence, "Make the terminal bigger, or use mosaic decide .", wraps to two rows there, so the box is 6 rows and draw()'s general cut keeps the top, a cut line and the last two rows. That drops "Any key answers No." and adds a cut line pointing at mosaic inbox --json. "Resize, or use mosaic decide." is 29 cells, so the hidden box is 5 rows at every size and is never cut. The second test pins that at 40x10. The tradeoff: the box no longer spells out <decision> <option>; mosaic decide prints its usage.

The status text is 26 cells for the same reason. "Too small to confirm this decision here." filled a 40-column status line and lost its last character to the ellipsis.

The tests

Test What it pins From
under 40 columns a tall terminal shows the too-small screen even where the decide box would fit; y sends nothing at 39x29, 35x31, 30x35, 39x33, 39x40, 39x60, 36x60 and 30x80, 1 then y shows the too-small screen with "A decision question is open; any key answers No." and sends no decision.resolve. Then every size from 30 to 39 columns and 33 to 60 rows, short and long question: decideShown() is false and draw() gives the too-small screen Filbert N10, Dewey r3-shown-no-min; Dewey's and Filbert's probe sizes
a hidden decide box names the way out, and the status line under it does not promise y at 80x24 the status says "confirm with y." before and after 1; shrunk to 80x18 the box shows its three lines, the status says "Too small to confirm here." and nothing on screen says "with y"; grown back, both return; at 40x10 the hidden box is whole, with no cut line; y then sends nothing Filbert N12, Dewey's note
width counts terminal cells (existing) U+18D08 measures 2 Filbert N11
help or a detail box cut to fit keeps its last line, Esc included at 80x10 the cut help keeps the row the full help ends on (the wrapped end of "Esc closes this help."), and a cut decision detail keeps │ Esc back │ Dewey cut-drops-choice

Mutants

mutants.sh runs the brief's four and two on this row's own lines, with a copy of agents/darkwing/work/queue-59-review/r1/mut.mjs (sha256 a1ed6bca…) against packages/cli/tests/app.test.mjs, 22:49:16Z to 22:51:14Z, after a check that exits on another seat's gate or mutant run. 6 of 6 killed (mutants.txt). Every file was restored and still matches the manifest.

Mutant Edit Killed by
shown-no-min-cols decideShown without cols >= MIN_COLS under 40 columns a tall terminal…
r3-shown-no-min decideShown without the 40x10 check under 40 columns a tall terminal…
n9-17000-end-off 0x18d08 to 0x18cff width counts terminal cells…
cut-drops-choice the general cut keeps one tail row, not two help or a detail box cut to fit…
hidden-no-way-out the hidden box without its third line a hidden decide box names the way out…
hidden-status-promises-y render() never swaps the status a hidden decide box names the way out…

Each dies in its own test and in no other.

Found, not fixed

When help is cut, its cut line says "the whole text is in mosaic inbox --json". Help has no whole, so draw() falls back to the decide box's pointer, which is wrong for help (? shows the whole help on a taller terminal). The help test's screen at 80x10 shows it. That line sits in draw(), outside this row's lines of screens.mjs, so I left it for a follow-up.

Gate

gate.sh, run sequentially in ~/darkwing-scratch/r69/wt (dad20531 plus this patch, node_modules symlinked), 22:56:22Z to 22:59:22Z, after the busy check found no other seat's run for two minutes (gate-summary.txt). All 13 suites exited 0, 0 skipped:

  • node: cli 123 (row 55's 120 plus the three new tests), queue 150;
  • scripts: auth 15, conductor 17, config 24, discord 66, extension-package 18, foundation 44, queue 27, release 14, task 26 (DOCKER_HOST at a dead socket).

test-release left an empty wt_default network, created at 22:59:08Z inside my test-release window, and I removed it.