[PULSE-49] Welcome flow, add-site step 2, shared ScriptSetupBlock, and dashboard empty state #17
Reference in New Issue
Block a user
No description provided.
Delete Branch "staging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work Item
PULSE-49
Summary
/sites/new(script + verify + edit details)./welcomeand/sites/new.Changes
components/sites/ScriptSetupBlock.tsx— Shared block: framework picker, script snippet with copy (always visible,aria-label), “View all integrations” and “See full [Framework] guide” links; used by welcome step 5,/sites/newstep 2, and site settings.app/sites/new/layout.tsx— Metadata: title “Create site | Pulse”, description for new site page.app/welcome/layout.tsx— Metadata: title “Welcome | Pulse”, description for welcome page.lib/welcomeAnalytics.ts: New events and helpers:site_created_from_dashboard,site_created_script_copied;trackSiteCreatedFromDashboard(),trackSiteCreatedScriptCopied()(emit onpulse_welcome).app/sites/new/page.tsx: Two-step flow: after create, show step 2 (ScriptSetupBlock, Verify installation modal, Edit site details link). Persist step 2 in sessionStorage (pulse_last_created_site) and restore on refresh viagetSite(id). “Back to dashboard” callsrouter.refresh()thenrouter.push('/'). Solo plan at limit:atLimitstate, disable Create Site, optional message. Tracksite_created_from_dashboardon create andsite_created_script_copiedvia ScriptSetupBlockonScriptCopy.app/welcome/page.tsx: Step 5 usesScriptSetupBlock; “View all integrations” and “See full [Framework] guide” open in new tab. Removed local script/framework UI and related imports/state.app/page.tsx: RenderSiteListonly whensitesLoading || sites.length > 0so the duplicate “No sites yet” empty state is not shown when there are no sites.app/sites/[id]/settings/page.tsx: Tracking Script section replaced withScriptSetupBlock(framework picker + script + copy). Removed localscriptCopied,copyScript, andAPI_URLimport; copy button always visible with accessible label.Test Plan
/sites/new: Create site → step 2 shows (script + framework + verify); “Edit site details” returns to form with name/domain; “Verify installation” opens modal; refresh on step 2 keeps step 2; “Back to dashboard” shows new site in list./sites/newredirects or form shows with Create Site disabled./welcome, “Create site | Pulse” on/sites/new.pulse_welcome; confirmsite_created_from_dashboardandsite_created_script_copiedwhen adding site from dashboard and copying script.Greptile Overview
Greptile Summary
This PR successfully implements a unified welcome/onboarding flow with improved UX for site creation. The changes consolidate duplicate script setup UI into a shared
ScriptSetupBlockcomponent that's reused across welcome, site creation, and settings pages.Key improvements:
/welcome) with workspace setup, plan selection, and optional first site/sites/new) showing setup instructions after creationScriptSetupBlockcomponent eliminates code duplication across 3 locationsArchitecture:
The code is well-structured, follows React best practices, and maintains consistency with the existing codebase. No critical issues found.
Confidence Score: 5/5
Important Files Changed
Sequence Diagram