feat(onboarding): add first-run home tour and teaching empty states#133
Merged
Conversation
Onboards the worktree-first mental model: a driver.js-powered walkthrough on the home screen (workspace -> worktree -> agent), replayable via a header button, and a rewritten "No worktrees yet" empty state in the sidebar that explains what a worktree is before prompting to create one. Closes #87
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-run onboarding to better teach SproutGit’s “workspace → worktree → agent” workflow, combining an interactive home-screen tour with improved “no worktrees yet” teaching copy and E2E coverage.
Changes:
- Introduces a 3-step home-screen walkthrough using
driver.js, plus a persistent “Replay walkthrough” titlebar button. - Rewrites the worktree sidebar empty state to explain worktrees and the create-worktree → launch-agent sequence (and adds E2E-stable testids).
- Adds E2E coverage for the tour dismissal persistence and the updated empty-state CTA; adds an
api.isE2Eflag propagated via ElectronadditionalArgumentsto gate auto-launch in tests.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Locks new driver.js dependency and updates lock snapshot entries. |
| app/package.json | Adds driver.js dependency for renderer onboarding tour. |
| app/src/renderer/routes/index.tsx | Wires tour auto-launch rules, replay button, and cleanup to prevent overlay persistence across route changes. |
| app/src/renderer/workspace/WorktreeSidebar.tsx | Improves “no worktrees” empty state with teaching copy + CTA testid. |
| app/src/renderer/onboarding/homeTour.ts | Implements the driver.js tour definition and dismissal handling. |
| app/src/renderer/onboarding/tour-theme.css | Themes driver.js UI using --sg-* design tokens. |
| app/src/preload/index.ts | Exposes window.api.isE2E derived from renderer argv. |
| app/src/main/index.ts | Forwards --sproutgit-e2e into renderer argv via additionalArguments in E2E mode. |
| e2e/specs/onboarding-walkthrough.spec.ts | Adds E2E spec covering tour replay/dismissal persistence and the worktree empty-state CTA. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
The dismissal setting is written from the onDismiss callback wired up in routes/index.tsx, not from homeTour.ts itself — it only invokes whatever callback it's given.
…hrough # Conflicts: # app/src/renderer/workspace/WorktreeSidebar.tsx
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.
Type
Summary
Why
Worktree-first is SproutGit's core differentiator, but it's an unfamiliar mental model for most Git GUI users, and the empty states didn't teach it. Builds on the "New from idea" flow (#74). Closes #87.
Screenshots / recordings
Captured via the E2E screenshot pipeline (WebdriverIO driving the real Electron build) in dark mode:
--sg-*tokens, matches dialog styling).Breaking changes
None
Test plan
pnpm lint && pnpm typecheck && pnpm testall pass (unit tests across all packages + full WebdriverIO E2E suite, 15 spec files).e2e/specs/onboarding-walkthrough.spec.ts: drives the tour via the replay button through all 3 steps and asserts dismissal persists via the "Got it" button, verifies an early close via the X button also persists dismissal, and verifies the empty-worktree teaching copy + its "Create first worktree" button opens the New Worktree dialog.api.isE2E, backed bywebPreferences.additionalArgumentsso the flag actually reaches the renderer) since WebdriverIO reruns the whole app fresh per spec file and several existing specs interact with the home screen immediately — verified this fix doesn't regressimport-workflow.spec.ts/new-from-idea-workflow.spec.ts.document.body, outside React's tree, so this needed an explicit unmount-cleanup effect).