feat(onboarding): strip app chrome during onboarding#3402
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds onboarding chrome state handling and minimal account-menu rendering, then wires onboarding picker and configure-deployment navigation around that state. ChangesOnboarding chrome and navigation
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/deploy-web/src/hooks/useOnboardingChrome.spec.ts (1)
59-65: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winAdd a regression test for the non-onboarding + no-managed-wallet case.
None of the current cases cover
isOnboarding: falsecombined with ahasManagedWalletthat never becomestrue(i.e., a regular, non-trial user). Per the current implementation this yieldsisResolving: trueindefinitely — worth locking in the intended behavior (or catching the bug) with an explicit test once the logic inuseOnboardingChrome.tsis resolved.🤖 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/deploy-web/src/hooks/useOnboardingChrome.spec.ts` around lines 59 - 65, Add a regression test in useOnboardingChrome.spec for the non-onboarding flow where isOnboarding is false and hasManagedWallet stays false, using useOnboardingChrome and setup to assert the intended result for a regular user. Cover the case where the hook should not remain in a perpetual resolving state, or explicitly lock in the current behavior if that is the intended contract, so this combination is exercised alongside the existing onboarding/trial-wallet cases.
🤖 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.
Nitpick comments:
In `@apps/deploy-web/src/hooks/useOnboardingChrome.spec.ts`:
- Around line 59-65: Add a regression test in useOnboardingChrome.spec for the
non-onboarding flow where isOnboarding is false and hasManagedWallet stays
false, using useOnboardingChrome and setup to assert the intended result for a
regular user. Cover the case where the hook should not remain in a perpetual
resolving state, or explicitly lock in the current behavior if that is the
intended contract, so this combination is exercised alongside the existing
onboarding/trial-wallet cases.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 95ff3c25-9a22-46a6-8023-24720dff3396
📒 Files selected for processing (8)
apps/deploy-web/src/components/layout/AccountMenu.spec.tsxapps/deploy-web/src/components/layout/AccountMenu.tsxapps/deploy-web/src/components/layout/Layout.tsxapps/deploy-web/src/components/layout/Nav.tsxapps/deploy-web/src/components/onboarding-picker/OnboardingPickerPage.spec.tsxapps/deploy-web/src/components/onboarding-picker/OnboardingPickerPage.tsxapps/deploy-web/src/hooks/useOnboardingChrome.spec.tsapps/deploy-web/src/hooks/useOnboardingChrome.ts
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3402 +/- ##
==========================================
- Coverage 71.88% 70.80% -1.08%
==========================================
Files 1150 1062 -88
Lines 29098 26807 -2291
Branches 7155 6727 -428
==========================================
- Hits 20916 18982 -1934
+ Misses 7185 6859 -326
+ Partials 997 966 -31
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
During onboarding (trialing users on /new-deployment/configure with the onboarding_redesign_v1 flag on), hide the sidebar, drop WalletStatus, and reduce the profile dropdown to Logout only. The same reduced dropdown is added to the /onboarding picker header so mobile users retain a logout path. A new useOnboardingChrome hook is the single source of truth (tri-state: stripped / resolving / full) and holds Layout with a neutral spinner until the onboarding state resolves, avoiding a chrome flash in either direction. Ships fully dark behind the existing redesign flag.
a5bc9ca to
1472637
Compare
Chrome stripping keyed off isOnboarding (user + isTrialing), so it stayed on for every trial user creating any deployment, not just their first. Use the lease-based onboarded signal (same as RequireOnboarding) so the chrome returns once a user has deployed, even while still on a trial.
Why
During onboarding (before a user's first deployment), the full sidebar nav and complete profile dropdown invite the user off the onboarding path, and the
/onboardingpicker has no way to sign out. This presents a focused, distraction-free experience during onboarding and restores full chrome once the user is past it.Closes CON-637
What
Ships fully dark behind the existing
console_onboarding_redesignflag; zero behavior change when off and only affects the redesign trial cohort.useOnboardingChromehook: single source of truth, tri-state{ isStripped, isResolving }, gated on the redesign flag ANDisOnboarding(trial) AND routestartsWith/new-deployment/configure.AccountMenugets aminimalprop that reduces the signed-in menu to Logout only.Navinminimalmode dropsWalletStatusand the hamburger, and shows the reduced menu at all breakpoints so mobile users keep a logout path (previously only reachable via the sidebar drawer, which is now hidden).Layoutholds with a neutral centered spinner while onboarding state is resolving (covers the wallet-query load and the brief trial-provisioning window), avoiding a chrome flash in either direction; omits the sidebar and its left offset when stripped./onboardingpicker header gets the same reduced dropdown (hardcodedminimal).Unit specs cover the hook (tri-state across flag/route/onboarding/resolving), the
AccountMenuminimal variant, and the picker menu. Layout/Nav wiring verified via tsc + lint (no existing specs; MUI/media-query heavy).Summary by CodeRabbit