Repository navigation
feat(dashboard): end onboarding with a compact plan step - #1096
izadoesdev wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
The latest updates on your projects. Learn more about Unkey Deploy
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Observability score · 31poor · unchanged against 1 instrumented · 0 partial · 8 dark Fix first (3)
evlog map v0.8.0 · how the score works · what each check expects |
This comment has been minimized.
This comment has been minimized.
|
| <div className="h-full overflow-y-auto"> | ||
| <div className="mx-auto w-full max-w-3xl px-4 py-6 sm:px-6 lg:py-10"> | ||
| <div className="mb-4 flex items-center justify-between gap-3"> | ||
| <h1 className="font-semibold text-xl">Pick a plan</h1> |
There was a problem hiding this comment.
Required text classes are missing
The new heading lacks text-balance, and the allowance paragraph lacks text-pretty. The UI guide requires these classes for headings and paragraphs. Add both before merging.
Context Used: .cursor/rules/ui-guidelines.mdc (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| websiteId | ||
| ? { | ||
| label: reviewPending | ||
| ? "Checking Insights…" | ||
| : opensInsights | ||
| ? "Open Insights" | ||
| : "Open dashboard", | ||
| onClick: finish, | ||
| loading: reviewPending || research.saving, | ||
| note: reviewFailed | ||
| ? "Failed to check Insights." | ||
| : opensInsights | ||
| ? "Your first review runs once there is enough history to compare." | ||
| : null, | ||
| onRetry: reviewFailed ? billing.refetch : undefined, | ||
| } | ||
| ? offersPlans | ||
| ? { label: "Continue", onClick: choosePlan } | ||
| : { ...leaveAction, onClick: finish } | ||
| : null |
There was a problem hiding this comment.
The new finish expression nests one ternary inside another, which the repository guide forbids. Calculate the finish action separately with early returns or if statements so the three cases are easier to follow. This requirement must be satisfied before merging.
Context Used: Ultracite Rules - AI-Ready Formatter and Linter (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| successPath, | ||
| }: { | ||
| finish: NonNullable<SetupChecklistProps["finish"]>; | ||
| onBack: () => void; |
There was a problem hiding this comment.
Callback names lack required suffix
The new callback types use onBack and onPlanUpdated without the required Action suffix. The repository guide requires function properties in types to end with Action. Rename these properties and their callers before merging. The same rule applies to the new onPlanUpdated properties in PricingTable and PricingCard.
Context Used: Basic guidelines for the project so vibe coders don't fuck it up (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
75a9c8a to
fa6dc1c
Compare
|
found a small bug while reviewing this - offersPlans gates on billing.isLoading, so a reload while on step=plan (e.g. checkout return) briefly falls through to SetupChecklist until billing refetches, then flips to ChoosePlan. opened a stacked fix: #1111 |
After setup, owners and admins on cloud pick a plan from one card that lists each plan's monthly allowances, price and upgrade action, then open the dashboard or Insights. Checkout returns to the same step. (cherry picked from commit 8c5517d)
The plan step now also needs the onboarding-plan-step flag, so it can reach half of new owners first. Billing only reports an error or a pending check when its data is missing, so a failed plan list or a background refetch no longer turns Open Insights into Open dashboard. Returning to the plan step from checkout or a reload no longer repeats the onboarding started and tracking verified events. (cherry picked from commit efbd272)
…step Members without billing rights no longer see plans while billing loads or fails, the card no longer claims Free when billing failed, and going back to setup after checkout records tracking verification again. (cherry picked from commit 6fa430d)
E2E and self-host builds skip the Autumn provider, so the plan step crashed there. It now needs a live billing build and the onboarding-plan-step flag, and the e2e specs return to main's flow. The pricing table drops props only onboarding used, and the plan step file is named after its component.
E2E builds skip the Autumn provider in the app layout, so the plan step is exercised on a key-gated public fixture. It checks plan rows and allowances, recovery after the plan list fails, and that checkout returns to the onboarding plan step.
fa6dc1c to
4950c0c
Compare
Cherry-pick of staging 8c5517d.
Why
New owners finished onboarding without ever seeing what paid plans give them. A plan checkpoint added earlier sat between feature picks and setup and dropped the full Billing table into the flow, before the user had connected anything.
What changes
websiteandstep=planare kept in the URL).PricingCardinto a sharedPlanButton, so Billing and onboarding buy plans the same way.isError/isFetching; the plans error state has a retry.Verification
Summary by cubic
Adds a final Pick a plan step after the onboarding setup checklist so cloud owners and admins can upgrade before opening the dashboard.
onboarding-plan-stepflag and a live billing build; self-hosted installs, E2E, members without billing rights, and billing failures skip it.step=planURL, so a completed upgrade unlocks "Open Insights" right away.PricingTableinto a sharedPlanButton, and billing reportsisError/isFetchingonly when its data is missing, so a failed plan list or background refetch no longer turns Open Insights into Open dashboard.Written for commit 4950c0c. Summary will update on new commits.
Rollout
The step is gated by the
onboarding-plan-stepflag on the dashboard's flag website (OXmNQsViBT-FOS_wZCTHc). Until that flag exists and is on for a user, onboarding behaves as it does today. Create it as a rollout flag at 50%. E2E runs with flags disabled, so the gate treats E2E as on.Review fixes (46f009b)
isError/isFetchingonly report missing billing data, so a failed plan list or a background refetch no longer turns Open Insights into Open dashboard.onboarding_startedand the tracking-verified events.