fix(dashboard): render OnboardingTour for first-time users#2306
fix(dashboard): render OnboardingTour for first-time users#2306nyxsky404 wants to merge 1 commit into
Conversation
|
@nyxsky404 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
The CI failures on this PR (Playwright smoke tests and Playwright visual regression) are pre-existing broken tests on Root causes fixed:
Fixes have been applied to this branch. CI is Green. |
|
This PR has merge conflicts with the current git fetch origin main
git merge origin/main
# resolve conflicts
git push |
OnboardingTour was fully implemented (driver.js tour, seen_onboarding PATCH, DB migration) but was never imported or rendered anywhere, making the entire onboarding feature unreachable. DashboardHeader already fetches /api/user/settings on mount, so seen_onboarding is now read from that response alongside is_public. The tour renders only when seen_onboarding is false, and defaults to true so the tour does not flash for returning users if the fetch is slow or fails. Fixes Umbrella-io#2302
b69e4e6 to
16d82b6
Compare
Summary
OnboardingTourwas a fully-implemented component (driver.js guided tour,seen_onboardingPATCH, Supabase migration) that was never imported or rendered anywhere in the app, making the entire onboarding feature silently unreachable. This PR wires it up with a minimal, safe integration.Closes #2302
Type of Change
What Changed
src/components/DashboardHeader.tsxOnboardingTourseenOnboardingstate (defaults totrue— safe fallback so tour does not flash for returning users if the settings fetch is slow or fails)seen_onboardingfrom the existing/api/user/settingsresponse alongsideis_public— no extra network request<OnboardingTour />conditionally whenseenOnboarding === falseNo changes to
OnboardingTour.tsxitself — themarkTourSeen()PATCH on dismiss was already correct.How to Test
seen_onboarding = falsein theuserstable for your account)./dashboard.seen_onboardingbeing set totruein the DB after step 4).Expected result: New users see the onboarding tour exactly once. Returning users see nothing.
Checklist
console.log, debug code, or commented-out blockspnpm run type-check— errors shown are all pre-existing)/api/user/settingsfetch already present inDashboardHeaderAdditional Context
seenOnboardingdefaults totrueintentionally. This ensures that if the settings API is slow, errored, or the field is null/undefined, the tour does not fire unexpectedly for returning users. It will correctly flip tofalseonly when the API explicitly returnsseen_onboarding: false(i.e., a genuinely new user).