Skip to content

fix(bench): the scenario list is drawn like the menu, and every menu erases itself once answered - #105

Merged
flipvh merged 1 commit into
mainfrom
fix/bench-menu
Nov 17, 2026
Merged

flipvh merged 1 commit into
mainfrom
fix/bench-menu

Conversation

@flipvh

@flipvh flipvh commented Nov 17, 2026

Copy link
Copy Markdown
Member

pnpm cella bench still looked like a CLI inside a CLI. Its scenario list kept Inquirer's ? select a scenario question line, the ↑↓ navigate • ⏎ select hints, a red exit · quit without running row and a seven-row page. Opened from the menu, it stacked under the bench load-test… row the menu left behind: a second header. Ctrl-C there printed ✗ User force closed the prompt with SIGINT and exited 1, which pnpm reported as ELIFECYCLE.

The menu, a command's job list (a11y, audit, align) and the bench scenario list now share pickFromMenu in src/utils/menu.ts, drawn as the infra CLI draws its menus:

  • an optional bold title (bench, a11y), with no question mark and no key hints
  • a divider and a plain quit row; the page fills the terminal
  • the list erases itself once answered, so pnpm cella → bench and pnpm cella bench show the same screen: the header, bench, the scenarios
  • quit and ctrl-c print exiting... and exit 0

A scenario's description gets a doc line: it shows beside the name, so it does not repeat it. The template's descriptions follow in a cella PR.

Verification

  • pnpm check: clean
  • pnpm test: 483 passed; pnpm test:release: 9 passed
  • Rendered in a terminal emulator (pyte) against the cella repo, the bench child redirected to this branch's runBench: the menu, the bench list from the menu and by name, a pick going on to the stack check, the quit row, ctrl-c, and the a11y job list.

Size

Kind Files Added Removed Net
Source 4 +72 -51 +21
Total 4 +72 -51 +21
  • Source: pickFromMenu, which replaces three inline select calls; of the net lines, 9 are comments (its contract and the description doc line).

…erases itself once answered

The bench scenario list kept Inquirer's question line, key hints and red exit row, and stacked under the
row the menu left behind: a second header. The menu, a command's job list and the scenario list now share
pickFromMenu: an optional bold title, no question mark or key hints, a plain quit row, a page that fills
the terminal, and an erase once answered. Quit and ctrl-c leave with `exiting...` and exit 0. A scenario's
description is documented as the line beside its name, without the name again.
@flipvh
flipvh merged commit 9d190dd into main Nov 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant