Skip to content

docs: add docs on aggregates #7201

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
merged 1 commit into from
May 29, 2025
Merged

Conversation

catalyst17
Copy link
Contributor

@catalyst17 catalyst17 commented May 29, 2025

[Portal] Feature: Add Aggregation Examples and Documentation to Insight

Notes for the reviewer

This PR adds comprehensive documentation for the Insight aggregation functionality across multiple pages:

  • Added an "Aggregation Examples" section to the LLMs page with code samples
  • Added detailed aggregation documentation to the Agents and LLMs page
  • Added aggregation examples to the Blueprints page for Events, Transactions, Wallet Transactions, and Blocks
  • Added FAQs about aggregation queries
  • Added "Using Aggregation Presets" section to the Get Started page
  • Enhanced Use Cases page with example aggregations for relevant scenarios

How to test

Review the documentation for clarity and accuracy. The examples should be consistent with the actual API functionality.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive examples and explanations for using aggregation functions in Insight API queries across multiple documentation sections, including blueprints, use cases, FAQs, and getting started guides.
    • Introduced new sections detailing aggregation presets, usage patterns, and code snippets for blockchain data analysis.
    • Enhanced clarity on performing statistical and summary queries, with guidance on leveraging the Insight Playground for interactive exploration.
    • Updated the Insight landing page with a new feature card highlighting powerful aggregation capabilities and improved layout for feature cards.

PR-Codex overview

This PR introduces new aggregation features and examples to enhance the documentation of the Insight tool, including the addition of a new icon and updates to existing content regarding aggregation queries.

Detailed summary

  • Added FunctionSquareIcon to the imports in page.mdx.
  • Updated the grid layout from 2 to 3 columns in a feature card section.
  • Introduced a new feature card titled "Powerful Aggregations."
  • Added sections on aggregation queries in faqs/page.mdx with examples.
  • Included aggregation usage in get-started/page.mdx.
  • Expanded examples of aggregation functions in agents-and-llms/llmstxt/page.mdx.
  • Updated use cases in use-cases/page.mdx to include aggregation examples.
  • Added aggregation examples in blueprints/page.mdx for events and transactions.
  • Provided detailed aggregation examples in agents-and-llms/page.mdx for various scenarios.

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

Copy link

vercel bot commented May 29, 2025

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2025 5:45pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
login ⬜️ Skipped (Inspect) May 29, 2025 5:45pm
thirdweb_playground ⬜️ Skipped (Inspect) May 29, 2025 5:45pm
thirdweb-www ⬜️ Skipped (Inspect) May 29, 2025 5:45pm
wallet-ui ⬜️ Skipped (Inspect) May 29, 2025 5:45pm

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 29, 2025 16:36 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 29, 2025 16:36 Inactive
Copy link

linear bot commented May 29, 2025

INFRA-1406 Update docs

@vercel vercel bot temporarily deployed to Preview – login May 29, 2025 16:36 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 29, 2025 16:36 Inactive
Copy link

changeset-bot bot commented May 29, 2025

⚠️ No Changeset found

Latest commit: b345cc1

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 May 29, 2025

"""

Walkthrough

New sections and examples illustrating aggregation queries were added to the Insight API documentation across multiple pages. These additions include categorized aggregation examples, code snippets, preset function listings, and use-case scenarios for blockchain data analysis. No changes were made to application logic, exported entities, or control flow; all modifications are documentation-only.

Changes

File(s) Change Summary
.../insight/agents-and-llms/llmstxt/page.mdx
.../insight/agents-and-llms/page.mdx
Added sections on aggregation queries, including categorized examples, preset function listings, and usage code snippets.
.../insight/blueprints/page.mdx
.../insight/use-cases/page.mdx
Enhanced blueprint and use-case docs with aggregation query examples for events, transactions, wallets, blocks, and NFT collections.
.../insight/faqs/page.mdx Introduced a new FAQ section on aggregation queries, including code samples and usage guidance.
.../insight/get-started/page.mdx Added a section on using aggregation presets with code examples and instructions for the Insight Playground.
.../insight/page.mdx Updated feature cards grid layout and added a new "Powerful Aggregations" card with icon and link to aggregation docs.

Sequence Diagram(s)

No sequence diagram generated, as the changes are limited to documentation and do not affect control flow or introduce new features.
"""


