Skip to content

fix(cli): render multi-select prompts with checkbox markers - #1463

Merged
clay-good merged 3 commits into
mainfrom
fix/multiselect-checkbox-markers
Jul 27, 2026
Merged

fix(cli): render multi-select prompts with checkbox markers#1463
clay-good merged 3 commits into
mainfrom
fix/multiselect-checkbox-markers

Conversation

@clay-good

@clay-good clay-good commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Status: LGTM — one-line rendering fix plus one theme override, no behavior change.

What was wrong: The tool picker in openspec init/openspec update supports selecting multiple agents, but drew radio-button symbols (/), so first-time users read it as single-choice (#647). The artifact picker in openspec schema init had the same problem via the stock inquirer icons.

How it was fixed: Both prompts now draw the [x] / [ ] checkbox markers the openspec config profile workflow picker already uses:

  • src/prompts/searchable-multi-select.ts — selection icon /[x]/[ ] (one line).
  • src/commands/schema.ts — the same theme.icon override config.ts already applies to its checkbox.

The openspec view dashboard keeps its / glyphs on purpose: there they mark change status, not a selection, and checkboxes would falsely imply toggleability.

Replication / proof:

  • Before: run openspec init — every tool row shows a radio circle (screenshot in OpenSpec agent selection should use checkboxes instead of radio buttons since allows multiple #647).
  • After (real PTY run of the built CLI): all 29 rows render [ ], pressing Space renders [x], zero radio glyphs in the transcript; same verified for openspec schema init.
  • 3 new tests pin the markers (render, toggle on, toggle off). Mutation-checked: reverting the fix makes exactly those 3 fail.
  • Full suite: 2,282/2,282 pass, including the template golden-hash parity tests (untouched by this change).

Notes / nits:

  • ASCII markers are strictly safer than the unicode circles: is East-Asian-Ambiguous (2 cells in some CJK terminals) and tofus on legacy Windows consoles.
  • Prompt consumers (init.ts, update.ts) only read the returned value array, and no test or doc pins the old glyphs — checked repo-wide.
  • Prior attempt fix: use checkbox markers in tool multiselect #1179 was closed by its author, not rejected; this supersedes it with test coverage.

Closes #647

🤖 Generated with Claude Code

Summary by CodeRabbit

  • UI Improvements
    • Updated selection prompts to use familiar checkbox markers: [x] for selected items and [ ] for unselected items.
    • Applied the checkbox-style markers to the schema initialization and searchable multi-select flows.
  • Tests
    • Added coverage to verify correct marker rendering and toggle behavior (select/deselect) in the searchable multi-select prompt.

The init/update tool picker and the schema init artifact picker are
multi-selects but rendered radio-button symbols, so users read them as
single-choice. Use the [x]/[ ] markers the config profile picker
already uses.

Closes #647

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@clay-good
clay-good requested a review from a team as a code owner July 27, 2026 22:15
@clay-good
clay-good requested review from alfred-openspec and removed request for a team July 27, 2026 22:15
@coderabbitai

coderabbitai Bot commented Jul 27, 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: 7c9014de-c8a2-4dff-a841-35f71e1dd588

📥 Commits

Reviewing files that changed from the base of the PR and between 9a66c15 and c177063.

📒 Files selected for processing (1)
  • test/prompts/searchable-multi-select.test.ts

📝 Walkthrough

Walkthrough

Interactive selection prompts now display checkbox-style markers instead of radio-style symbols, with tests covering selection and deselection states.

Changes

Checkbox marker rendering

Layer / File(s) Summary
Marker rendering and validation
src/commands/schema.ts, src/prompts/searchable-multi-select.ts, test/prompts/searchable-multi-select.test.ts
Schema artifact selection and searchable multi-select choices render [x] and [ ]; tests cover initial, selected, and deselected states.

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

Possibly related PRs

Suggested reviewers: alfred-openspec

🚥 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 matches the main change: switching multi-select prompt markers to checkbox-style icons.
Linked Issues check ✅ Passed The PR addresses #647 by replacing radio-style symbols with checkbox markers for multi-select prompts, matching the issue goal.
Out of Scope Changes check ✅ Passed The changes stay focused on prompt marker rendering and tests, with no obvious unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/multiselect-checkbox-markers

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.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
test/prompts/searchable-multi-select.test.ts (1)

224-230: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert the [ ] marker after deselection.

The current assertion only checks that [x] disappears, so it would still pass if the marker reverted to or disappeared entirely. Assert renderOutput contains [ ] after the second Space press.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/prompts/searchable-multi-select.test.ts` around lines 224 - 230, Update
the deselection test case to assert that renderOutput contains the “[ ]” marker
after the second pressKey('space') call, while retaining the existing assertion
that “[x]” is removed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@test/prompts/searchable-multi-select.test.ts`:
- Around line 224-230: Update the deselection test case to assert that
renderOutput contains the “[ ]” marker after the second pressKey('space') call,
while retaining the existing assertion that “[x]” is removed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 44d35acd-8d74-44ca-9826-d82c145eb904

📥 Commits

Reviewing files that changed from the base of the PR and between 05c7019 and 9a66c15.

📒 Files selected for processing (3)
  • src/commands/schema.ts
  • src/prompts/searchable-multi-select.ts
  • test/prompts/searchable-multi-select.test.ts

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 27, 2026

Copy link
Copy Markdown

Deploying openspec-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: bcacf2d
Status: ✅  Deploy successful!
Preview URL: https://a115a7bc.openspec-docs.pages.dev
Branch Preview URL: https://fix-multiselect-checkbox-mar.openspec-docs.pages.dev

View logs

CodeRabbit nit: the deselect test passed even if the marker reverted
to a radio symbol instead of [ ].

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@alfred-openspec alfred-openspec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed at c177063. The init/update and schema multi-selects now use the established [x]/[ ] markers while status glyphs remain unchanged; 36 focused tests, build, lint, the 2,282-test cross-platform suite, and all CI/security checks pass.

@clay-good
clay-good added this pull request to the merge queue Jul 27, 2026
Merged via the queue into main with commit caed05e Jul 27, 2026
16 checks passed
@clay-good
clay-good deleted the fix/multiselect-checkbox-markers branch July 27, 2026 22:47
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.

OpenSpec agent selection should use checkboxes instead of radio buttons since allows multiple

2 participants