Conversation
RenderList now pre-computes max width for meta-role columns (IDs, dates) and right-aligns them. Non-meta columns like todo content are left unpadded to avoid wasting space on variable-length text. Only the project schema currently has meta columns in its list view ([id, name]), so this fixes the ragged ID alignment there without affecting todo output.
The BC3 API returns projects in reverse chronological order, which makes scanning by name difficult. Add client-side alphabetical sort after fetch, gated on full result set (page == 0 && limit == 0) to avoid misleadingly sorting partial pages.
Replace the animated quickstart screen with curated help when running
bare `basecamp` interactively. Machine-output modes (--json, --agent,
--quiet, non-TTY) preserve the quickstart JSON envelope. First-run
wizard detection is preserved.
The root help renders curated command categories (Core, Shortcuts,
Search & Browse, Auth & Config), flags, examples, and a learn-more
footer. Descriptions are sourced from the live registered commands
(not catalog copy) to prevent drift. Remaining commands are
discoverable via `basecamp commands`.
Bare-root PersistentPreRunE now tolerates config/profile validation
errors — bad config no longer blocks help. The app context is still
created when config loads successfully so wizard detection and
IsMachineOutput work correctly.
Also exports CommandCategories() for use by the help renderer and
fixes the url catalog description ("Parse Basecamp URLs" to match
the command's actual Short field).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87878b10d0
ℹ️ 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
This PR polishes the CLI’s default UX by replacing the bare-root quick-start display with a curated, categorized help screen (while preserving structured/agent output paths), plus small output and listing refinements.
Changes:
- Add a custom “gh-style” root help renderer (curated categories, flags, examples, learn-more) and update root usage behavior.
- Sort
basecamp projectsoutput alphabetically by project name when listing the full result set. - Right-align meta-role columns (e.g., IDs) in styled list rendering, and add/adjust unit + e2e coverage for the new behaviors.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/presenter/render.go | Pre-computes widths for meta-role columns and right-aligns them during list rendering. |
| internal/presenter/presenter_test.go | Adds tests for ID right-alignment and ensures todo content isn’t padded to max width. |
| internal/commands/quickstart.go | Changes bare-root default to show help unless in machine-output mode / first-run wizard. |
| internal/commands/projects.go | Adds client-side alphabetical sort by name when listing the full project set. |
| internal/commands/commands.go | Exports CommandCategories() and fixes catalog description for url. |
| internal/cli/root.go | Wires custom root help/usage, and tolerates certain config/profile errors for bare-root help. |
| internal/cli/help.go | Implements the curated root help renderer and agent JSON help handling. |
| internal/cli/help_test.go | Adds unit tests for curated root help, agent help JSON, and bare-root resilience. |
| e2e/core.bats | Updates e2e expectations: bare basecamp and basecamp --help now show curated help. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Piped/non-TTY invocations (e.g. `basecamp | jq`) should produce quickstart JSON, not help text. Use app.IsInteractive() so the TTY check drives the decision rather than requiring explicit --json/--agent flags. Fixes review feedback on PR #219.
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
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/quickstart.go">
<violation number="1" location="internal/commands/quickstart.go:65">
P1: Nil `app` causes a panic inside `runQuickStart`. When `app == nil`, this condition is true and calls `runQuickStart`, which dereferences `app` without a nil guard at `app.Auth.IsAuthenticated()`. Change to `app != nil && !app.IsInteractive()` so a nil app falls through to `cmd.Help()` (which works without app context).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
When app context is nil, fall through to cmd.Help() instead of calling runQuickStart which dereferences app. Issue identified by cubic.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Check IsMachineOutput() in RunQuickStartDefault so config-driven format=json/quiet on an interactive TTY routes to quickstart, not help - Call resolvePreferences in both bareRoot early-return branches so config-driven hints and stats are applied even when profile resolution or HTTPS validation fails - Add tests for config-driven format routing, breadcrumbs with hints, and bad-profile preference resolution
- Add isolateHelpTest helper to all help tests for keyring/config/cache isolation via BASECAMP_NO_KEYRING and XDG temp dirs - Tighten todo content padding assertion to check for exactly two-space separator (not just absence of 24+ spaces) - Precompute lowercase sort keys in project listing to avoid repeated ToLower allocations in the comparator
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
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/projects.go">
<violation number="1" location="internal/commands/projects.go:131">
P1: Pre-computed `keys` slice falls out of sync with `projects` during sorting. `sort.Slice` swaps elements in `projects` but `keys` is never reordered to match, so after the first swap the comparator uses stale keys for the wrong projects. This produces an incorrect (non-deterministic) sort order. Revert to the original inline `ToLower` which always reads the current element.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
sort.Slice only swaps elements in the target slice, not the parallel keys slice, so precomputed keys go stale after the first swap. Revert to inline ToLower which always reads from the current element. Issue identified by cubic.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Consolidates the three bareRoot error-tolerance paths into a single initBareRootApp closure that handles nil config (uses config.Default), resolves preferences, and creates the app. The config-load-failure path now initializes a minimal app instead of returning nil, so wizard detection and machine-output flags still work with an unreadable config.
Summary
basecampnow shows a curated gh-style help screen with categories (Core Commands, Shortcuts, Search & Browse, Auth & Config), flags, examples, and a learn-more footer. Descriptions are sourced from live registered commands to prevent drift from catalog copy.--json,--agent,--quiet, and non-TTY bare root still return the quickstart JSON envelope. First-run wizard detection is preserved.basecamp projectssorts alphabetically by name (client-side, gated on full result set to avoid misleading partial-page sorts).Test plan
make checkpasses (vet, lint, unit tests, e2e, surface snapshot, provenance)basecampshows curated helpbasecamp --helpshows same curated helpbasecamp --jsonreturns quickstart JSON envelopebasecamp --agentreturns quickstart JSON envelopeBASECAMP_PROFILE=bogus basecampshows help (no error)basecamp todos --helpshows default cobra help (not curated)basecamp --help --agentreturns structured JSONbasecamp projectssorted alphabetically, IDs right-alignedSummary by cubic
Polishes root help and list output: curated help for bare
basecampin interactive TTY, alphabeticalprojectslist, and right‑aligned IDs. Keeps quickstart JSON for non‑TTY and machine modes, and improves resilience when config is broken.New Features
cobrahelp. Supports--help --agentJSON help.projectslist sorts by name when the full set is returned.urldescription updated to “Parse Basecamp URLs”.Bug Fixes
--json,--agent, or configformat=json|quietkeep quickstart JSON.Written for commit 061651b. Summary will update on new commits.