🪧 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 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 Portal Involves changes to the Portal (docs) codebase. label May 29, 2025
Copy link
Contributor Author


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.

@catalyst17 catalyst17 marked this pull request as ready for review May 29, 2025 16:36
@catalyst17 catalyst17 requested review from a team as code owners May 29, 2025 16:36
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: 2

♻️ Duplicate comments (3)
apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx (3)

56-66: The Wallet-Specific Aggregations block uses the same incorrect domain. Please update all examples.


71-80: The Block Data Aggregations snippet also needs the correct Insight API base URL.


85-94: The Filtering with Aggregations examples should be revised to use insight.thirdweb.com.

🧹 Nitpick comments (7)
apps/portal/src/app/insight/use-cases/page.mdx (4)

22-22: Improve punctuation and markup in table cell
In the "Analyze token economics" row, add a comma after "any token," for clarity. Also, replace embedded <br/> HTML tags with proper Markdown lists or fenced code blocks inside the table cell to make it more maintainable.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...print to get transactions involving any token and then aggregate data based on timest...

(AI_HYDRA_LEO_MISSING_COMMA)


23-23: Refine HTML usage in table cell
The "Analyze gas consumption" use case mixes <br/> tags for line breaks. Consider using Markdown list syntax or a fenced code block for the example aggregations instead of inline HTML.


25-25: Refactor table cell markup
For the NFT collection tracking use case, avoid <br/> tags. Use a multiline code fence or Markdown list within the table cell to present the example aggregations clearly.


27-27: Refactor table cell markup
The multi-chain transactions use case also employs inline HTML <br/> for structure. Switching to pure Markdown (nested lists or code blocks) will improve readability and consistency.

apps/portal/src/app/insight/get-started/page.mdx (1)

149-162: Well-structured transaction stats example
The getTransactionStats snippet clearly demonstrates fetching aggregated metrics. To avoid runtime URL issues, mention that spaces in query parameters (e.g., AS avg_gas) should be URL-encoded (e.g., %20) or constructed via URLSearchParams.

apps/portal/src/app/insight/agents-and-llms/page.mdx (1)

197-205: Highlight URL encoding for aliases
The basic fetch example correctly shows aggregate=function(field) AS alias, but in practice query parameters with spaces must be URL-encoded. Consider adding a callout or a sample using encodeURIComponent for the alias.

apps/portal/src/app/insight/blueprints/page.mdx (1)

113-121: Review: Inconsistent section title
In the Wallet Transactions Blueprint, the heading reads "### Aggregation Examples" (singular) while other blueprints use "### Aggregations Examples" (plural). Please standardize the section title for consistency across all pages.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ff3a79c and e6ab11b.

📒 Files selected for processing (6)
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx (1 hunks)
  • apps/portal/src/app/insight/agents-and-llms/page.mdx (1 hunks)
  • apps/portal/src/app/insight/blueprints/page.mdx (2 hunks)
  • apps/portal/src/app/insight/faqs/page.mdx (1 hunks)
  • apps/portal/src/app/insight/get-started/page.mdx (1 hunks)
  • apps/portal/src/app/insight/use-cases/page.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
apps/portal/src/app/insight/use-cases/page.mdx

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...print to get transactions involving any token and then aggregate data based on timest...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (13)
apps/portal/src/app/insight/get-started/page.mdx (3)

142-144: Clear introduction to aggregation presets
The "Using Aggregation Presets" header and description effectively orient users to the new feature and tie into the Insight Playground.


170-182: Accurate block metrics example
The getBlockMetrics code is consistent with the preceding example and correctly illustrates multiple aggregation parameters.


188-195: Playground usage instructions are clear
The bullet points under "Explore in the Playground" concisely outline key interactive features.

apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx (1)

37-40: The "Aggregation Examples" header and intro text are straightforward and adhere to the existing style.

apps/portal/src/app/insight/agents-and-llms/page.mdx (4)

193-196: The "Aggregations" section header and intro align well with the rest of the page’s style.


217-254: Preset functions are clearly listed
The grouped lists of default, events-specific, transactions-specific, wallet, and blocks presets comprehensively cover available options, improving discoverability.


255-263: Common aggregation examples are useful
The snippet illustrating common fetch patterns reinforces earlier concepts and is well aligned with page conventions.


