Skip to content

feat(apps): rc apps apple setup on the guided rail - #140

Merged
joshdholtz merged 1 commit into
dx-996-setup-google-guidedfrom
dx-997-apps-apple-guided
Aug 24, 2026
Merged

feat(apps): rc apps apple setup on the guided rail#140
joshdholtz merged 1 commit into
dx-996-setup-google-guidedfrom
dx-997-apps-apple-guided

Conversation

@joshdholtz

@joshdholtz joshdholtz commented Aug 21, 2026

Copy link
Copy Markdown
Member

Moves rc apps apple setup onto the same guided rail as rc setup google, so both setup flows look and feel identical.

rc apps apple setup

Note

Medium Risk
Touches the interactive Apple credential and 2FA path and stderr/stdout split, but core setup logic and JSON contracts are largely preserved with test/snapshot updates.

Overview
rc apps apple setup and check now use the same tui.Flow guided rail as rc setup google, replacing output titles/plans/cards and separate huh forms with Intro / Step / Item / Receipt / Outro narration.

Interactive Apple sign-in moves onto the rail: fl.Confirm, fl.Input, new fl.Password (masked entry, bullet receipt), fl.Select for team and 2FA, plus shorter privacy copy inline. decideAppleKey takes a Flow and uses rail confirms. Human check results are shown on the rail instead of RenderCard; --json still emits structured data on stdout (including early return for check).

output.Renderer.Stderr() wires guided flows to the renderer’s stderr (tests and setup google use rt.Out.Stderr() instead of os.Stderr). Snapshots and one test assert guided text on stderr, keeping stdout data-only under --json.

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

@linear-code

linear-code Bot commented Aug 21, 2026

Copy link
Copy Markdown
DX-997 Refit apps apple + auth + setup onto the tier; document + enforce

Once the pilot on rc setup google settles: refit the other requires_human flows — apps apple setup/check, auth login/signup, capital setup, and rc setup (the onboarding entry point) — onto the guided tier. Then document the tier in docs/design-system.md and add a design_boundaries_test rule keeping guided primitives out of data commands and vice versa.

Review in Linear

@joshdholtz
joshdholtz force-pushed the dx-997-apps-apple-guided branch 2 times, most recently from 9c5c7c5 to bfdf6f1 Compare August 24, 2026 12:28
@joshdholtz joshdholtz changed the title feat(setup): put rc apps apple on the guided rail tier feat(apps): rc apps apple setup on the guided rail Aug 24, 2026
@joshdholtz
joshdholtz force-pushed the dx-997-apps-apple-guided branch from bfdf6f1 to 2582ec1 Compare August 24, 2026 15:14
@joshdholtz
joshdholtz requested review from a team, fire-at-will and popcorn August 24, 2026 15:30
@joshdholtz
joshdholtz marked this pull request as ready for review August 24, 2026 15:30
Copilot AI lite review requested due to automatic review settings August 24, 2026 15:30

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.

Comment thread internal/cli/apps_apple.go
Comment thread internal/cli/apps_apple.go Outdated
@joshdholtz
joshdholtz force-pushed the dx-997-apps-apple-guided branch from 2582ec1 to 813404d Compare August 24, 2026 16:59
@joshdholtz
joshdholtz force-pushed the dx-997-apps-apple-guided branch from 813404d to 07aabbe Compare August 24, 2026 17:34
@joshdholtz
joshdholtz force-pushed the dx-997-apps-apple-guided branch 2 times, most recently from 370f995 to 978af86 Compare August 24, 2026 18:05
Comment thread internal/cli/apps_apple.go

@fire-at-will fire-at-will 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.

A few questions, but looks good otherwise!

Comment thread internal/cli/apps_apple.go Outdated
existingVendor = extras.AppStoreVendorNumber()
}
if !checkOnly {
fl := tui.NewFlow(rt.Out.Stderr(), !rt.CanPrompt(), rt.Out.NoColor())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Again, does this flow ignore --quiet?

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.

Yep — same fix; the guided Flow now honors --quiet.

Comment thread internal/tui/prompt_rail.go Outdated
if im.cancelled {
return "", ErrPromptCancelled
}
return strings.TrimSpace(im.ti.Value()), nil

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should we be trimming passwords here? If, for some reason, my password start/ended with a space, that would make this unusable for me. That said, it's gotta be rare for spaces to be in passwords

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.

Fixed — Password no longer trims, so leading/trailing spaces are preserved. (Input still trims, which is fine for IDs/URLs.)

Comment thread internal/cli/setup_google.go Outdated
}

fl := tui.NewFlow(os.Stderr, !rt.CanPrompt(), rt.Out.NoColor())
fl := tui.NewFlow(rt.Out.Stderr(), !rt.CanPrompt(), rt.Out.NoColor())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same question about --quiet

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.

Same --quiet fix applied here too.

Refit apps apple setup/check onto the tui.Flow rail — intro, step headers,
rail prompts (email, masked password, 2FA, team), receipts, and an outro —
matching rc setup google. Adds Flow.Password (masked rail input) and routes
guided output through the Renderer's writer (Renderer.Stderr) so it's captured
in tests. Snapshot updated. Note: the live Apple 2FA path is not testable here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joshdholtz
joshdholtz force-pushed the dx-997-apps-apple-guided branch from 978af86 to 63c5ec9 Compare August 24, 2026 20:01

@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 63c5ec9. Configure here.

existingVendor = extras.AppStoreVendorNumber()
}
if !checkOnly {
fl := tui.NewFlow(rt.Out.Stderr(), !rt.CanPrompt(), rt.Out.NoColor(), rt.Globals.Quiet)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Flow ignores JSON silence contract

Medium Severity

tui.NewFlow is only passed rt.Globals.Quiet, so under --json (without --quiet) the guided rail still writes Intro/Step/Say/Receipt chatter to stderr. The rest of this command still uses rt.Out.*, which suppresses on json || quiet, so --json previously produced clean stderr and now leaks plain Flow narration before the JSON envelope. Apple setup/check are JSON-scripted paths; this breaks that contract.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 63c5ec9. Configure here.

@joshdholtz
joshdholtz merged commit b58511a into main Aug 24, 2026
10 checks passed
@joshdholtz
joshdholtz deleted the dx-997-apps-apple-guided branch August 25, 2026 19:01
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