TUI experimental flag and device code auth flow#280
Conversation
There was a problem hiding this comment.
1 issue found across 11 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/profile.go">
<violation number="1" location="internal/commands/profile.go:347">
P2: `--device-code` and `--remote` should be mutually exclusive. Since `--device-code` is an alias for `--remote`, passing both is redundant and likely signals user confusion. Add a third exclusivity constraint so Cobra rejects the combination with a clear error.</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
Gates the dev-build TUI behind an experimental.tui config opt-in, and introduces a --device-code flag as a semantic alias for remote/headless OAuth login while improving the remote auth prompt wording.
Changes:
- Add an
experimental.tuigate to thetuicommand (dev builds) and cover it with tests. - Introduce
--device-codeas an alias for--remoteonauth loginandprofile create, including help/surface/e2e updates and mutual-exclusion checks with--local. - Update remote/headless OAuth login instructions to clearer numbered steps and add a regression test for wording.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| skills/basecamp/SKILL.md | Documents the new --device-code login option in the embedded skill docs. |
| internal/commands/tui.go | Adds experimental.tui config gating before TUI side effects run. |
| internal/commands/tui_test.go | Adds coverage ensuring the gate blocks before creating the dev-notice sentinel and passes when enabled. |
| internal/commands/auth.go | Adds --device-code flag and maps it to remote/headless login behavior. |
| internal/commands/profile.go | Adds --device-code flag to profile creation login flow and enforces exclusivity with --local. |
| internal/commands/profile_test.go | Updates flag expectations and adds a mutual-exclusion test for --device-code vs --local. |
| internal/commands/commands.go | Marks tui as experimental in the command catalog metadata. |
| internal/auth/auth.go | Rewrites remote/headless login messaging into a clearer, step-by-step prompt. |
| internal/auth/auth_test.go | Adds a regression test asserting remote prompt wording/steps. |
| e2e/auth.bats | Extends help coverage for --device-code and adds an e2e mutual-exclusion assertion. |
| .surface | Updates CLI surface snapshot to include the new --device-code flags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Gate the TUI behind an experimental config flag so dev-build users must opt in via `basecamp config set experimental.tui true --global`. The gate runs before printDevNotice to avoid side effects when blocked. Add `--device-code` flag to `auth login` and `profile create` as a semantic alias for `--remote`, preparing for RFC 8628 device code grant once Launchpad supports it server-side. Improve remote auth messaging with numbered steps. Cards: - https://3.basecamp.com/2914079/buckets/46292715/card_tables/cards/9659893945 - https://3.basecamp.com/2914079/buckets/46292715/card_tables/cards/9662614088
Only assert on the flag names (device-code, local), not Cobra's internal phrasing which can change across versions.
f9c4d68 to
39754cb
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
experimental.tuiconfig flag — dev build users must opt in viabasecamp config set experimental.tui true --global--device-codeflag toauth loginandprofile createas a semantic alias for--remote, preparing for RFC 8628 once Launchpad supports it server-sideCards
Test plan
bin/cipasses (all unit, e2e, surface, skill drift, naming checks)basecamp tuiwithout experimental flag shows opt-in messagebasecamp config set experimental.tui true --global && basecamp tuilaunches TUI (requires authenticated account)basecamp tui --helpworks regardless of flagbasecamp auth login --helpshows--device-codebasecamp auth login --device-code --localrejected as mutually exclusivebasecamp profile create --helpshows--device-codeSummary by cubic
Gates the TUI behind an experimental flag and adds a headless auth option via
--device-code. Improves remote login prompts and strengthens flag exclusivity.New Features
experimental.tui=true; enable with:basecamp config set experimental.tui true --global(gate runs before any side effects).--device-codeforauth loginandprofile create(alias for--remote); mutually exclusive with--local; help updated onauth loginandlogin.Migration
basecamp config set experimental.tui true --global.--device-code(or--remote).Written for commit 39754cb. Summary will update on new commits.