271-278: Filtering examples align with patterns
The code demonstrates combining filters with aggregates consistently, matching the style of preceding sections.

apps/portal/src/app/insight/blueprints/page.mdx (5)

38-63: Great addition: Events Blueprint aggregation examples
The new "### Aggregations Examples" section under the Events Blueprint clearly demonstrates count, min/max, and custom aggregation use cases with real-world fetch snippets. Examples are accurate, properly formatted, and align with the API surface.


91-99: Nice: Transactions Blueprint aggregation examples
The "### Aggregations Examples" block for transactions provides concise fetch samples for total transaction count and total value transferred. Endpoint usage and query syntax look correct.


101-107: Approve: Analyze Gas Usage example
The gas usage snippet (avg and max) is accurate and clearly demonstrates how to query gas metrics.


123-129: Approve: Wallet summary and fees snippets
These wallet transaction examples correctly illustrate how to fetch total counts, values, and fees for a given address. They align with the API and follow the established pattern.


135-143: Approve: Blocks Blueprint aggregation examples
The block statistics and metrics examples are clear, with correct endpoints and aggregate functions for block count, transactions, and gas usage. Great job.

Copy link
Contributor

github-actions bot commented May 29, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 61.79 KB (0%) 1.3 s (0%) 467 ms (+64.11% 🔺) 1.8 s
thirdweb (cjs) 344.76 KB (0%) 6.9 s (0%) 2.5 s (+1.64% 🔺) 9.4 s
thirdweb (minimal + tree-shaking) 5.69 KB (0%) 114 ms (0%) 29 ms (+15.08% 🔺) 143 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 20 ms (+14.82% 🔺) 31 ms
thirdweb/react (minimal + tree-shaking) 19.54 KB (0%) 391 ms (0%) 115 ms (+146.09% 🔺) 506 ms

Copy link

