Repository navigation
fix(bench): the scenario list is drawn like the menu, and every menu erases itself once answered - #105
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pnpm cella benchstill looked like a CLI inside a CLI. Its scenario list kept Inquirer's? select a scenarioquestion line, the↑↓ navigate • ⏎ selecthints, a redexit · quit without runningrow and a seven-row page. Opened from the menu, it stacked under thebench load-test…row the menu left behind: a second header. Ctrl-C there printed✗ User force closed the prompt with SIGINTand exited 1, which pnpm reported asELIFECYCLE.The menu, a command's job list (
a11y,audit,align) and the bench scenario list now sharepickFromMenuinsrc/utils/menu.ts, drawn as the infra CLI draws its menus:bench,a11y), with no question mark and no key hintsquitrow; the page fills the terminalpnpm cella→ bench andpnpm cella benchshow the same screen: the header,bench, the scenariosexiting...and exit 0A scenario's
descriptiongets 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: cleanpnpm test: 483 passed;pnpm test:release: 9 passedrunBench: 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 thea11yjob list.Size
pickFromMenu, which replaces three inlineselectcalls; of the net lines, 9 are comments (its contract and thedescriptiondoc line).