Skip to content

Update credit purchase terminology in billing section #7705

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

Merged

Conversation

jnsdls
Copy link
Member

@jnsdls jnsdls commented Jul 24, 2025

Update Credit Balance Section UI

This PR updates the UI text in the credit balance section to improve clarity:

  • Changed "Top Up Credits" to "Credits" in the section header
  • Updated tooltip text from "Only team owners can top up credits" to "Only team owners can purchase credits"
  • Changed button text from "Top Up With Crypto" to "Buy Credits"

Summary by CodeRabbit

  • Style
    • Updated text labels in the credit balance section for improved clarity, including changes to headings, tooltips, button text, and summary labels.

PR-Codex overview

This PR focuses on renaming various UI elements related to credit transactions in the CreditBalanceSection component to enhance clarity and consistency in terminology.

Detailed summary

  • Changed heading from Top Up Credits to Credits.
  • Updated tooltip message from Only team owners can top up credits. to Only team owners can purchase credits.
  • Renamed button text from Top Up With Crypto to Buy Credits.
  • Modified summary labels from Top-up amount: to Added credits: in multiple places.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Jul 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2025 6:44pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Jul 25, 2025 6:44pm
nebula ⬜️ Skipped (Inspect) Jul 25, 2025 6:44pm
thirdweb_playground ⬜️ Skipped (Inspect) Jul 25, 2025 6:44pm
wallet-ui ⬜️ Skipped (Inspect) Jul 25, 2025 6:44pm

@vercel vercel bot temporarily deployed to Preview – docs-v2 July 24, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 24, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 24, 2025 22:28 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 24, 2025 22:28 Inactive
Copy link

changeset-bot bot commented Jul 24, 2025

⚠️ No Changeset found

Latest commit: 2996121

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Jul 24, 2025

Walkthrough

The changes update user-facing text labels in the credit balance section of the dashboard team billing UI. Headings, tooltips, and button text are revised to use "Credits" and "Buy Credits" instead of "Top Up Credits" and related phrases. No logic or control flow is modified.

Changes

File(s) Change Summary
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/components/credit-balance-section.client.tsx Updated displayed text: heading, tooltip, button label, and top-up summary labels to use "Credits" and "Buy Credits".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3a0e43 and 2996121.

