Skip to content

feat: migrate to api_pro billing and add credits-based usage display#729

Merged
graphite-app[bot] merged 1 commit intomainfrom
merge-nova-console
Feb 10, 2026
Merged

feat: migrate to api_pro billing and add credits-based usage display#729
graphite-app[bot] merged 1 commit intomainfrom
merge-nova-console

Conversation

@Prasanna721
Copy link
Member

Summary

  • Migrate from consumer_pro to api_pro billing product across the app
  • Enable Nova app for all users (remove feature flag)
  • Add credits-based usage tracking with tokens abstraction

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
supermemory-mcp f523bbe Feb 10 2026, 05:29 AM

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 10, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
supermemory-app 11a0abd Feb 10 2026, 05:59 AM

Copy link
Member Author


How to use the Graphite Merge Queue

Add the label Main to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Prasanna721 Prasanna721 self-assigned this Feb 10, 2026
@Prasanna721 Prasanna721 requested a review from Dhravya February 10, 2026 05:46
@Prasanna721 Prasanna721 marked this pull request as ready for review February 10, 2026 05:46
Comment on lines 69 to 75
setIsUpgrading(true)
try {
await autumn.attach({
productId: "consumer_pro",
productId: "api_pro",
successUrl: window.location.href,
})
} catch (error) {

This comment was marked as outdated.

@graphite-app
Copy link

graphite-app bot commented Feb 10, 2026

Merge activity

…729)

Summary

  - Migrate from consumer_pro to api_pro billing product across the app
  - Enable Nova app for all users (remove feature flag)
  - Add credits-based usage tracking with tokens abstraction
@graphite-app graphite-app bot force-pushed the merge-nova-console branch from 363ae2a to 11a0abd Compare February 10, 2026 05:53
@claude
Copy link

claude bot commented Feb 10, 2026

Code Review

Found 2 significant issues in this PR:

Issue 1: Scale/Enterprise users will be treated as free users

The PR adds api_scale and api_enterprise to fetchSubscriptionStatus, and the new useTokenUsage hook correctly handles all three plan tiers. However, multiple components only check status.api_pro to determine paid status, which will cause Scale/Enterprise users to be incorrectly treated as free users.

Affected files:

  1. apps/web/components/new/settings/connections-mcp.tsx:350 - Only checks api_pro. Scale/Enterprise users will have connections disabled.

  2. apps/web/components/views/billing.tsx:32-35 - Only checks api_pro. Scale/Enterprise users will see free-tier billing view.

  3. apps/web/components/views/profile.tsx:56-60 - Only checks api_pro. Scale/Enterprise users will see "Free Plan" label and upgrade prompts.

  4. apps/web/hooks/use-memories-usage.ts:12-13 - Only checks api_pro. Returns hasProProduct = false for Scale/Enterprise users.

  5. apps/web/components/new/add-document/connections.tsx:62 - Only checks product ID api_pro. Scale/Enterprise users will have isProUser = false.

  6. apps/web/components/views/connections-tab-content.tsx:64 - Only checks product ID api_pro. Scale/Enterprise users will have isProUser = false.

  7. apps/web/components/views/integrations.tsx:186 - Only checks product ID api_pro. Scale/Enterprise users will have isProUser = false.

Fix: Update these components to check all three plan tiers, following the pattern in useTokenUsage:

const hasProProduct = 
  status.api_enterprise?.status !== null ||
  status.api_scale?.status !== null ||
  status.api_pro?.status !== null

For components checking autumn.customer?.products, check for all three product IDs:

const isProUser = autumn.customer?.products.some((product) => 
  product.id === "api_pro" || 
  product.id === "api_scale" || 
  product.id === "api_enterprise"
)

Issue 2: Hardcoded Pro-tier features shown for all paid plans

In apps/web/components/new/settings/account.tsx:476-494, the "Current plan" card correctly shows the dynamic plan name ({planDisplayNames[currentPlan]} plan), but the feature list is hardcoded with Pro-tier limits:

  • "30 credits / 3M tokens"
  • "100K search queries"
  • "10 connections"

Scale and Enterprise users would see their correct plan name ("Scale plan" or "Enterprise plan") but Pro-level feature descriptions.

Fix: Make the feature list dynamic based on currentPlan, or render tier-specific feature lists conditionally.


Both issues stem from the same root cause: the migration from single-tier (consumer_pro) to multi-tier (api_pro/api_scale/api_enterprise) billing was incomplete. The new useTokenUsage hook demonstrates the correct pattern for multi-tier support.

@graphite-app graphite-app bot merged commit 11a0abd into main Feb 10, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants