Skip to content

chore(deps): migrate to @inquirer/prompts v8 + @inquirer/core v11 - #1667

Merged
clay-good merged 2 commits into
Fission-AI:mainfrom
ryandemelo:chore/inquirer-v8-migration
Aug 19, 2026
Merged

chore(deps): migrate to @inquirer/prompts v8 + @inquirer/core v11#1667
clay-good merged 2 commits into
Fission-AI:mainfrom
ryandemelo:chore/inquirer-v8-migration

Conversation

@ryandemelo

@ryandemelo ryandemelo commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Closes #1458.

Why the two Dependabot bumps couldn't work

#1450 (prompts 7→8) and #1422 (core 10→11) were opened as separate PRs and both closed unmerged. They can't land independently:

  • @inquirer/prompts@8@inquirer/checkbox@5.2.1@inquirer/core@^11
  • package.json also depends on @inquirer/core@^10 directly, because two files build custom prompts on its hooks API

Moving one side alone leaves two copies of @inquirer/core in the tree — the custom prompts running v10 internals next to bundled prompts on v11. That's a latent runtime hazard a green typecheck wouldn't catch. This PR moves both together.

Verified after a clean rm -rf node_modules && pnpm install:

$ find node_modules/.pnpm -maxdepth 1 -name "@inquirer+core@*"
  @inquirer+core@11.2.1_@types+node@20.19.43     # single copy

The instructions removal

checkbox v5 removed the instructions option (the TS2353 in src/commands/config.ts). The issue flagged this as a UX call — drop the hint or re-express it via the theme.

Dropped it, because v5's built-in keys help tip already renders a superset of what was being passed. Old hand-written hint vs. what ships now:

rendered
before Space to toggle, Enter to confirm
after (built-in) ↑↓ navigate • space select • a all • i invert • ⏎ submit

Confirmed by running openspec config profile — the custom [x]/[ ] theme icons are preserved and the help line is strictly more informative, so a theme.style.keysHelpTip override would only make it worse.

Custom prompts on the core hooks API

The issue called out usePrefix({ status }) as worth double-checking, and warned that a green typecheck isn't sufficient here. Checked both ways.

Static: every hook used by src/prompts/searchable-multi-select.ts and src/ui/welcome-screen.ts is unchanged in v11 — usePrefix({ status, theme }) keeps its signature, and use-memo / use-keypress / use-prefix are byte-identical to v10. use-state differs only by an internal type guard. key.js is byte-identical apart from v11 adding getDefaultKeybindings/isShiftKey; isUpKey/isDownKey still default keybindings to [], so the no-arg calls in searchable-multi-select keep exactly their v10 behavior (this matters — a vim default would have made typing k/j navigate instead of filter).

Runtime: drove both custom prompts under a real PTY against core v11.

searchable-multi-select (choices: alpha, beta [pre-selected], gamma, delta):

input result exercises
type g → space → ⏎ ["b","g"] type-to-filter (not vim-nav), useState/useMemo, space toggle
↓ → space → ⏎ [] isUpKey/isDownKey, toggle-off
backspace → ⏎ [] isBackspaceKey remove-last-selected

welcome-screen (createPrompt + useKeypress + isEnterKey): returns only after Enter in both static and animated modes — elapsed 1157ms / 1429ms against keystrokes sent at ~1.2s/1.5s, confirming it actually blocked rather than falling through.

Worth noting for the Windows caveat documented in welcome-screen.ts: core v11's create-prompt now explicitly mutes output after readline initializes, so readline can perform terminal setup writes (e.g. Windows Console API initialization) first. That moves in the right direction for the arrow/space-key issue that comment describes, though I have no Windows machine to confirm on.

Test plan

  • pnpm build — clean
  • pnpm lint — clean
  • pnpm test — 136/136 files, 3969/3969 tests pass
  • Clean node_modules reinstall → exactly one @inquirer/core
  • PTY runtime checks of both custom prompts (table above)
  • openspec config profile renders the checkbox with icons + new help tip

No changeset — per .changeset/README.md the normal release cadence is the default. Happy to add one if you'd like this tracked for dedicated release notes, since the checkbox help line is user-visible.

Summary by CodeRabbit

  • Enhancements
    • Updated interactive prompts to use the latest prompt behavior.
    • Workflow-selection screens now display built-in keyboard guidance automatically.
  • Maintenance
    • Improved compatibility and usability across prompt interactions.
    • Refreshed supporting package configuration to keep the command-line experience up to date.

Bumps both packages together. The two Dependabot attempts each moved one
half (Fission-AI#1450 prompts->8, Fission-AI#1422 core->11) and failed: prompts@8 pulls
checkbox@5 -> core@^11, while package.json depends on core@^10 directly
for two custom prompts, so a one-sided bump leaves two copies of
@inquirer/core in the tree — custom prompts on v10 internals alongside
bundled prompts on v11.

Resolves the `instructions` removal in checkbox v5 by dropping the
option: the built-in keys help tip now renders a superset of the hint
that was being passed, so no theme override is needed.

Closes Fission-AI#1458
@ryandemelo
ryandemelo requested a review from a team as a code owner August 15, 2026 04:05
@ryandemelo
ryandemelo requested review from clay-good and removed request for a team August 15, 2026 04:05
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2724e0e5-16b6-437d-b597-2cbf9b9b2fe2

📥 Commits

Reviewing files that changed from the base of the PR and between ab39042 and a20cc4e.

📒 Files selected for processing (1)
  • flake.nix

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change upgrades @inquirer/core and @inquirer/prompts, removes the obsolete checkbox instructions option, and updates the Nix dependency hash.

Changes

Inquirer migration

Layer / File(s) Summary
Dependency and checkbox API update
package.json, src/commands/config.ts, flake.nix
The Inquirer dependency ranges are upgraded. The workflow-selection checkbox relies on the built-in help tip. The pnpm dependency fetch hash is refreshed.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to a20cc

This dependency migration includes the associated configuration and prompt updates, with the reported checks passing and no actionable merge-blocking risk remaining after normal review.

Suggested reviewers: clay-good

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the coordinated migration to @inquirer/prompts v8 and @inquirer/core v11.
Linked Issues check ✅ Passed The changes upgrade both dependencies, remove the obsolete instructions option, and update the Nix dependency hash required by issue #1458.
Out of Scope Changes check ✅ Passed The dependency, prompt, and Nix hash changes directly support the migration requirements in issue #1458.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The pnpmDeps fixed-output hash is pinned to the contents of pnpm-lock.yaml,
so the inquirer v8/core v11 migration invalidated it and Nix Flake Validation
failed with 'pnpm failed to install dependencies'.

Regenerated against this branch's lockfile and verified: nix build .#default
completes (exit 0) through openspec-1.9.0.drv, not just past the fetch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@clay-good
clay-good added this pull request to the merge queue Aug 19, 2026
Merged via the queue into Fission-AI:main with commit 9181364 Aug 19, 2026
14 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.

Migrate @inquirer/prompts to v8 (requires @inquirer/core v11 + checkbox API changes)

2 participants