Skip to content

feat(setup): put rc setup on the guided rail - #144

Merged
joshdholtz merged 14 commits into
mainfrom
dx-999-setup-guided-rail
Aug 25, 2026
Merged

feat(setup): put rc setup on the guided rail#144
joshdholtz merged 14 commits into
mainfrom
dx-999-setup-guided-rail

Conversation

@joshdholtz

@joshdholtz joshdholtz commented Aug 24, 2026

Copy link
Copy Markdown
Member

Puts rc setup (the account/app onboarding flow) on the same guided rail as rc setup google / rc setup apple, so all three setup experiences share the ┌ │ ◇ └ gutter, rail-native pickers, and a spinner ledger.

rc setup

Reuses the existing Flow / Ledger / rail-prompt primitives — no new UI machinery. The interface is the only thing that changed:

  • Step headers, receipts, and rail-native selects/confirms replace the old title/field/answer + huh forms
  • Skills install + MCP config run as a spinner→check ledger
  • Outro closes the rail cleanly right before the agent takes over the terminal

Edge cases kept intact:

  • The copyable agent prompt still prints raw to stdout (no gutter — stays paste-clean)
  • Delegated sub-commands (browser login, signup, projects use picker) run in their own UI; the rail pauses and resumes
  • MCP config returns its status + hint so the ledger shows it and hints (e.g. codex mcp login) stay on the rail
  • --yes still skips the launch gate; --quiet and --no-color flow through
  • Non-interactive / --json output is unchanged (still the stage-aware prompt)

Note

Medium Risk
Changes interactive onboarding and OAuth signup output paths; auth still uses the same provisioning flow but setup now owns signup UX and credential handling on the rail.

Overview
rc setup now runs on the same guided rail (Flow: intro, steps, receipts, ledger) as the other setup flows, replacing scattered rt.Out titles and huh forms with rail-native Select, Confirm, Input, and Password prompts.

Onboarding behavior changes: a roadmap preview at intro; account identity receipts; signup is collected on the rail via setupSignup instead of delegating to rc auth signup (which would print off-rail). signupWithOAuth gains a fromSetup flag and returns (passwordSaved, error) so setup can drive account creation under a ledger while suppressing duplicate success/hint chatter. --autonomy and --skills-scope flags replace interactive autonomy/skills pickers (defaults shown as receipts; --skills-scope default global).

Launch path: skills install uses a ledger step; MCP configuration returns an mcpResult for rail narration instead of writing directly to output; launch confirm respects --yes via AssumeYes. Copyable agent prompt still prints raw to stdout (no gutter).

Toolkit defaults: defaultToolkitSkills adds revenuecat-cli and revenuecat-status.

TUI: Flow.Hint, optional scripted in on rail prompts for tests; new tests guard gutter consistency and scripted prompts.

Reviewed by Cursor Bugbot for commit 9b01de4. Bugbot is set up for automated code reviews on this repo. Configure here.

@linear-code

linear-code Bot commented Aug 24, 2026

Copy link
Copy Markdown
DX-999 Add support for paywall image localizations

Currently image localizations cannot be defined in the paywall editor. SDKs support these when viewing a paywall in the mobile app, but they cannot be defined.

Designs: https://www.figma.com/design/H7zMUjYBh7rQAmVNJelAou/Paywalls?node-id=31297-8176&p=f&t=dhmv81dsEd82CYr6-0

Review in Linear

Base automatically changed from dx-998-setup-apple-alias to main August 24, 2026 22:44
@joshdholtz
joshdholtz force-pushed the dx-999-setup-guided-rail branch 2 times, most recently from 91b6c36 to dc9f661 Compare August 24, 2026 23:20
@joshdholtz
joshdholtz marked this pull request as ready for review August 25, 2026 17:58
Copilot AI lite review requested due to automatic review settings August 25, 2026 17:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@joshdholtz

Copy link
Copy Markdown
Member Author

bugbot run

Comment thread internal/cli/setup.go
Comment thread internal/cli/setup.go
@joshdholtz

Copy link
Copy Markdown
Member Author

bugbot run

1 similar comment
@joshdholtz

Copy link
Copy Markdown
Member Author

bugbot run

Comment thread internal/cli/auth.go
@joshdholtz

Copy link
Copy Markdown
Member Author

bugbot run

1 similar comment
@joshdholtz

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a76bcf7. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a76bcf7. Configure here.

joshdholtz and others added 12 commits August 25, 2026 13:18
Refit the account/onboarding flow (rc setup) onto the same guided rail as the
store-credential setups: intro cap, step headers, rail-native selects/confirms,
receipts, a spinner ledger for skills+MCP, and an outro before the agent takes
over. Reuses the existing Flow/Ledger/prompt primitives.