📒 Files selected for processing (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/components/credit-balance-section.client.tsx (6 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/components/credit-balance-section.client.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Size
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Update_credit_purchase_terminology_in_billing_section

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Jul 24, 2025
Copy link
Member Author

jnsdls commented Jul 24, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@jnsdls jnsdls marked this pull request as ready for review July 24, 2025 22:29
@jnsdls jnsdls requested review from a team as code owners July 24, 2025 22:29
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.18%. Comparing base (cd6fd9a) to head (2996121).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7705   +/-   ##
=======================================
  Coverage   56.18%   56.18%           
=======================================
  Files         908      908           
  Lines       58236    58236           
  Branches     4200     4200           
=======================================
  Hits        32718    32718           
  Misses      25410    25410           
  Partials      108      108           
Flag Coverage Δ
packages 56.18% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/components/credit-balance-section.client.tsx (1)

71-76: Align terminology across the component for consistency

The section heading now reads “Credits”, but the summary block below (lines 238–259) still uses “Top-up amount”. Consider renaming those labels (and perhaps the TopUpSummary* component IDs) to avoid mixing the old and new terms.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1607229 and a3a0e43.

📒 Files selected for processing (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/components/credit-balance-section.client.tsx (3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/components/credit-balance-section.client.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/components/credit-balance-section.client.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

apps/{dashboard,playground-web}/**/*.{ts,tsx}: Import UI primitives from @/components/ui/* (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Use NavLink for internal navigation with automatic active states in dashboard and playground apps
Use Tailwind CSS only – no inline styles or CSS modules
Use cn() from @/lib/utils for conditional class logic
Use design system tokens (e.g., bg-card, border-border, text-muted-foreground)
Server Components (Node edge): Start files with import "server-only";
Client Components (browser): Begin files with 'use client';
Always call getAuthToken() to retrieve JWT from cookies on server side
Use Authorization: Bearer header – never embed tokens in URLs
Return typed results (e.g., Project[], User[]) – avoid any
Wrap client-side data fetching calls in React Query (@tanstack/react-query)
Use descriptive, stable queryKeys for React Query cache hits
Configure staleTime/cacheTime in React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never import posthog-js in server components

Files:

  • apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/components/credit-balance-section.client.tsx
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/components/credit-balance-section.client.tsx (9)

Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (useState, useEffect, React Query, wallet hooks).

Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Stick to design-tokens: background (bg-card), borders (border-border), muted text (text-muted-foreground) etc.

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., bg-card, border-border, text-muted-foreground)

Learnt from: arcoraven
PR: #7505
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/analytics/components/WebhookAnalyticsCharts.tsx:186-204
Timestamp: 2025-07-10T10:18:33.238Z
Learning: The ThirdwebBarChart component in apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/analytics/components/WebhookAnalyticsCharts.tsx does not accept standard accessibility props like aria-label and role in its TypeScript interface, causing compilation errors when added.

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions

Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: Button, Input, Select, Tabs, Card, Sidebar, Separator, Badge.

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Client Components (browser): Begin files with 'use client';

Learnt from: MananTank
PR: #7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:153-226
Timestamp: 2025-06-10T00:50:20.795Z
Learning: In apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx, the updateStatus function correctly expects a complete MultiStepState["status"] object. For pending states, { type: "pending" } is the entire status object. For error states, { type: "error", message: React.ReactNode } is the entire status object. The current code incorrectly spreads the entire step object instead of passing just the status object.

Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on AnnouncementBanner, GenericLoadingPage, EmptyStateCard.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/billing/components/credit-balance-section.client.tsx (2)

155-156: Tooltip copy LGTM

Updated copy matches the new wording and the conditional rendering remains intact.


166-173: URL still references /topup – verify backend route before merging

While the button text now says “Buy Credits”, the checkout path is unchanged (/checkout/${teamSlug}/topup).
If the backend route was also renamed, this link will 404; if not, the mixed terminology is harmless but slightly confusing.
Please confirm the route name is still valid or update it alongside the UI wording.

- href={`/checkout/${teamSlug}/topup?amount=${selectedAmount}`}
+ href={`/checkout/${teamSlug}/credits?amount=${selectedAmount}`}   // example if backend changed

Copy link
Contributor

github-actions bot commented Jul 24, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.33 KB (0%) 1.3 s (0%) 182 ms (+111.47% 🔺) 1.5 s
thirdweb (cjs) 353.15 KB (0%) 7.1 s (0%) 615 ms (+3.89% 🔺) 7.7 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 106 ms (+2491.02% 🔺) 220 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 32 ms (+1125.79% 🔺) 42 ms
thirdweb/react (minimal + tree-shaking) 19.24 KB (0%) 385 ms (0%) 53 ms (+373.66% 🔺) 438 ms

@jnsdls jnsdls force-pushed the Update_credit_purchase_terminology_in_billing_section branch from a3a0e43 to 2bd59dd Compare July 24, 2025 22:38
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 24, 2025 22:39 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 July 24, 2025 22:39 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 24, 2025 22:39 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 24, 2025 22:39 Inactive
@jnsdls jnsdls force-pushed the Update_credit_purchase_terminology_in_billing_section branch from 2bd59dd to 1306047 Compare July 24, 2025 22:39
@vercel vercel bot temporarily deployed to Preview – docs-v2 July 24, 2025 22:39 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 24, 2025 22:39 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 24, 2025 22:39 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 24, 2025 22:39 Inactive
@jnsdls jnsdls force-pushed the Update_credit_purchase_terminology_in_billing_section branch from 1306047 to da21ef8 Compare July 24, 2025 22:39
@vercel vercel bot temporarily deployed to Preview – nebula July 24, 2025 22:39 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 24, 2025 22:39 Inactive
Copy link
Contributor

graphite-app bot commented Jul 25, 2025

Merge activity

# Update Credit Balance Section UI

This PR updates the UI text in the credit balance section to improve clarity:

- Changed "Top Up Credits" to "Credits" in the section header
- Updated tooltip text from "Only team owners can top up credits" to "Only team owners can purchase credits"
- Changed button text from "Top Up With Crypto" to "Buy Credits"

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Style**
  * Updated text labels in the credit balance section for improved clarity, including changes to headings, tooltips, and button text.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the terminology related to credit purchases in the `CreditBalanceSection` component, making it clearer for users. The changes enhance the user experience by refining the language used in the interface.

### Detailed summary
- Changed heading from `Top Up Credits` to `Credits`.
- Updated tooltip message from `Only team owners can top up credits.` to `Only team owners can purchase credits.`.
- Renamed button text from `Top Up With Crypto` to `Buy Credits`.
- Modified summary label from `Top-up amount:` to `Added credits:` in multiple places.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@graphite-app graphite-app bot force-pushed the Update_credit_purchase_terminology_in_billing_section branch from da21ef8 to 2996121 Compare July 25, 2025 18:36
@vercel vercel bot temporarily deployed to Preview – docs-v2 July 25, 2025 18:36 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 25, 2025 18:36 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 25, 2025 18:36 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 25, 2025 18:36 Inactive
@graphite-app graphite-app bot merged commit 2996121 into main Jul 25, 2025
25 checks passed
@graphite-app graphite-app bot deleted the Update_credit_purchase_terminology_in_billing_section branch July 25, 2025 18:45
@vercel vercel bot temporarily deployed to Production – thirdweb_playground July 25, 2025 18:45 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui July 25, 2025 18:45 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 July 25, 2025 18:45 Inactive
@vercel vercel bot temporarily deployed to Production – nebula July 25, 2025 18:45 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants