Skip to content

fix(menu): improve framework list visibility and make None exclusive in AI config selections - #1788

Open
ivanvpetrov wants to merge 8 commits into
masterfrom
ipetrov/fix-cli-menu-behaviour
Open

fix(menu): improve framework list visibility and make None exclusive in AI config selections#1788
ivanvpetrov wants to merge 8 commits into
masterfrom
ipetrov/fix-cli-menu-behaviour

Conversation

@ivanvpetrov

@ivanvpetrov ivanvpetrov commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR improves the interactive CLI prompt experience in two areas:

  • Makes the framework picker in ig new show more items at once to reduce clipping in smaller terminals.
  • Makes None act as an exclusive option in AI config multi-select prompts.

Changes

  • Increased framework select page size so WebComponents and other options are visible without extra navigation in most terminal sizes.
  • Extended shared select prompt typing to include pageSize.
  • Added an exclusive checkbox prompt used by AI config selection flows.
  • Updated AI config prompts so:
    • Selecting None immediately unselects all other options.
    • Selecting any other option unselects None.
  • Added unit test coverage for exclusive toggle behavior.
  • Added @inquirer/core dependency required for the exclusive checkbox prompt implementation.

Why

  • Users reported framework list clipping during ig new, which hid the last option unless navigating with arrows.
  • None should be mutually exclusive in the UI to match expected meaning, not only normalized after submit.

Consideration

Custom implementation for ExclusiveCheckbox introduced, since neither Inquirer nor Enquirer (the main alternative) supports exclusive multi-select behavior out of the box.

How to test:

  1. Pull the branch.
  2. Install dependencies:
    yarn install
  3. Build the project:
    npm run build
  4. Run the interactive new-project flow:
    node ...\igniteui-cli\packages\cli\bin\execute.js new

Copilot AI lite review requested due to automatic review settings September 1, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

@inquirer/type is referenced in exported types but remains in devDependencies, which can break downstream TypeScript consumers when @igniteui/cli-core is installed as a dependency.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Improves the interactive CLI prompting experience by increasing the visible page size for framework selection in ig new, and introducing an exclusive multi-select prompt so None behaves as a mutually exclusive option in ai-config flows.

Changes:

  • Increase framework picker page size to reduce option clipping in ig new.
  • Add a custom exclusiveCheckbox prompt and update AI config prompts to make none exclusive.
  • Add unit tests for the exclusive toggle behavior and add required Inquirer dependency.
File summaries
File Description
spec/unit/ai-config-spec.ts Adds unit tests covering None exclusive-toggle behavior.
packages/core/prompt/InquirerWrapper.ts Extends prompt wrapper surface (pageSize + exclusiveCheckbox).
packages/core/prompt/ExclusiveCheckbox.ts Implements a custom exclusive checkbox prompt and exports toggle helper for tests.
packages/core/prompt/BasePromptSession.ts Sets pageSize: 10 for the framework select prompt and extends select options typing.
packages/core/package.json Adds @inquirer/core dependency for the custom prompt implementation.
packages/cli/lib/commands/ai-config.ts Switches AI config selection prompts to the new exclusive checkbox behavior.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/core/prompt/InquirerWrapper.ts
Comment thread packages/core/package.json
@coveralls

coveralls commented Sep 1, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 87.798% (-0.02%) from 87.816% — ipetrov/fix-cli-menu-behaviour into master

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.

4 participants