codecov bot commented May 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.67%. Comparing base (3d3c6f3) to head (b345cc1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7201   +/-   ##
=======================================
  Coverage   55.67%   55.67%           
=======================================
  Files         904      904           
  Lines       58392    58392           
  Branches     4118     4118           
=======================================
  Hits        32510    32510           
  Misses      25776    25776           
  Partials      106      106           
Flag Coverage Δ
packages 55.67% <ø> (ø)
🚀 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.

@catalyst17 catalyst17 force-pushed the arsenii/infra-1406-update-docs branch from e6ab11b to 31adf21 Compare May 29, 2025 17:14
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 29, 2025 17:15 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 29, 2025 17:15 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 29, 2025 17:15 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 29, 2025 17:15 Inactive
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 (5)
apps/portal/src/app/insight/page.mdx (1)

4-4: Import of FunctionSquareIcon for new FeatureCard
The addition of FunctionSquareIcon aligns with the new “Powerful Aggregations” card. Make sure the SVG icon is accessible (e.g., aria-hidden or aria-label) and matches the design system.

apps/portal/src/app/insight/agents-and-llms/page.mdx (4)

197-215: Code samples for basic, multiple, and filtered aggregations
The examples are clear, but string quoting differs from other snippets that use backticks. Consider standardizing on backticks (```) to allow interpolation and match the rest of the documentation.


233-240: Transactions-specific aggregation presets
Good coverage of transaction metrics. Consider adding a brief note on when to choose avg(value) vs. avg(gas_used) in analyses.


255-269: Common Aggregation Examples code snippet
These examples illustrate usage well. To improve consistency, switch the URL strings to backticks and add a short snippet showing how to parse and log the JSON response.


273-285: Filtering with Aggregations code snippet
Solid demonstration of combining filters and aggregates. Optionally, include a sample JSON response to show the structure of the returned data.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e6ab11b and 31adf21.

📒 Files selected for processing (7)
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx (1 hunks)
  • apps/portal/src/app/insight/agents-and-llms/page.mdx (1 hunks)
  • apps/portal/src/app/insight/blueprints/page.mdx (2 hunks)
  • apps/portal/src/app/insight/faqs/page.mdx (1 hunks)
  • apps/portal/src/app/insight/get-started/page.mdx (1 hunks)
  • apps/portal/src/app/insight/page.mdx (3 hunks)
  • apps/portal/src/app/insight/use-cases/page.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/portal/src/app/insight/use-cases/page.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx
  • apps/portal/src/app/insight/get-started/page.mdx
  • apps/portal/src/app/insight/faqs/page.mdx
  • apps/portal/src/app/insight/blueprints/page.mdx
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (8)
apps/portal/src/app/insight/page.mdx (3)

25-25: Updated grid layout to three columns on large screens
Moving from lg:grid-cols-2 to lg:grid-cols-3 ensures the new card fits alongside existing ones. Verify this change across breakpoints (mobile/tablet/desktop) to maintain responsive consistency.


39-44: Add “Powerful Aggregations” FeatureCard
Excellent callout for the aggregation docs. Please confirm that the target anchor #using-aggregations exists in the “Get Started” page and that the link flows as expected.


52-56: Shift “Lightning-Fast Queries” card position
The card has moved to accommodate the new grid. Reviewers should verify that the description still accurately represents the feature and that spacing is consistent with other cards.

apps/portal/src/app/insight/agents-and-llms/page.mdx (5)

193-196: Introduce “### Aggregations” section
Great addition of the aggregation overview. Ensure the heading level matches the surrounding TOC and that it’s included in any generated navigation links.


217-225: List of Default Aggregation Presets
The default presets are well organized. As a refinement, you might link back to the Playground examples for live testing.


227-232: Events-specific aggregation presets
Clear listing of event-centric functions. All aliases follow a consistent naming scheme.


242-247: Wallet Transactions-specific aggregation presets
This block covers key wallet transaction stats. No concerns here.


248-254: Blocks-specific aggregation presets
The block-level metrics are comprehensive. Confirm that transaction_count is documented in the API reference for block responses.

@catalyst17 catalyst17 force-pushed the arsenii/infra-1406-update-docs branch from 31adf21 to 7eae0e2 Compare May 29, 2025 17:21
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 29, 2025 17:21 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 29, 2025 17:21 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 29, 2025 17:21 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 29, 2025 17:21 Inactive
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/portal/src/app/insight/use-cases/page.mdx (1)

22-22: Improve clarity and consistency in the sentence.

Consider removing the article "the" and adding a comma after "token" for better readability and to align with other entries:

- Use the Transactions Blueprint to get transactions involving any token and then aggregate data based on timestamps to calculate 24-hour transaction volumes.
+ Use Transactions Blueprint to get transactions involving any token, and then aggregate data based on timestamps to calculate 24-hour transaction volumes.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...print to get transactions involving any token and then aggregate data based on timest...

(AI_HYDRA_LEO_MISSING_COMMA)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 31adf21 and 7eae0e2.

📒 Files selected for processing (7)
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx (1 hunks)
  • apps/portal/src/app/insight/agents-and-llms/page.mdx (1 hunks)
  • apps/portal/src/app/insight/blueprints/page.mdx (2 hunks)
  • apps/portal/src/app/insight/faqs/page.mdx (1 hunks)
  • apps/portal/src/app/insight/get-started/page.mdx (1 hunks)
  • apps/portal/src/app/insight/page.mdx (3 hunks)
  • apps/portal/src/app/insight/use-cases/page.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • apps/portal/src/app/insight/blueprints/page.mdx
  • apps/portal/src/app/insight/get-started/page.mdx
  • apps/portal/src/app/insight/faqs/page.mdx
  • apps/portal/src/app/insight/page.mdx
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx
  • apps/portal/src/app/insight/agents-and-llms/page.mdx
🧰 Additional context used
🪛 LanguageTool
apps/portal/src/app/insight/use-cases/page.mdx

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...print to get transactions involving any token and then aggregate data based on timest...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
apps/portal/src/app/insight/use-cases/page.mdx (3)

23-23: Verify API field names for gas metrics.

The examples using avg(gas_used), max(gas_used), and sum(gas_used * gas_price) are clear. Please confirm that gas_used and gas_price are the exact field names exposed by the Transactions Blueprint and that the multiplication returns a fee in wei as intended.


25-25: Well-structured NFT aggregation examples.

The use of countDistinct(from_address), countDistinct(to_address), and count() perfectly illustrates unique seller/buyer counts and total transfers. Great clarity.


27-27: Approve cross-chain transaction aggregations; verify filter syntax.

The count() and sum(value) AS total_value_transferred examples neatly demonstrate cross-chain wallet queries. Ensure that the filter parameter chain_ids correctly reflects the API’s naming (e.g., chainIds if camelCase) and supports multi-chain input.

@catalyst17 catalyst17 force-pushed the arsenii/infra-1406-update-docs branch from 7eae0e2 to d913fcf Compare May 29, 2025 17:24
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 29, 2025 17:24 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 29, 2025 17:24 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 29, 2025 17:24 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 29, 2025 17:24 Inactive
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 (3)
apps/portal/src/app/insight/use-cases/page.mdx (3)

22-22: Add punctuation for readability in transaction aggregation description.

Insert a comma before “and then” to improve the sentence flow:

-| Use the Transactions Blueprint to get transactions involving any token and then aggregate data based on timestamps to calculate 24-hour transaction volumes.
+| Use the Transactions Blueprint to get transactions involving any token, and then aggregate data based on timestamps to calculate 24-hour transaction volumes.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...print to get transactions involving any token and then aggregate data based on timest...

(AI_HYDRA_LEO_MISSING_COMMA)


23-23: Maintain consistent article usage for blueprint references.

For grammatical consistency, consider prefixing with “the” to match other sections:

- Use Transactions Blueprint to summarize gas usage...
+ Use the Transactions Blueprint to summarize gas usage...

27-27: Refine use-case wording and validate schema fields.

  • Consider shortening the use-case title to “Fetch cross-chain transactions for a wallet” for brevity.
  • Ensure the field value in sum(value) AS total_value_transferred correctly maps to the transaction amount in the schema.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7eae0e2 and d913fcf.

📒 Files selected for processing (7)
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx (1 hunks)
  • apps/portal/src/app/insight/agents-and-llms/page.mdx (1 hunks)
  • apps/portal/src/app/insight/blueprints/page.mdx (2 hunks)
  • apps/portal/src/app/insight/faqs/page.mdx (1 hunks)
  • apps/portal/src/app/insight/get-started/page.mdx (1 hunks)
  • apps/portal/src/app/insight/page.mdx (3 hunks)
  • apps/portal/src/app/insight/use-cases/page.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • apps/portal/src/app/insight/faqs/page.mdx
  • apps/portal/src/app/insight/page.mdx
  • apps/portal/src/app/insight/blueprints/page.mdx
  • apps/portal/src/app/insight/get-started/page.mdx
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx
  • apps/portal/src/app/insight/agents-and-llms/page.mdx
🧰 Additional context used
🪛 LanguageTool
apps/portal/src/app/insight/use-cases/page.mdx

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...print to get transactions involving any token and then aggregate data based on timest...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/portal/src/app/insight/use-cases/page.mdx (1)

25-25: Verify aggregation function names against the API.

Confirm that the Insight API uses countDistinct (not something like distinctCount) for distinct counts. If the function name differs, update these examples to match the actual API.

Copy link
Contributor

graphite-app bot commented May 29, 2025

Merge activity

# [Portal] Feature: Add Aggregation Examples and Documentation to Insight

## Notes for the reviewer

This PR adds comprehensive documentation for the Insight aggregation functionality across multiple pages:

- Added an "Aggregation Examples" section to the LLMs page with code samples
- Added detailed aggregation documentation to the Agents and LLMs page
- Added aggregation examples to the Blueprints page for Events, Transactions, Wallet Transactions, and Blocks
- Added FAQs about aggregation queries
- Added "Using Aggregation Presets" section to the Get Started page
- Enhanced Use Cases page with example aggregations for relevant scenarios

## How to test

Review the documentation for clarity and accuracy. The examples should be consistent with the actual API functionality.

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

- **Documentation**
  - Added comprehensive examples and explanations for using aggregation functions in Insight API queries across multiple documentation sections, including blueprints, use cases, FAQs, and getting started guides.
  - Introduced new sections detailing aggregation presets, usage patterns, and code snippets for blockchain data analysis.
  - Enhanced clarity on performing statistical and summary queries, with guidance on leveraging the Insight Playground for interactive exploration.
  - Updated the Insight landing page with a new feature card highlighting powerful aggregation capabilities and improved layout for feature cards.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the documentation for the `Insight` tool by adding new aggregation features, examples, and updating existing content to clarify how to utilize these functionalities effectively.

### Detailed summary
- Added `FunctionSquareIcon` to the import statement in `page.mdx`.
- Updated grid layout class from `lg:grid-cols-2` to `lg:grid-cols-3` in `page.mdx`.
- Introduced a new `FeatureCard` titled "Powerful Aggregations" in `page.mdx`.
- Added sections on aggregation queries and examples in `faqs/page.mdx`, `get-started/page.mdx`, and `agents-and-llms/page.mdx`.
- Provided aggregation examples in `use-cases/page.mdx` and `blueprints/page.mdx`.
- Enhanced documentation for wallet transactions and blocks, including aggregation examples in `agents-and-llms/page.mdx`.

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

<!-- end pr-codex -->
@graphite-app graphite-app bot force-pushed the arsenii/infra-1406-update-docs branch from d913fcf to b345cc1 Compare May 29, 2025 17:37
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 29, 2025 17:37 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 29, 2025 17:37 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 29, 2025 17:37 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 29, 2025 17:37 Inactive
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 (3)
apps/portal/src/app/insight/use-cases/page.mdx (2)

22-22: Add comma for clarity in sentence.

The narrative reads “…involving any token and then aggregate…”. Consider adding a comma after “any token” to improve readability:

Use the Transactions Blueprint to get transactions involving any token, and then aggregate data…
🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...print to get transactions involving any token and then aggregate data based on timest...

(AI_HYDRA_LEO_MISSING_COMMA)


27-27: Enclose parameter name in backticks for consistency.

The narrative mentions chain_ids inline. Wrap it in backticks to highlight it as a parameter and confirm the correct key name (chain_id vs chain_ids):

…filter transactions by wallet address across different `chain_id`s…
apps/portal/src/app/insight/blueprints/page.mdx (1)

38-63: Event Blueprint aggregation examples are well structured.

The “### Aggregations Examples” section and its three code snippets clearly demonstrate how to fetch event statistics, track collection activity, and run custom aggregations. For consistency with other sections, consider renaming the heading to singular:

- ### Aggregations Examples
+ ### Aggregation Examples
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d913fcf and b345cc1.

📒 Files selected for processing (7)
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx (1 hunks)
  • apps/portal/src/app/insight/agents-and-llms/page.mdx (1 hunks)
  • apps/portal/src/app/insight/blueprints/page.mdx (2 hunks)
  • apps/portal/src/app/insight/faqs/page.mdx (1 hunks)
  • apps/portal/src/app/insight/get-started/page.mdx (1 hunks)
  • apps/portal/src/app/insight/page.mdx (3 hunks)
  • apps/portal/src/app/insight/use-cases/page.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/portal/src/app/insight/agents-and-llms/llmstxt/page.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/portal/src/app/insight/faqs/page.mdx
  • apps/portal/src/app/insight/get-started/page.mdx
  • apps/portal/src/app/insight/agents-and-llms/page.mdx
  • apps/portal/src/app/insight/page.mdx
🧰 Additional context used
🪛 LanguageTool
apps/portal/src/app/insight/use-cases/page.mdx

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...print to get transactions involving any token and then aggregate data based on timest...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Build Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (5)
apps/portal/src/app/insight/use-cases/page.mdx (2)

23-23: Gas consumption use case addition looks good.

The example aggregation details for analyzing gas usage are clear and well formatted. No concerns here.


25-25: NFT collection movement example is clear.

The new row with aggregation snippets for tracking an NFT collection’s transfers is concise and properly formatted.

apps/portal/src/app/insight/blueprints/page.mdx (3)

91-107: Transactions Blueprint aggregation examples are correct.

The snippets for total transaction count, total value, and gas usage follow a consistent pattern and accurately illustrate aggregation queries.


113-129: Wallet Transactions Blueprint examples are accurate.

The “Get Wallet Summary” and “Calculate Total Fees Paid” code blocks correctly show how to filter by wallet and aggregate transaction data.


137-151: Blocks Blueprint aggregation examples are accurate.

The snippets for fetching block statistics and analyzing block metrics use clear labels and consistent query syntax.

@graphite-app graphite-app bot merged commit b345cc1 into main May 29, 2025
24 checks passed
@graphite-app graphite-app bot deleted the arsenii/infra-1406-update-docs branch May 29, 2025 17:46
@vercel vercel bot temporarily deployed to Production – login May 29, 2025 17:46 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb-www May 29, 2025 17:46 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground May 29, 2025 17:46 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui May 29, 2025 17:46 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Portal Involves changes to the Portal (docs) codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants