Skip to content

Conversation

@jnsdls
Copy link
Member

@jnsdls jnsdls commented Apr 15, 2025

Improve RPC Usage Graphs

This PR enhances the RPC usage graphs in the dashboard:

  • Only show rate limited requests in the legend when there are actually rate limited requests
  • Fix data processing by removing the .slice(1, -1) which was incorrectly trimming data points
  • Ensure numeric values by explicitly converting to Number
  • Move data slicing to the parent component for better control
  • Add a type assertion comment to handle the TypeScript warning
  • Add a check to conditionally display relevant chart configuration

These changes improve the accuracy and presentation of the RPC usage data visualization.


PR-Codex overview

This PR focuses on improving the CountGraph component by enhancing data handling and display logic, specifically related to rate limits and formatting of the current rate limit.

Detailed summary

  • Updated currentRateLimit display to use toLocaleString().
  • Added hasAnyRateLimited to check for rate-limited requests.
  • Modified config to conditionally include rateLimitedCount based on hasAnyRateLimited.
  • Ensured numeric conversion for includedCount and rateLimitedCount in data mapping.

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

@vercel vercel bot temporarily deployed to Preview – docs-v2 April 15, 2025 20:54 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui April 15, 2025 20:54 Inactive
@vercel
Copy link

vercel bot commented Apr 15, 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 Apr 15, 2025 9:23pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Apr 15, 2025 9:23pm
login ⬜️ Skipped (Inspect) Apr 15, 2025 9:23pm
thirdweb_playground ⬜️ Skipped (Inspect) Apr 15, 2025 9:23pm
wallet-ui ⬜️ Skipped (Inspect) Apr 15, 2025 9:23pm

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground April 15, 2025 20:54 Inactive
@vercel vercel bot temporarily deployed to Preview – login April 15, 2025 20:54 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Apr 15, 2025

⚠️ No Changeset found

Latest commit: baf95b9

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

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Apr 15, 2025
@jnsdls jnsdls marked this pull request as ready for review April 15, 2025 20:54
@jnsdls jnsdls requested review from a team as code owners April 15, 2025 20:54
Copy link
Member Author

jnsdls commented Apr 15, 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.

@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.80%. Comparing base (e29f749) to head (baf95b9).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6737   +/-   ##
=======================================
  Coverage   54.80%   54.80%           
=======================================
  Files         895      895           
  Lines       56384    56384           
  Branches     3850     3850           
=======================================
  Hits        30899    30899           
  Misses      25390    25390           
  Partials       95       95           
Flag Coverage Δ
packages 54.80% <ø> (ø)
🚀 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.

@jnsdls jnsdls force-pushed the Fix_RPC_usage_graphs_and_improve_rate_limit_visualization branch from d74d78a to 1b941b3 Compare April 15, 2025 20:58
@vercel vercel bot temporarily deployed to Preview – login April 15, 2025 20:58 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 April 15, 2025 20:58 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground April 15, 2025 20:58 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui April 15, 2025 20:58 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Apr 15, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 50.42 KB (0%) 1.1 s (0%) 227 ms (+289.77% 🔺) 1.3 s
thirdweb (cjs) 136.84 KB (0%) 2.8 s (0%) 333 ms (+115.25% 🔺) 3.1 s
thirdweb (minimal + tree-shaking) 5.64 KB (0%) 113 ms (0%) 94 ms (+1801.76% 🔺) 207 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 80 ms (+4611.42% 🔺) 90 ms
thirdweb/react (minimal + tree-shaking) 19.4 KB (0%) 388 ms (0%) 117 ms (+989.63% 🔺) 505 ms

@jnsdls jnsdls force-pushed the Fix_RPC_usage_graphs_and_improve_rate_limit_visualization branch from 1b941b3 to a49d8d0 Compare April 15, 2025 21:05
@vercel vercel bot temporarily deployed to Preview – docs-v2 April 15, 2025 21:05 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui April 15, 2025 21:05 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground April 15, 2025 21:05 Inactive
@vercel vercel bot temporarily deployed to Preview – login April 15, 2025 21:05 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Apr 15, 2025

Merge activity

# Improve RPC Usage Graphs

This PR enhances the RPC usage graphs in the dashboard:

- Only show rate limited requests in the legend when there are actually rate limited requests
- Fix data processing by removing the `.slice(1, -1)` which was incorrectly trimming data points
- Ensure numeric values by explicitly converting to Number
- Move data slicing to the parent component for better control
- Add a type assertion comment to handle the TypeScript warning
- Add a check to conditionally display relevant chart configuration

These changes improve the accuracy and presentation of the RPC usage data visualization.

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `CountGraph` component by improving the handling of rate-limited data and formatting the `currentRateLimit` value for better readability.

### Detailed summary
- Updated the `currentRateLimit` display to use `toLocaleString()`.
- Added a check for `hasAnyRateLimited` to conditionally configure the chart.
- Modified the `config` object to include `rateLimitedCount` only if there are any rate-limited requests.
- Converted `includedCount` and `rateLimitedCount` to `Number` type during data mapping.

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

<!-- end pr-codex -->
@graphite-app graphite-app bot force-pushed the Fix_RPC_usage_graphs_and_improve_rate_limit_visualization branch from a49d8d0 to baf95b9 Compare April 15, 2025 21:16
@vercel vercel bot temporarily deployed to Preview – wallet-ui April 15, 2025 21:16 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground April 15, 2025 21:16 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 April 15, 2025 21:16 Inactive
@vercel vercel bot temporarily deployed to Preview – login April 15, 2025 21:16 Inactive
@graphite-app graphite-app bot merged commit baf95b9 into main Apr 15, 2025
23 checks passed
@graphite-app graphite-app bot deleted the Fix_RPC_usage_graphs_and_improve_rate_limit_visualization branch April 15, 2025 21:23
@vercel vercel bot temporarily deployed to Production – thirdweb_playground April 15, 2025 21:23 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 April 15, 2025 21:23 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui April 15, 2025 21:23 Inactive
@vercel vercel bot temporarily deployed to Production – login April 15, 2025 21:23 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.

4 participants