-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat: rehaul onboarding for updated billing #7965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 issues found across 27 files
Prompt for AI agents (all 6 issues)
Understand the root cause of the following 6 issues and fix them.
<file name="core/protocol/passThrough.ts">
<violation number="1" location="core/protocol/passThrough.ts:86">
New message type requires corresponding IntelliJ ContinueBrowser update; missing mapping may break webview→core pass-through in IntelliJ.</violation>
</file>
<file name="extensions/cli/src/ui/FreeTrialTransitionUI.tsx">
<violation number="1" location="extensions/cli/src/ui/FreeTrialTransitionUI.tsx:179">
Updated URL to "settings/billing" conflicts with tests expecting "setup-models"; update tests or ensure route mapping to avoid failures.</violation>
</file>
<file name="gui/src/pages/gui/OutOfCreditsDialog.tsx">
<violation number="1" location="gui/src/pages/gui/OutOfCreditsDialog.tsx:22">
Use ideMessenger.request for controlPlane/openUrl and include orgSlug: undefined per project rules to ensure consistent behavior and org scoping.</violation>
</file>
<file name="gui/src/components/StarterCreditsButton.tsx">
<violation number="1" location="gui/src/components/StarterCreditsButton.tsx:59">
Progress bar uses inconsistent currency units (total=50 while values are treated as cents), causing incorrect display and percentage.</violation>
</file>
<file name="gui/src/components/OnboardingCard/components/OnboardingModelsAddOnTab.tsx">
<violation number="1" location="gui/src/components/OnboardingCard/components/OnboardingModelsAddOnTab.tsx:35">
Use ideMessenger.request for controlPlane/openUrl per project rule; replace post with await request to ensure consistency and reliable handling.</violation>
<violation number="2" location="gui/src/components/OnboardingCard/components/OnboardingModelsAddOnTab.tsx:50">
Use ideMessenger.request for controlPlane/openUrl instead of post to follow project rules; keep void to intentionally ignore the promise.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
"controlPlane/getEnvironment", | ||
"controlPlane/getFreeTrialStatus", | ||
"controlPlane/getModelsAddOnUpgradeUrl", | ||
"controlPlane/getCreditStatus", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New message type requires corresponding IntelliJ ContinueBrowser update; missing mapping may break webview→core pass-through in IntelliJ.
Prompt for AI agents
Address the following comment on core/protocol/passThrough.ts at line 86:
<comment>New message type requires corresponding IntelliJ ContinueBrowser update; missing mapping may break webview→core pass-through in IntelliJ.</comment>
<file context>
@@ -83,8 +83,7 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] =
"controlPlane/getEnvironment",
- "controlPlane/getFreeTrialStatus",
- "controlPlane/getModelsAddOnUpgradeUrl",
+ "controlPlane/getCreditStatus",
"controlPlane/openUrl",
"isItemTooBig",
</file context>
<SecondaryButton | ||
className="flex flex-row items-center gap-2 hover:opacity-70" | ||
onClick={() => { | ||
ideMessenger.post("controlPlane/openUrl", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use ideMessenger.request for controlPlane/openUrl and include orgSlug: undefined per project rules to ensure consistent behavior and org scoping.
Prompt for AI agents
Address the following comment on gui/src/pages/gui/OutOfCreditsDialog.tsx at line 22:
<comment>Use ideMessenger.request for controlPlane/openUrl and include orgSlug: undefined per project rules to ensure consistent behavior and org scoping.</comment>
<file context>
@@ -0,0 +1,34 @@
+ <SecondaryButton
+ className="flex flex-row items-center gap-2 hover:opacity-70"
+ onClick={() => {
+ ideMessenger.post("controlPlane/openUrl", {
+ path: "/settings/billing",
+ });
</file context>
gui/src/components/OnboardingCard/components/OnboardingModelsAddOnTab.tsx
Outdated
Show resolved
Hide resolved
gui/src/components/OnboardingCard/components/OnboardingModelsAddOnTab.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 26 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="gui/src/components/StarterCreditsButton.tsx">
<violation number="1" location="gui/src/components/StarterCreditsButton.tsx:58">
The "Starter credits usage" bar is driven by the remaining balance (`creditBalance`), so users see 100% usage when their balance is full and 0% when it is depleted. Please compute usage as total minus balance before passing it to the progress bar.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
return ( | ||
<ProgressBar | ||
label="Starter credits usage" | ||
current={creditStatus.creditBalance ?? 0} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Starter credits usage" bar is driven by the remaining balance (creditBalance
), so users see 100% usage when their balance is full and 0% when it is depleted. Please compute usage as total minus balance before passing it to the progress bar.
Prompt for AI agents
Address the following comment on gui/src/components/StarterCreditsButton.tsx at line 58:
<comment>The "Starter credits usage" bar is driven by the remaining balance (`creditBalance`), so users see 100% usage when their balance is full and 0% when it is depleted. Please compute usage as total minus balance before passing it to the progress bar.</comment>
<file context>
@@ -0,0 +1,211 @@
+ return (
+ <ProgressBar
+ label="Starter credits usage"
+ current={creditStatus.creditBalance ?? 0}
+ total={50}
+ />
</file context>
…ddOnTab.tsx Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
…ddOnTab.tsx Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Description
this pr makes language changes necessary for updated billing + makes general improvements to onboarding flows
Summary by cubic
Revamped onboarding to use credits-based billing instead of the free trial. Adds credit status APIs and starter credits UI, updates out-of-credits handling, and removes legacy free-trial flows.
New Features
Refactors