[WEB-6840] feat: skip role & use-case steps for self-hosted instances#8890
Conversation
📝 WalkthroughWalkthroughThe onboarding flow is modified to conditionally adjust steps and transitions based on whether an instance is self-managed. Step ordering is now dynamically constructed, and navigation paths change according to the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 docstrings
🧪 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 |
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
There was a problem hiding this comment.
Pull request overview
Updates the web onboarding flow to streamline self-hosted (self-managed) instances by skipping the role and use-case steps, while keeping the progress/header behavior consistent with the revised step sequence.
Changes:
- Skip ROLE_SETUP and USE_CASE_SETUP after PROFILE_SETUP when the instance is self-managed.
- Update the onboarding header “back” navigation and progress step calculation to reflect the self-managed step sequence.
- Adjust progress step ordering to include
INVITE_MEMBERSwhen it’s actually shown (avoids progress miscount when the invite step is reached).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/web/core/components/onboarding/root.tsx | Adds self-managed branching to skip role/use-case steps and route directly to workspace/onboarding completion. |
| apps/web/core/components/onboarding/header.tsx | Makes progress/back-navigation aware of self-managed step order and dynamically derives total steps from step order. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/web/core/components/onboarding/root.tsx (1)
104-104: Consider usingworkspacesList.lengthin the dependency array.
workspacesListis created viaObject.values(workspaces ?? {})on line 33, producing a new array reference each render. This causeshandleStepChangeto be recreated unnecessarily. Since the callback only checksworkspacesList.length, use the length directly:♻️ Suggested improvement
- [stepChange, finishOnboarding, workspacesList, isSelfManaged] + [stepChange, finishOnboarding, workspacesList.length, isSelfManaged]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/web/core/components/onboarding/root.tsx` at line 104, The dependency array for the memoized callback (handleStepChange) currently includes workspacesList (created from Object.values(workspaces ?? {})), which produces a new array each render; change the dependency to depend on workspacesList.length (or compute a stable workspaceCount from workspaces and use that) instead of the full array so handleStepChange isn't recreated unnecessarily; update the dependency array used where stepChange, finishOnboarding, workspacesList, isSelfManaged are listed to replace workspacesList with workspacesList.length (or workspaceCount) and keep references to stepChange, finishOnboarding, and isSelfManaged unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@apps/web/core/components/onboarding/root.tsx`:
- Line 104: The dependency array for the memoized callback (handleStepChange)
currently includes workspacesList (created from Object.values(workspaces ??
{})), which produces a new array each render; change the dependency to depend on
workspacesList.length (or compute a stable workspaceCount from workspaces and
use that) instead of the full array so handleStepChange isn't recreated
unnecessarily; update the dependency array used where stepChange,
finishOnboarding, workspacesList, isSelfManaged are listed to replace
workspacesList with workspacesList.length (or workspaceCount) and keep
references to stepChange, finishOnboarding, and isSelfManaged unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9a627a99-1cc4-47eb-b9c9-45e873d8c1d6
📒 Files selected for processing (2)
apps/web/core/components/onboarding/header.tsxapps/web/core/components/onboarding/root.tsx
|
This comment was auto-generated by Plane |
Description
This PR updates the self-hosted onboarding flow by skipping the role and use-case steps.
Type of Change
Media
Summary by CodeRabbit