Conversation
Most commands defined --in locally as a project scope alias, but commands like `show` only inherited the root --project flag. This caused "Unknown option: --in" for `basecamp show todo <id> --in <project>` while --project worked fine. Promoting --in to the root command makes it available everywhere, consistent with what agents and docs teach.
There was a problem hiding this comment.
1 issue found across 2 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/cli/root.go">
<violation number="1" location="internal/cli/root.go:187">
P2: Missing tab-completion registration for `--in`. The `--project` flag has `RegisterFlagCompletionFunc` wired up, but the new `--in` alias does not, so `--in <TAB>` won't offer project-name completions.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Pull request overview
This PR promotes --in to a root-level persistent flag so it works consistently across commands (notably basecamp show ...), aligning it as an alias for --project.
Changes:
- Add a new root persistent
--inflag wired to the same underlying project flag value. - Update the CLI surface snapshot (
.surface) to include--inacross commands.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/cli/root.go | Adds root-level --in flag intended to alias --project. |
| .surface | Updates the surface snapshot to reflect the new --in flag availability. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Register the same ProjectNameCompletion for --in so shell tab completion works. Add projectFlagChanged() helper that checks both --project and --in, used in config project where Changed gating would miss the alias.
The global --in persistent flag was shadowed by local --project flags on
people subcommands, so --in was silently ignored. Additionally, add and
remove used MarkFlagRequired("project") which rejected --in outright.
Fix by adding local --in aliases (bound to the same variable as --project),
replacing MarkFlagRequired with manual validation that accepts either flag,
and registering tab completion for both flags on all three subcommands.
Register the --in persistent flag in the test helper (matching root.go) and add a test that verifies config project --in resolves and persists the project ID correctly.
There was a problem hiding this comment.
Pull request overview
This PR promotes --in to a root-level persistent flag as a global alias for --project, aiming to make project scoping consistent across commands (notably fixing basecamp show todo <id> --in <project>). It also updates completion and ensures config project detects either flag.
Changes:
- Adds
--inas a persistent root flag bound to the same value as--project, plus shell completion. - Updates
config projectto treat--projectand--inas equivalent for “explicit flag provided” detection. - Extends
peoplecommand tests and flags to accept--inas an alias inlist/add/remove.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
internal/cli/root.go |
Adds global persistent --in and registers project-name completion for it. |
internal/commands/helpers.go |
Introduces projectFlagChanged() helper for alias-aware .Changed detection. |
internal/commands/config.go |
Uses projectFlagChanged() so config project recognizes --in as explicit input. |
internal/commands/config_test.go |
Adds test coverage ensuring config project --in ... works and persists config. |
internal/commands/people.go |
Adds per-subcommand --in flags (aliasing local --project) and completion; adjusts required-flag behavior for add/remove. |
internal/commands/people_test.go |
Adds mock-server-based tests verifying people list/add/remove behavior with --in. |
.surface |
Updates CLI surface snapshot to include the new global flag everywhere. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Local --project/--in flags on people list/add/remove shadow the root persistent flags. When the global flag is placed before the subcommand (e.g. `basecamp --in 55555 people list`), the local variable stays empty. Fall back to app.Flags.Project, matching the pattern used by schedule, todos, and other commands with local project flags. Also hardens mock server decode/assertion in people tests and uses require.NoError for EvalSymlinks/Getwd in config_test.
…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)
Summary
--infrom per-command local flag to a root-level persistent flag, aliasing--projectbasecamp show todo <id> --in <project>returning "Unknown option: --in"--incontinue to shadow the global one, no behavior changeFixes the inconsistency described in the Figuring it out card: most commands accepted
--inbutshowonly accepted--project.Summary by cubic
Promotes
--into a global alias for--projectacross the CLI and makespeoplesubcommands accept it. Fixes unknown/ignored--incases and aligns behavior with docs.--in; useprojectFlagChanged()soconfig projecthonors--projector--in.people list/add/removeaccept--inby adding a local alias, validating either flag, and registering completion for both.--project/--ininpeople list/add/removewhen local flags are unset, sobasecamp --in 55555 people ...works.Written for commit 85de871. Summary will update on new commits.