Skip to content

fix(prompts): say 1 match and 1 option in the multi-select summary - #2120

Merged
chhoumann merged 1 commit into
masterfrom
fix/2118-multi-select-summary-plural
Oct 1, 2026
Merged

chhoumann merged 1 commit into
masterfrom
fix/2118-multi-select-summary-plural

Conversation

@chhoumann

@chhoumann chhoumann commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

The multi-select and checkbox prompts' summary line now counts one in the singular: 1 match and 1 option, instead of 1 matches and 1 options.

1 match

Obsidian 1.13.7, checkboxPrompt(["alpha", "beta", "gamma"]) with gam typed.

Tests

  • searchableMultiSelect.test.ts: one option, two options, one match, two matches. It fails on master (0 selected · 1 options).
  • pnpm run build-with-lint, pnpm run test (6602 passed), .agents/run-e2e (396 passed, 24 Templater-only skipped).

Release / migration

None.

Fixes #2118

Note

Fix singular/plural wording in SearchableMultiSelect.updateSummary

The summary now picks singular or plural wording independently for the total option count and the filtered match count. Selected count and empty-query behavior are unchanged. Adds tests in searchableMultiSelect.test.ts covering all four count combinations.

Macroscope summarized bce3c38.

Summary by CodeRabbit

  • Bug Fixes
    • Summary text now uses singular or plural wording correctly for option totals and search-match counts.

@chhoumann chhoumann linked an issue Oct 1, 2026 that may be closed by this pull request
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T12:13:25.700345Z bce3c38 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c31f06d8-d899-427d-baf0-a6c6ee309cb7

📥 Commits

Reviewing files that changed from the base of the PR and between 001a342 and bce3c38.

📒 Files selected for processing (2)
  • src/gui/SearchableMultiSelect/searchableMultiSelect.test.ts
  • src/gui/SearchableMultiSelect/searchableMultiSelect.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

SearchableMultiSelect.updateSummary now uses singular labels for one option or match and plural labels otherwise. A test checks both forms for option counts and search matches.

Changes

Summary label formatting

Layer / File(s) Summary
Count label formatting
src/gui/SearchableMultiSelect/searchableMultiSelect.ts, src/gui/SearchableMultiSelect/searchableMultiSelect.test.ts
updateSummary displays “1 option” or “1 match” for a count of one, and plural labels for other counts. The test checks counts of one and two, including filtered matches.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to bce3c

A count of one now uses singular wording, while larger counts remain plural. The added assertions cover option and filtered-match summaries; no concrete merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: using singular wording for one match and one option in the multi-select summary.
Linked Issues check ✅ Passed Issue #2118 requires singular labels for counts of one and plural labels otherwise. The change in SearchableMultiSelect.updateSummary emits option for one option, options otherwise, match for …
Out of Scope Changes check ✅ Passed The pull request changes only the summary-label logic and adds focused automated tests for issue #2118. The changes have a direct connection to the linked issue and do not show unrelated scope.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

A rabbit checks the counts with care
One option gets a label fair
Two options take the plural track
One match now reads just right
Two matches hop in line
The summary’s clear as day

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

@chhoumann
chhoumann merged commit 28a9da7 into master Oct 1, 2026
15 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.

Multi-select summary says "1 matches" and "1 options"

1 participant