From 79d9fc2d56586b4b665c62ac3b197a3eb08f9e6d Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sun, 11 Oct 2026 16:06:11 -0500 Subject: [PATCH] feat(cli): full-screen terminal app (#1544, row 55) Bare `mosaic` on a terminal opens the app. It has Inbox, Tasks, Agents and Trail screens, help, and a decide overlay, and it uses the alternate screen, raw mode, resize and SIGTERM, and restores the terminal on exit. draw(state) in screens.mjs is pure. cli.mjs exports resolveDecision, which `mosaic decide` and the app share, so both write the same lines and ask the same question. A decision resolves on `y` only while decideShown() says the whole decide box is on screen. The app reads that at the key. A box that doesn't fit is replaced by "Too small to show this decision", and any key answers No. scripts/mosaic sends no arguments to packages/cli (a decided scope addition), so the queue dispatch test follows. The cli README and docs/TOOLS.md describe the app. Darkwing built it (agents/darkwing/work/queue-55), in three rounds. Round 3 was approved by Dewey (27308) and Filbert (27309) on manifest 59f1b9b4, 9 paths. Their non-blocking notes go to row 69 (#1562): a narrow-terminal test for the decideShown MIN_COLS guard, a way out from the hidden box, a U+18D08 width test, a cut box keeping Esc back, and the README row count stated as an example. Sage's gate on 3634d06e, sequential and teed: node suites cli 110 and queue 150, 0 failed; test-auth 15, test-conductor 17, test-config 24, test-discord 66, test-extension-package 18, test-foundation 44, test-queue 27, test-release 14, test-task 98, all 0 failed (Docker on). 122b1223..3634d06e touches none of the 9 paths. Co-Authored-By: Claude Opus 5.5 --- docs/TOOLS.md | 5 + packages/cli/README.md | 76 ++- packages/cli/src/app.mjs | 489 ++++++++++++++ packages/cli/src/cli.mjs | 52 +- packages/cli/src/format.mjs | 2 +- packages/cli/src/screens.mjs | 429 ++++++++++++ packages/cli/tests/app.test.mjs | 868 +++++++++++++++++++++++++ packages/queue/tests/dispatch.test.mjs | 23 +- scripts/mosaic | 4 + 9 files changed, 1932 insertions(+), 16 deletions(-) create mode 100644 packages/cli/src/app.mjs create mode 100644 packages/cli/src/screens.mjs create mode 100644 packages/cli/tests/app.test.mjs diff --git a/docs/TOOLS.md b/docs/TOOLS.md index b96e9012f..5a675611f 100644 --- a/docs/TOOLS.md +++ b/docs/TOOLS.md @@ -193,6 +193,7 @@ config problem · `4` usage or a required file missing. Details: ## Inbox, decisions and the bus host (`scripts/mosaic`) ```bash +scripts/mosaic # no argument: the full-screen app scripts/mosaic inbox | tasks | agents [--business ] [--json] scripts/mosaic decide