Skip to content

feat(quickstart): adjust welcome screen content when features preset - #113

Merged
bespoyasov merged 6 commits into
mainfrom
feat/welcome-screen-ui
Oct 9, 2026
Merged

bespoyasov merged 6 commits into
mainfrom
feat/welcome-screen-ui

Conversation

@bespoyasov

Copy link
Copy Markdown
Collaborator

Summary

  • Extract capitalize and conjoin string utilities into packages/core/src/utils/strings.ts, replacing duplicated join logic in build-prompt.ts
  • Add goal-aware text helpers (tagline, intro, steps) in the welcome screen's content.ts slice — when --features is preset, the welcome screen shows tailored copy instead of the generic defaults
  • Add unit tests for capitalize/conjoin and for preset-goal welcome screen rendering
  • Add e2e tests for preset-features welcome screen in a dedicated welcome-preset-features.e2e.ts

Text examples

Preset goals Tagline Step 5
--features flags Feature flags, set up with AI in minutes. Show a working feature flag example
--features events Event tracking, set up with AI in minutes. Set up event tracking in your project
--features flags events Feature flags and event tracking, set up with AI in minutes. Set up feature flags and event tracking in your project

@filipmyllari filipmyllari left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review notes (AI-assisted). I read all source changes; tests and the e2e snapshot were only skimmed. Inline comments below.

Comment on lines +26 to +45
export function tagline(session: WizardSession): string {
if (!session.goalsPreset) return DEFAULT_TAGLINE;
return `${capitalize(goalList(session.onboardingGoals))}, set up with AI in minutes.`;
}

export function intro(session: WizardSession): string {
if (!session.goalsPreset) return DEFAULT_INTRO;
return `This wizard will set up ${goalList(session.onboardingGoals)} in your project.`;
}

export function steps(session: WizardSession): readonly string[] {
if (!session.goalsPreset) return DEFAULT_STEPS;
const goals = session.onboardingGoals;
const common = DEFAULT_STEPS.slice(0, 4);
const last =
goals.length === 1 && goals[0] === 'feature-flags'
? DEFAULT_STEPS[4]
: `Set up ${goalList(goals)} in your project`;
return [...common, last];
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The welcome copy uses the raw preset onboardingGoals, but useGoalSelection later drops session-recordings on non-browser frameworks (continueWithoutRecordings). So --features recordings on a Go project promises "Session recordings, set up with AI in minutes" and then says recordings aren't supported. Filter out incompatible goals here, or fall back to the default copy when the preset contains a goal that may be dropped.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added a warning about incompatibility on the welcome screen and removed the “Start” option if features are preset to be recordings


export function tagline(session: WizardSession): string {
if (!session.goalsPreset) return DEFAULT_TAGLINE;
return `${capitalize(goalList(session.onboardingGoals))}, set up with AI in minutes.`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Goals aren't deduped (commands/default.ts:21 maps --features as-is), so --features flags flags renders "Feature flags and feature flags, ...". The prompt preamble in build-prompt.ts has the same issue. Suggest [...new Set(goals)] in default.ts so every consumer benefits.

import type { WizardSession } from '@spotify-confidence/core';
import { capitalize, conjoin } from '@spotify-confidence/core';

const GOAL_NAMES: Record<OnboardingGoal, string> = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a third goal→label map, alongside GOAL_LABELS in build-prompt.ts and goalLabel in select-goal/actions.ts. They'll drift when a goal is added. Consider reusing goalLabel (lower-cased) or moving one shared map into ui/lib/.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'd push back: they are different in the contents yet. Extracting and adding conditions to figure out what to render where will probably be convoluted

Comment on lines +39 to +44
const common = DEFAULT_STEPS.slice(0, 4);
const last =
goals.length === 1 && goals[0] === 'feature-flags'
? DEFAULT_STEPS[4]
: `Set up ${goalList(goals)} in your project`;
return [...common, last];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Step 4 "Integrate the SDK into your project" overlaps with "Set up event tracking in your project". With flags + another goal, the "working feature flag example" step disappears entirely. Consider keeping step 5 whenever feature-flags is included and adding a separate step for the other goals.

@@ -0,0 +1,8 @@
export function capitalize(s: string): string {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

capitalize('') / conjoin([]) return ''. content.ts relies on goalsPreset implying at least one goal; if that ever broke, the tagline would render ", set up with AI in minutes." A guard or a comment would make the dependency explicit.

bespoyasov and others added 4 commits October 9, 2026 13:04
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…goals

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bespoyasov
bespoyasov merged commit d8b5395 into main Oct 9, 2026
6 checks passed
@bespoyasov
bespoyasov deleted the feat/welcome-screen-ui branch October 9, 2026 11:43
@github-actions github-actions Bot mentioned this pull request Oct 9, 2026
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.

2 participants