chore: no more local onboarding - #5510
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe web application imports 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/routes/Root.tsx`:
- Around line 318-319: Update InitialInteractiveOnboardingModal’s modalOpen()
expression in Root.tsx to require !DEV_MODE_ENV, preventing the modal from
opening in development mode while preserving the existing mobile and
feature-flag conditions. Add regression coverage verifying the modal remains
closed when DEV_MODE_ENV is enabled.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: d9b1e42c-9a5a-40fe-b4c7-60aa04d9f8af
📒 Files selected for processing (4)
apps/web/src/components/app/Layout.tsxapps/web/src/features/auth/EmailAuth.tsxapps/web/src/features/auth/Login.tsxapps/web/src/routes/Root.tsx
| if (DEV_MODE_ENV) return <Navigate href="/" />; | ||
|
|
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Guard InitialInteractiveOnboardingModal in development mode.
These route guards cover direct /setup and /onboarding entry, but InitialInteractiveOnboardingModal is still mounted from apps/web/src/routes/Root.tsx Line [735]. Its modalOpen() expression at Lines [620]-[628] has no DEV_MODE_ENV check. A first-time non-native mobile user still satisfies isMobile(). A desktop user still satisfies the flag-off branch after the flag resolves. Both cases can open onboarding in development mode.
Add !DEV_MODE_ENV to modalOpen() and add regression coverage for development mode.
Proposed fix
const modalOpen = () =>
open() &&
+ !DEV_MODE_ENV &&
// Onboarding-v4 replaces this modal on desktop; the Layout redirectAlso applies to: 337-338
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/web/src/routes/Root.tsx` around lines 318 - 319, Update
InitialInteractiveOnboardingModal’s modalOpen() expression in Root.tsx to
require !DEV_MODE_ENV, preventing the modal from opening in development mode
while preserving the existing mobile and feature-flag conditions. Add regression
coverage verifying the modal remains closed when DEV_MODE_ENV is enabled.
synoet
left a comment
There was a problem hiding this comment.
This would disable onboarding in dev, which I don't think we want. I think instead we should have an env feature flag which gets set when you use just run_local
I switched to LOCAL_ONLY, I think that does what we want |
|
This should be its own nob. You can use the existing feature flag and tune it to resolve to false when local is running. That way if someone does want to test it locally it is easy to turn back on. |
No description provided.