feat(setup): add truthful completion handoff - #257
Conversation
📝 WalkthroughWalkthroughSetup completion states are standardized for CLI and console onboarding. The changes report verification results, client handoff status, configuration paths, and follow-up actions, with updated UI rendering, tests, and documentation. ChangesSetup completion
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant SetupCommand
participant CompletionBuilder as createSetupCompletion
participant Output as CLI or Console output
participant Operator
SetupCommand->>CompletionBuilder: Provide verification and client handoff states
CompletionBuilder-->>SetupCommand: Return completion messages and next action
SetupCommand->>Output: Render completion handoff
Output-->>Operator: Show verification status and client adoption steps
Possibly related issues
Possibly related PRs
Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 68: Document authorization-pending as an additional setup completion
outcome: update README.md lines 68-68 and docs/cli.md lines 84-86 to mention
browser authorization may still be outstanding, and update
tests/readme-product-contract.test.ts lines 63-64 to assert both documents
retain this outcome; also update line 90 as needed for the same contract.
In `@src/console/console-assets.ts`:
- Around line 89-93: Update the setup completion markup containing
setup-completion-verification, setup-completion-next-action, and
setup-completion-handoff to announce dynamically revealed completion
instructions to assistive technologies. Add a polite atomic live region or move
focus to the completion heading, while preserving the existing refresh feedback
behavior.
In `@src/setup/setup-completion.ts`:
- Around line 38-40: Update displayConfigPath and the generated command
construction to serialize both configPath and profile using platform-aware shell
argument quoting, rather than only escaping double quotes. Ensure paths
containing whitespace, dollar expansions, command substitutions, or other shell
metacharacters remain literal and safe when users paste the command.
In `@tests/setup-completion.test.ts`:
- Around line 4-84: Extend the “setup completion” tests for the remaining
verification states by adding exact createSetupCompletion assertions for
verification “complete” and CLI “incomplete”. For “incomplete”, assert the
expected retest action and message, while preserving the existing clientHandoff
contract; use representative config/profile inputs as needed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: b23ab027-31d5-4323-95df-092692283232
📒 Files selected for processing (15)
README.mddocs/cli.mdsrc/cli/init.tssrc/cli/setup-client-entry-import.tssrc/cli/setup-native-oauth.tssrc/cli/setup.tssrc/console/console-application-service.tssrc/console/console-assets.tssrc/console/console-dashboard-application-service.tssrc/setup/setup-completion.tstests/console-application-service.test.tstests/console-server.test.tstests/readme-product-contract.test.tstests/setup-command.test.tstests/setup-completion.test.ts
Dismissing the stale CodeRabbit changes request because its fresh review run on c338938 is explicitly rate limited. All four actionable threads were fixed in c338938, replied to with validation evidence, and resolved. Full local validation passed again; current-head CI remains required before merge.
Closes no issue; this is a focused implementation slice for #204.
What changed
Validation
npm testnpm run test:corenpm run test:coveragenpm run lintnpm run typechecknpm run buildnpm run smoke:clinpm run check:packnpm run test:packageIndependent review note: Claude ultrareview was unavailable because this account has exhausted its free review quota. A read-only local Claude Code review command was run; it emitted no findings.
Summary by CodeRabbit
New Features
Documentation