Edge cases preserved: the copyable agent prompt prints raw to stdout (no gutter);
delegated sub-commands (browser login, signup, project picker) run in their own
UI and the rail resumes after; MCP config returns its status/hint so the ledger
shows it and hints stay on the rail; --yes still skips the launch gate; --quiet
and --no-color flow through. Non-interactive/--json output is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Keep configureAgentMCP's own doc (mcpResult no longer displaces it). MCP config
is narrated (success/left-alone/manual) instead of a ledger ✓/✗ that would over-
or under-state its fuzzy outcome. Declining the launch gate returns cancelled
(non-zero, matching the sibling flows and the old confirmOrAbort) rather than
exiting 0. Skip the one-option agent picker when no agents are installed, and
give a heads-up before the browser/signup/project-picker interludes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Surface the current account (name <email>) as a receipt in the intro block when
already authenticated, so rc setup confirms who you're logged in as instead of
silently continuing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…logue

Sign-in is a prerequisite, not a rail step. Run login/signup before the guided
rail opens so another command's output never tears the rail apart mid-flow — the
rail then starts clean with the account shown. When setup drives signup, suppress
signup's standalone next-steps epilogue (copy-this-prompt / rc skills install /
projects create), which duplicated and contradicted what setup does on the rail.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… header

Revert moving auth ahead of the rail; that dropped the intro/project/location
context for logged-out users. Header shows first, then Sign in on the rail.
Keeps the signup epilogue suppression.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collect signup (email, name, password, keychain, terms) with the rail's own
Input/Password/Confirm prompts instead of delegating to rc auth signup, and run
account creation inside a ledger step with signupWithOAuth's standalone chatter
suppressed. The whole sign-up now stays on the gutter instead of tearing the
rail open. Reuses the shared password generator and validator.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rompts)

Add a scriptable-input seam to the rail prompts (mirrors huh's WithScriptedIO)
and tests for the Flow: a gutter invariant (guards the 'rail disappears' class),
quiet suppression, plain-mode glyph drop, URL no-color, and scripted
Select/Confirm/Input driving real values + cancel returning ErrPromptCancelled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Autonomy (--autonomy, default auto) and skills scope (--skills-scope, default
global) are now defaults shown as receipts, not prompts — cutting two questions
from every run. Marketing opt-in stays a prompt (revisit when the FE handles it).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a state-aware roadmap line (sign in → pick a project → pick an agent →
launch) so the user sees what's coming; drops 'sign in' when already logged in
and ends at 'copy the prompt' when no agent is installed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…setup

setup surfaces this on the rail itself; keep signupWithOAuth from printing it
off-gutter when it drives signup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…on Keychain failure

Bugbot findings on the signup rail:
- Terms of Service confirm defaulted to Yes, so pressing Enter accepted the
  Terms. Default to No; acceptance now requires an explicit Yes.
- A generated password could be lost silently: if the user chose to save it but
  the Keychain write failed, signup emitted an off-rail warning with no recovery
  hint, and the rail hint only fired when the user declined saving.
  signupWithOAuth now returns whether the password was saved; setup shows the
  Forgot-password recovery hint whenever a generated password ends up unsaved
  (declined or Keychain failure), and the off-rail Keychain warning is
  suppressed under setup so the rail stays intact.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Gating the Keychain-failure warning behind !fromSetup left the user-provided
password case silent: setup only warned for generated passwords. Add a rail
warning when a save was requested but didn't happen, regardless of whether the
password was generated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joshdholtz
joshdholtz force-pushed the dx-999-setup-guided-rail branch from a76bcf7 to 9782076 Compare August 25, 2026 18:18
Comment thread internal/cli/setup.go
A mistyped confirmation returned an error and discarded the whole setupSignup
flow (email, name, marketing, password choice), forcing a restart. Loop the
password + confirm prompts until they match, like the old signup form did.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joshdholtz

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2fed12a. Configure here.

The default install set now includes revenuecat-cli (the other skills reference
it for CLI discovery and conventions, so it must be present) and revenuecat-status
(the CLI ships a starter prompt for it). Genericize the help text that hardcoded
"four skills".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joshdholtz

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9b01de4. Configure here.

Comment thread internal/cli/skills.go
var defaultToolkitSkills = []string{
"create-revenuecat-project",
"integrate-revenuecat",
"revenuecat-cli",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unknown default skill name

High Severity

revenuecat-cli was added to defaultToolkitSkills, but that skill does not appear in the published RevenueCat/ai-toolkit catalog (unlike sibling additions such as revenuecat-status). Default rc skills install and rc setup both pass this list to npx skills add --skill …, so an unknown skill name can fail the entire install and block onboarding.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9b01de4. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

False positive: revenuecat-cli does exist in the RevenueCat/ai-toolkit catalog on main (added in ai-toolkit#51, merged earlier today) — verified revenuecat/skills/revenuecat-cli/SKILL.md is present. rc skills install pulls from the toolkit default branch, so the name resolves. Bugbot was working from a snapshot taken before #51 merged.

@joshdholtz
joshdholtz disabled auto-merge August 25, 2026 18:55
@joshdholtz
joshdholtz merged commit 52c1e14 into main Aug 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants