Improve tool instance disambiguation format#329
Merged
Conversation
Put the ID first so it's easy to copy-paste into --flag <id>:
Multiple message boards found. Specify one with --board <id>:
12345 General
67890 Engineering
Three code paths updated to the same format:
- getDockToolID (helpers.go)
- multiToolError (tui/resolve/dock.go)
- getCardTableID (cards.go)
Also fix pluralization for irregular nouns (inbox → inboxes, not
inboxs) via a pluralNoun helper, and remove the now-unused
formatCardTableMatches function.
There was a problem hiding this comment.
Pull request overview
This PR standardizes ambiguous “multiple matches” errors for dock tools (commands + TUI resolver) and card tables so IDs appear first in a copy/paste-friendly list, and improves pluralization for tool nouns (including inbox → inboxes).
Changes:
- Reformats ambiguous multi-tool errors to:
Multiple <plural> found+Specify one with --<flag> <id>:+<id> <title>entries. - Adds a small pluralization helper and tests to cover irregular plurals like “inboxes”.
- Updates/extends tests and removes the now-unused
formatCardTableMatcheshelper.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/tui/resolve/dock.go | Updates TUI resolver ambiguous error formatting; adds pluralization helper for tool nouns. |
| internal/tui/resolve/dock_test.go | Updates assertions for new format and adds inbox pluralization coverage. |
| internal/commands/helpers.go | Updates getDockToolID ambiguous error formatting; adds pluralNoun. |
| internal/commands/helpers_test.go | Updates assertions and adds tests for inbox plural + pluralNoun cases. |
| internal/commands/todos_test.go | Updates ambiguous todoset error assertions to match the new format. |
| internal/commands/cards.go | Updates multi-card-table ambiguity to match the standardized format; removes formatCardTableMatches. |
| internal/commands/cards_test.go | Removes tests for deleted helper; updates ambiguity assertions for new card table format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
2 issues found across 7 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/tui/resolve/dock_test.go">
<violation number="1" location="internal/tui/resolve/dock_test.go:115">
P2: Missing `e.Code` assertion — the sibling `TestDockToolMultiNonInteractiveError` verifies `output.CodeAmbiguous` but this test does not. Add the same check so the error code is covered for the inbox path.</violation>
</file>
<file name="internal/tui/resolve/dock.go">
<violation number="1" location="internal/tui/resolve/dock.go:178">
P2: `pluralizeName` duplicates the identical `pluralNoun` function in `internal/commands/helpers.go`. Consider extracting this into a shared package (e.g., `internal/text` or `internal/output`) so both call sites use the same function and future pluralization fixes only need to be applied once.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Move the pluralization helper to output.PluralNoun so commands and TUI resolver share one implementation. Add missing e.Code assertion to the inbox pluralization test. Addresses review feedback from Copilot and Cubic.
jeremy
added a commit
to brianevanmiller/basecamp-cli
that referenced
this pull request
Mar 18, 2026
…evanmiller/feature-gap-analysis * origin/main: Show full content in detail views instead of truncating at 40 chars (basecamp#338) Switch CODEOWNERS from sip to cli team (basecamp#346) Fix dock ordering and add --all flag to `projects show` (basecamp#333) Add file upload command to SKILL.md (basecamp#343) Replace "pending" with "incomplete" in todos output; omit from default view (basecamp#327) Add `--in` as global alias for `--project` (basecamp#334) Fix 3 post-QA issues on api command (basecamp#330) deps: bump the go-dependencies group with 2 updates (basecamp#331) Improve tool instance disambiguation format (basecamp#329) Fix emoji/CJK alignment in search results (basecamp#328)
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.
Summary
--flag <id>:getDockToolID,multiToolError(TUI resolver), andgetCardTableIDinbox→inboxes, notinboxs) via apluralNounhelperformatCardTableMatchesfunctionTest plan
pluralNoununit test covers all tool-related nounsbin/cipassesSummary by cubic
Standardizes multi-tool disambiguation errors to "Multiple found" with ID-first lines and a clear flag hint, making copy-paste easier in CLI and TUI. Consolidates pluralization into
output.PluralNounto fix cases like inbox → inboxes.getDockToolID,multiToolError, andgetCardTableID: "Multiple found" + "Specify one with -- :" + lines like " <title>".output.PluralNounused by CLI and TUI.formatCardTableMatches; updated tests for new messages, hints, and pluralization.Written for commit 312f254. Summary will update on new commits.