diff --git a/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap b/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap index 5683057..1154241 100644 --- a/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap +++ b/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap @@ -127,7 +127,7 @@ exports[`happy-path flow > navigates Welcome → SystemCheck → Authenticate ────────────────────────────────────────────────────────────────────────────────────────────────── - Toggle features to set up (select none to skip): + Toggle features to set up: ❯ Feature Flags Event Tracking diff --git a/__tests__/e2e/__snapshots__/select-goal.e2e.ts.snap b/__tests__/e2e/__snapshots__/select-goal.e2e.ts.snap index 71b86c3..7ecc6c9 100644 --- a/__tests__/e2e/__snapshots__/select-goal.e2e.ts.snap +++ b/__tests__/e2e/__snapshots__/select-goal.e2e.ts.snap @@ -15,7 +15,7 @@ exports[`SelectGoal screen > shows goal options for a browser framework > select ────────────────────────────────────────────────────────────────────────────────────────────────── - Toggle features to set up (select none to skip): + Toggle features to set up: ❯ Feature Flags Event Tracking diff --git a/__tests__/e2e/select-goal.e2e.ts b/__tests__/e2e/select-goal.e2e.ts index 698aa3b..6464461 100644 --- a/__tests__/e2e/select-goal.e2e.ts +++ b/__tests__/e2e/select-goal.e2e.ts @@ -83,13 +83,14 @@ describe('SelectGoal screen', () => { expect(session.snapshot()).toContain('instrument event tracking'); }); - it('advances to Done when submitting with nothing selected', async () => { + it('stays on goal screen when submitting with nothing selected', async () => { using session = createSession(); await navigateToGoalSelection(session); await session.press('Enter'); - await session.waitForText('Onboarding skipped'); + await session.waitForText('Feature Flags'); + await session.waitForText('Toggle features to set up'); }); it('shows goal selection for non-browser project without recording option', async () => { diff --git a/__tests__/ui/screens/SelectGoalScreen.test.tsx b/__tests__/ui/screens/SelectGoalScreen.test.tsx index 535e9cc..a750b0c 100644 --- a/__tests__/ui/screens/SelectGoalScreen.test.tsx +++ b/__tests__/ui/screens/SelectGoalScreen.test.tsx @@ -99,7 +99,7 @@ describe('SelectGoalScreen', () => { }); }); - it('advances to Done when submitting with nothing selected', async () => { + it('stays on goal screen when submitting with nothing selected', async () => { using project = createProjectDir(); using sut = renderApp({ @@ -115,7 +115,8 @@ describe('SelectGoalScreen', () => { await act(() => sut.stdin.write(ENTER)); await waitFor(() => { - expect(sut.lastFrame()).toContain('Onboarding skipped'); + expect(sut.lastFrame()).toContain('Feature Flags'); + expect(sut.lastFrame()).toContain('Toggle features to set up'); }); }); diff --git a/src/ui/tui/screen-transitions.ts b/src/ui/tui/screen-transitions.ts index 9251506..642a174 100644 --- a/src/ui/tui/screen-transitions.ts +++ b/src/ui/tui/screen-transitions.ts @@ -10,7 +10,7 @@ export const SCREEN_TRANSITIONS = { [ScreenId.Authenticate]: { next: ScreenId.InstallPlugins }, [ScreenId.InstallPlugins]: { next: ScreenId.ConnectTools }, [ScreenId.ConnectTools]: { next: ScreenId.SelectGoal }, - [ScreenId.SelectGoal]: { next: ScreenId.OnboardProject, skip: ScreenId.Done }, + [ScreenId.SelectGoal]: { next: ScreenId.OnboardProject }, [ScreenId.OnboardProject]: { next: ScreenId.Done, skip: ScreenId.Done }, [ScreenId.Done]: {}, [ScreenId.About]: {}, diff --git a/src/ui/tui/screens/select-goal/components/BottomPrompt.tsx b/src/ui/tui/screens/select-goal/components/BottomPrompt.tsx index a124832..5e6aeb4 100644 --- a/src/ui/tui/screens/select-goal/components/BottomPrompt.tsx +++ b/src/ui/tui/screens/select-goal/components/BottomPrompt.tsx @@ -10,7 +10,7 @@ export function BottomPrompt({ goalSelection }: GoalSelectionProps) { return ( diff --git a/src/ui/tui/screens/select-goal/telemetry-events.ts b/src/ui/tui/screens/select-goal/telemetry-events.ts index b8fb1ae..4f58fa2 100644 --- a/src/ui/tui/screens/select-goal/telemetry-events.ts +++ b/src/ui/tui/screens/select-goal/telemetry-events.ts @@ -3,7 +3,3 @@ import type { TelemetryEvent } from '@lib/telemetry.js'; export function goalsSelected(goals: string[]): TelemetryEvent { return { step: 'select-goal.select', action: goals.join(',') }; } - -export function goalSkipped(): TelemetryEvent { - return { step: 'select-goal.skip', action: 'skipped', completion: 'completing' }; -} diff --git a/src/ui/tui/screens/select-goal/useGoalSelection.ts b/src/ui/tui/screens/select-goal/useGoalSelection.ts index da3f545..2ba493f 100644 --- a/src/ui/tui/screens/select-goal/useGoalSelection.ts +++ b/src/ui/tui/screens/select-goal/useGoalSelection.ts @@ -4,7 +4,6 @@ import { BROWSER_PLATFORMS } from '@lib/sdk-options.js'; import { track } from '@lib/telemetry.js'; import { useNavigation } from '../../hooks/useNavigation.js'; import { useLogger } from '../../hooks/useLog.js'; -import { skipped } from '../../lib/log-messages.js'; import { store, useSession } from '../../store.js'; import { goalLabel } from './actions.js'; import { goalsChosen } from './log-messages.js'; @@ -23,12 +22,7 @@ export function useGoalSelection(): GoalSelection { const recordingAvailable = !!session.framework && BROWSER_PLATFORMS.has(session.framework); function submitGoals(values: OnboardingGoal[]) { - if (values.length === 0) { - track(te.goalSkipped()); - log(skipped()); - navigate.to('skip'); - return; - } + if (values.length === 0) return; store.setOnboardingGoals(values); track(te.goalsSelected(values));