Add accounts command and improve account selection UX#261
Conversation
There was a problem hiding this comment.
1 issue 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/commands/accounts.go">
<violation number="1" location="internal/commands/accounts.go:129">
P1: Persist the canonical account ID, not the raw CLI argument. If the user passes `007`, `ParseInt` yields `7` but the raw string `"007"` is written to config. Use `strconv.FormatInt(accountID, 10)` (or the existing `resolve.PersistAccountID` helper) so the persisted value always matches the canonical form.</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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 452d0b9dd6
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds a first-class accounts command group to manage authorized Basecamp accounts, and tweaks the setup wizard to better communicate the single-account auto-selection path, while keeping the command catalog and CLI surface snapshot consistent.
Changes:
- Introduce
basecamp accounts listandbasecamp accounts use <id>commands. - Enhance resolver/wizard UX by attaching an account label for single-account auto-selection and printing a confirmation in the wizard.
- Register the new command in the CLI root, command catalog, and
.surfacesnapshot/testing harness.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/tui/resolve/account.go | Adds Label on single-account default selection and exposes ListAccounts() via the resolver. |
| internal/commands/wizard.go | Prints an additional message when a single account is auto-selected. |
| internal/commands/commands_test.go | Registers accounts in the test root command to keep catalog/surface tests aligned. |
| internal/commands/commands.go | Adds accounts to the command catalog under “Auth & Config”. |
| internal/commands/accounts.go | New command implementation for listing accounts and persisting a default account. |
| internal/cli/root.go | Registers the new accounts command in the real CLI root. |
| .surface | Updates CLI surface snapshot for new commands/flags/subcommands. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
452d0b9 to
27bdd8c
Compare
Summary
Testing
Summary by cubic
Add an
accountscommand group (alias:account) to list authorized Basecamp accounts and set the default from the CLI. Also improves the account selection wizard by confirming single-account auto-select and keeps the command catalog and CLI surface in sync.basecamp accounts listshows authorized accounts (id, name, href) with a count and next-step breadcrumbs.basecamp accounts use <id> --scope [global|local]validates id/scope, persists the canonical id (global or local), and prints a clear summary with helpful breadcrumbs.Labelfor selected accounts and exposesListAccounts..surfaceupdated to include the new group.Written for commit 27bdd8c. Summary will update on new commits.