feat(onboarding): split git connect and repo select into separate steps#2389
Merged
Merged
Conversation
Splits the combined "pick repo + connect GitHub" step into two pages: - `connect-git` (optional) — merges the existing CLI install check page with the GitHub OAuth panel. Explains what git integration unlocks (cloud sandboxes, branch pushes, in-app PR review). - `select-repo` (final) — folder picker only, with an explicit "Skip & get started" path. When skipped, `useSetupDiscovery` already no-ops on empty `selectedDirectory`, so enricher-based first-task suggestions naturally skip too. Also retires the `tools_not_installed` skip reason in favor of `no_repo_selected`, and renames `cli_skipped` → `repo_skipped` on the ONBOARDING_COMPLETED event to match the new final step. Generated-By: PostHog Code Task-Id: d15be8ed-c5d9-44cc-8cc7-de90e1e84f2e
ConnectGitStep was ~900 lines covering three independent concerns. Split into: - `GitHubConnectPanel` — self-contained GitHub OAuth UI (status header, alternative-project copy, connect buttons, integration rows, disconnect dialog). - `CliCheckPanel` + `InstalledBadge` — generic shell for the Git / GitHub CLI install panels, deduping the near-identical Box + header + spinner +status-badge scaffold. - `ConnectGitStep` — now ~350 lines, orchestrates the header, benefits list, the three panels, and step actions. No behavior change. Generated-By: PostHog Code Task-Id: d15be8ed-c5d9-44cc-8cc7-de90e1e84f2e
Adds tracking for the new connect-git step, following the analytics conventions in docs/conventions.md (Object verbed naming, generic-event- with-discriminator-property over bespoke events). - `Onboarding github connect started` — fires on any GitHub connect button click, with `flow_type` (team_existing / team_alternative / user_new) and `is_retry`. Captures the click→success funnel that `Onboarding github connected` (success) alone can't measure. - `Onboarding github connect failed` — fires on OAuth error / timeout, deduped per failure fingerprint so it doesn't refire on re-renders. Properties: `reason` (timeout / error), `error_type` (from the GithubUserConnectError code). - `Onboarding step completed` extended with optional context fields (`github_connected`, `git_installed`, `gh_installed`, `gh_authenticated`) populated when leaving the connect-git step, so the snapshot at the decision point rides on the existing generic step event rather than on a bespoke `Onboarding git setup completed` event. `onNext` now optionally accepts a step-completion context, threaded through to `trackStepCompleted`. Other steps continue to call `onNext()` with no args. Generated-By: PostHog Code Task-Id: d15be8ed-c5d9-44cc-8cc7-de90e1e84f2e
The combined connect-git screen had three concerns (benefits intro, GitHub OAuth panel, two CLI install panels) and overflowed the viewport. Splits it into two shorter, focused steps: - `connect-github` — header, benefits list (cloud sandboxes / branch pushes / PR review), and the GitHub OAuth panel. - `install-cli` — Git and GitHub CLI install panels. Step tracking carries the relevant snapshot per step on the existing `Onboarding step completed` event: `github_connected` from the GitHub step, and `git_installed` / `gh_installed` / `gh_authenticated` from the CLI step. `GitHubConnectPanel` and `CliCheckPanel` are unchanged and reused as-is. Generated-By: PostHog Code Task-Id: d15be8ed-c5d9-44cc-8cc7-de90e1e84f2e
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/features/onboarding/components/GitHubConnectPanel.tsx:42
The `PANEL_SHADOW` constant carries the same value already defined in `CliCheckPanel.tsx` (line 5) and again in `SelectRepoStep.tsx` (line 20). Having three identical definitions violates the OnceAndOnlyOnce principle that the repo follows. Extracting this to a shared constants file (e.g. `onboardingStyles.ts`) would make future theme changes a one-line edit.
```suggestion
export const PANEL_SHADOW = "0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02)";
```
Reviews (1): Last reviewed commit: "refactor(onboarding): split connect-git ..." | Re-trigger Greptile |
Extracts the existing inline "Optional" pill from GitHubConnectPanel into a shared OptionalBadge component and renders it next to the connect-github and install-cli step titles. The body copy no longer leads with "Optional," — it now reads naturally as a description of what the step unlocks. Generated-By: PostHog Code Task-Id: d15be8ed-c5d9-44cc-8cc7-de90e1e84f2e
Three onboarding components defined an identical PANEL_SHADOW constant. Extract it to onboardingStyles.ts so future theme changes are a one-line edit. Generated-By: PostHog Code Task-Id: d15be8ed-c5d9-44cc-8cc7-de90e1e84f2e
Generated-By: PostHog Code Task-Id: d15be8ed-c5d9-44cc-8cc7-de90e1e84f2e
jonathanlab
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Streamlines onboarding by splitting the previously combined "pick repo + connect GitHub" step into two pages:
connect-git(optional) — merges the existing CLI install check page with the GitHub OAuth panel. Explains what git integration unlocks: cloud sandboxes, branch pushes, in-app PR review.select-repo(final) — folder picker only, with an explicit Skip & get started path. When skipped,useSetupDiscoveryalready no-ops on emptyselectedDirectory, so enricher-based first-task suggestions naturally skip too.Also retires the
tools_not_installedskip reason in favor ofno_repo_selected, and renamescli_skipped→repo_skippedon theONBOARDING_COMPLETEDevent to match the new final step.Structural cleanup
ConnectGitStep.tsxstarted at ~900 lines covering three independent concerns. A follow-up commit splits it into:GitHubConnectPanel.tsx— self-contained GitHub OAuth UI (status header, alternative-project copy, connect buttons, integration rows, disconnect dialog).CliCheckPanel.tsx+InstalledBadge— generic shell for the Git / GitHub CLI install panels, deduping the near-identical Box + header + spinner + status-badge scaffold.ConnectGitStep.tsxnow ~350 lines of orchestration.Test plan
welcomeand confirm both new steps render and animate correctly.connect-git, verify all three panels render: GitHub OAuth (Optional badge when not connected, Connected/Reconnect-needed states when connected), Git CLI, GitHub CLI.select-repo, verify the button flips between Get started (when a folder is selected) and Skip & get started (when empty).repo_skippedproperty onONBOARDING_COMPLETED.