fix: remove auto-open of demo onboarding modal#1728
fix: remove auto-open of demo onboarding modal#1728ToriChanIntegration wants to merge 1 commit intoCap-go:mainfrom
Conversation
The demo modal no longer auto-opens when users have no apps. Users can still trigger it explicitly via ?show-onboarding-demo=1 query param.
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/dashboard/DemoOnboardingGate.vue`:
- Around line 57-58: The app-count fetch pipeline is running unnecessarily
because :open now depends only on shouldForceShowDemoOnboarding, making
fetchAppsCount/hasNoApps/shouldShowDemoOnboarding dead for render while still
executing; update the code so fetchAppsCount (and any watcher/effect that calls
it on init/org change) is short-circuited when
shouldForceShowDemoOnboarding.value is true — e.g., add a guard in the
initialization/watcher that checks shouldForceShowDemoOnboarding before invoking
fetchAppsCount or computing hasNoApps, or remove the unused reactive dependency
in shouldShowDemoOnboarding and relocate fetchAppsCount to only run when the
non-forced path is active, ensuring Supabase queries are skipped when forced
demo onboarding is enabled.
| // Only show when explicitly requested via query param | ||
| return shouldForceShowDemoOnboarding.value |
There was a problem hiding this comment.
Line 58 makes the app-count fetch pipeline dead, but it still runs on every init/org change.
Since :open now depends on shouldShowDemoOnNoApps -> shouldForceShowDemoOnboarding, fetchAppsCount()/hasNoApps/shouldShowDemoOnboarding no longer affect rendering, yet Supabase apps count queries still execute. This adds avoidable backend load and noisy error paths.
♻️ Proposed cleanup (minimal, behavior-preserving)
async function initDemoOnboarding() {
await organizationStore.awaitInitialLoad()
- updateDemoOnboardingState()
- await fetchAppsCount()
}
-watch(currentOrganization, async () => {
- await initDemoOnboarding()
-})
+// No org-dependent app-count fetch needed for query-param-only gating.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/components/dashboard/DemoOnboardingGate.vue` around lines 57 - 58, The
app-count fetch pipeline is running unnecessarily because :open now depends only
on shouldForceShowDemoOnboarding, making
fetchAppsCount/hasNoApps/shouldShowDemoOnboarding dead for render while still
executing; update the code so fetchAppsCount (and any watcher/effect that calls
it on init/org change) is short-circuited when
shouldForceShowDemoOnboarding.value is true — e.g., add a guard in the
initialization/watcher that checks shouldForceShowDemoOnboarding before invoking
fetchAppsCount or computing hasNoApps, or remove the unused reactive dependency
in shouldShowDemoOnboarding and relocate fetchAppsCount to only run when the
non-forced path is active, ensuring Supabase queries are skipped when forced
demo onboarding is enabled.
|



The demo modal no longer auto-opens when users have no apps. Users can still trigger it explicitly via
?show-onboarding-demo=1query param.Summary by CodeRabbit
Release Notes