Skip to content

feat(onboarding): add first-run home tour and teaching empty states#133

Merged
liam-russell merged 3 commits into
mainfrom
feat/onboarding-walkthrough
Jul 6, 2026
Merged

feat(onboarding): add first-run home tour and teaching empty states#133
liam-russell merged 3 commits into
mainfrom
feat/onboarding-walkthrough

Conversation

@liam-russell

Copy link
Copy Markdown
Contributor

Type

  • feat — new feature or user-visible capability

Summary

  • Added a first-run walkthrough on the home screen explaining the workspace → worktree → agent workflow, with a "Replay walkthrough" button in the titlebar so it's never lost for good.
  • Rewrote the "No worktrees yet" empty state in the worktree sidebar to explain what a worktree is (an isolated working copy per branch) and the create-worktree → launch-agent sequence, instead of just prompting to create one.

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:

  • Home tour, step 1 of 3 ("Start with a workspace"): spotlights the Start actions panel (Clone/Open/Import/New from idea) with a rounded cutout and a themed popover (--sg-* tokens, matches dialog styling).
  • Home tour, step 3 of 3 ("Then: worktrees + agents"): a centered summary card explaining create-worktree → launch-agent, no target element.
  • Empty worktree sidebar: "No worktrees yet" with the isolated-working-copy explanation, a numbered 1) create worktree / 2) launch agent list, and the existing "Create first worktree" CTA.

Breaking changes

None

Test plan

  • pnpm lint && pnpm typecheck && pnpm test all pass (unit tests across all packages + full WebdriverIO E2E suite, 15 spec files).
  • Added 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.
  • The auto-launch-on-first-run path is deliberately gated off in E2E (api.isE2E, backed by webPreferences.additionalArguments so 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 regress import-workflow.spec.ts / new-from-idea-workflow.spec.ts.
  • Manually verified via screenshots that navigating away from home mid-tour (without dismissing it) doesn't leave the tour's overlay stuck on top of the workspace view (driver.js appends its DOM straight to document.body, outside React's tree, so this needed an explicit unmount-cleanup effect).

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
Copilot AI review requested due to automatic review settings July 6, 2026 10:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.isE2E flag propagated via Electron additionalArguments to 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

Comment thread e2e/specs/onboarding-walkthrough.spec.ts Outdated
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
@liam-russell liam-russell merged commit 649ef4f into main Jul 6, 2026
15 checks passed
@liam-russell liam-russell deleted the feat/onboarding-walkthrough branch July 6, 2026 10:38
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.

Onboard the worktree-first mental model (first-run walkthrough + teaching empty states)

2 participants