Skip to content

[PRO-249] Portal: Update OG images #7664

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
Jul 21, 2025

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Jul 21, 2025


PR-Codex overview

This PR focuses on updating various components and metadata related to payments and vault functionalities in the thirdweb application, including changes to titles, icons, and descriptions to enhance clarity and consistency.

Detailed summary

  • Updated metadata.ts to change "payment" to "payments" and added "vault".
  • Modified page.mdx files for payments and vaults to update titles and icons.
  • Changed payment-related metadata titles and icons across multiple files.
  • Adjusted the layout and descriptions in payment pages for clarity.
  • Removed unnecessary code from api/og/route.tsx.

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

Summary by CodeRabbit

  • New Features

    • Added and updated metadata images and titles across several pages, including "Contracts", "Vault", and various "Payments" pages for improved visual representation.
    • Introduced support for a new "vault" icon in metadata image options.
  • Style

    • Improved formatting and removed extraneous blank lines in code examples and UI components for better readability.
    • Cleaned up whitespace in multiple example code snippets.
  • Chores

    • Added a new formatting script for consistent code style across the project.
  • Refactor

    • Simplified Open Graph image layouts by removing certain UI elements.

Copy link

vercel bot commented Jul 21, 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 Jul 21, 2025 8:51pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
nebula ⬜️ Skipped (Inspect) Jul 21, 2025 8:51pm
thirdweb_playground ⬜️ Skipped (Inspect) Jul 21, 2025 8:51pm
thirdweb-www ⬜️ Skipped (Inspect) Jul 21, 2025 8:51pm
wallet-ui ⬜️ Skipped (Inspect) Jul 21, 2025 8:51pm

@vercel vercel bot temporarily deployed to Preview – wallet-ui July 21, 2025 18:40 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www July 21, 2025 18:40 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 21, 2025 18:40 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 21, 2025 18:40 Inactive
Copy link

linear bot commented Jul 21, 2025

Copy link

changeset-bot bot commented Jul 21, 2025

⚠️ No Changeset found

Latest commit: ddef888

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 21, 2025

"""

Walkthrough

The changes update Open Graph image layouts and metadata for consistency across the portal, particularly aligning with landing page styles. Several MDX pages and metadata objects are updated to include or revise image titles and icons. Cosmetic and formatting improvements are made to code examples. A new formatting script is added to the package.json.

Changes

Files/Groups Change Summary
apps/portal/package.json Added a "format" script using biome format ./src --write.
apps/portal/src/app/api/og/route.tsx Removed header/logo and "Read More" button from Open Graph image JSX output.
apps/portal/src/app/contracts/page.mdx
apps/portal/src/app/vault/layout.tsx
apps/portal/src/app/vault/page.mdx
Added or updated image property in metadata objects with new icon and title fields.
apps/portal/src/app/payments/page.mdx
apps/portal/src/app/payments/products/page.mdx
apps/portal/src/app/payments/routes/page.mdx
apps/portal/src/app/payments/sell/page.mdx
apps/portal/src/app/payments/send/page.mdx
apps/portal/src/app/payments/tokens/page.mdx
apps/portal/src/app/payments/webhooks/page.mdx
apps/portal/src/app/payments/custom-data/page.mdx
Updated metadata image title and icon values for consistency; minor whitespace and formatting cleanups in code examples.
apps/portal/src/components/Document/metadata.ts Extended DynamicImageOptions.icon type union to include "vault" and replaced "payment" with "payments".

Estimated code review effort

1 (~7 minutes)
"""

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

📜 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 93b8567 and ddef888.

⛔ Files ignored due to path filters (2)
  • apps/portal/public/og/background-1.png is excluded by !**/*.png
  • apps/portal/public/og/icons/contract.svg is excluded by !**/*.svg
📒 Files selected for processing (15)
  • apps/portal/package.json (1 hunks)
  • apps/portal/src/app/api/og/route.tsx (0 hunks)
  • apps/portal/src/app/contracts/page.mdx (1 hunks)
  • apps/portal/src/app/payments/custom-data/page.mdx (2 hunks)
  • apps/portal/src/app/payments/layout.tsx (1 hunks)
  • apps/portal/src/app/payments/page.mdx (1 hunks)
  • apps/portal/src/app/payments/products/page.mdx (2 hunks)
  • apps/portal/src/app/payments/routes/page.mdx (1 hunks)
  • apps/portal/src/app/payments/sell/page.mdx (1 hunks)
  • apps/portal/src/app/payments/send/page.mdx (3 hunks)
  • apps/portal/src/app/payments/tokens/page.mdx (1 hunks)
  • apps/portal/src/app/payments/webhooks/page.mdx (4 hunks)
  • apps/portal/src/app/vault/layout.tsx (1 hunks)
  • apps/portal/src/app/vault/page.mdx (1 hunks)
  • apps/portal/src/components/Document/metadata.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/portal/src/app/api/og/route.tsx
✅ Files skipped from review due to trivial changes (7)
  • apps/portal/src/app/payments/sell/page.mdx
  • apps/portal/src/app/payments/tokens/page.mdx
  • apps/portal/src/app/payments/layout.tsx
  • apps/portal/src/app/payments/routes/page.mdx
  • apps/portal/package.json
  • apps/portal/src/app/payments/webhooks/page.mdx
  • apps/portal/src/app/payments/custom-data/page.mdx
🚧 Files skipped from review as they are similar to previous changes (7)
  • apps/portal/src/app/payments/products/page.mdx
  • apps/portal/src/app/payments/page.mdx
  • apps/portal/src/app/vault/layout.tsx
  • apps/portal/src/app/contracts/page.mdx
  • apps/portal/src/app/vault/page.mdx
  • apps/portal/src/components/Document/metadata.ts
  • apps/portal/src/app/payments/send/page.mdx
⏰ 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: Analyze (javascript)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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.

@MananTank MananTank marked this pull request as ready for review July 21, 2025 18:40
@MananTank MananTank requested review from a team as code owners July 21, 2025 18:40
@github-actions github-actions bot added the Portal Involves changes to the Portal (docs) codebase. label Jul 21, 2025
Copy link
Member 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.

Copy link

codecov bot commented Jul 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.36%. Comparing base (8133fab) to head (ddef888).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7664   +/-   ##
=======================================
  Coverage   56.36%   56.36%           
=======================================
  Files         908      908           
  Lines       58244    58244           
  Branches     4226     4226           
=======================================
  Hits        32829    32829           
  Misses      25307    25307           
  Partials      108      108           
Flag Coverage Δ
packages 56.36% <ø> (ø)
🚀 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: 1

🔭 Outside diff range comments (2)
apps/portal/src/components/Document/metadata.ts (1)

8-19: Missing "payments" literal in icon union will break all updated pages

All changed payments pages now set image.icon = "payments".
Since the literal "payments" is not part of the DynamicImageOptions["icon"] union, every page that calls createMetadata({ image: { icon: "payments", … } }) will fail type-checking (and potentially runtime OG generation if the API relies on this list).

Add the new literal to keep the type sound and prevent compile errors:

     | "contract"
-    | "payment"
+    | "payment"
+    | "payments"   // new – matches updated MDX pages
     | "vault"

Consider deriving the union from a const ICONS = [...] as const array to avoid this drift in the future.

apps/portal/src/app/payments/webhooks/page.mdx (1)

165-214: Make header look-ups case-insensitive to avoid silent verification failures

Most runtimes preserve the original header casing; relying on a single exact-case key ("x-payload-signature", "x-timestamp", …) can cause the check to fail even for valid requests.

A minimal, allocation-free improvement:

-  const receivedSignature = headers["x-payload-signature"] || headers["x-pay-signature"];
-  const receivedTimestamp = headers["x-timestamp"] || headers["x-pay-timestamp"];
+  // normalise header keys once
+  const headersLc = Object.fromEntries(
+    Object.entries(headers).map(([k, v]) => [k.toLowerCase(), v]),
+  );
+
+  const receivedSignature =
+    headersLc["x-payload-signature"] ?? headersLc["x-pay-signature"];
+  const receivedTimestamp =
+    headersLc["x-timestamp"] ?? headersLc["x-pay-timestamp"];

This defends against any casing sent by API gateways/CDNs and reduces false “Invalid webhook signature” errors.

♻️ Duplicate comments (5)
apps/portal/src/app/payments/custom-data/page.mdx (1)

24-26: Same whitelist concern for "payments" icon – follow-up once metadata.ts is fixed.

apps/portal/src/app/payments/page.mdx (1)

26-28: Same whitelist concern for "payments" icon – follow-up once metadata.ts is fixed.

apps/portal/src/app/payments/sell/page.mdx (1)

24-26: Same whitelist concern for "payments" icon – follow-up once metadata.ts is fixed.

apps/portal/src/app/payments/routes/page.mdx (1)

25-26: Same icon verification as other payments pages.

Please ensure "payments" is a valid icon key; otherwise the OG image will not render here either.

apps/portal/src/app/payments/send/page.mdx (1)

25-26: Icon verification (repeat).

As with the other payments pages, be certain "payments" is accepted by the metadata helper.

🧹 Nitpick comments (2)
apps/portal/package.json (1)

73-73: Script naming / overlap – consider consolidating format and fix.

You now have
format: biome format ./src --write
fix: biome check ./src --fix && eslint ./src --fix

That can confuse contributors (two slightly different one-shot “autofix” commands).
Typical pattern is:

- "format": "biome format ./src --write",
+ "format": "biome check ./src --apply",

so both format and fix run the same Biome fixer, or you can fold the new command into the existing fix script and update docs/CI accordingly.

apps/portal/src/app/vault/page.mdx (1)

9-12: Indentation nit

The new image object mixes spaces & tabs, which can cause noisy diffs later.
Consider normalising to the project’s preferred indent (the rest of the file is two-space).

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 22bf68a and 8b4e429.

⛔ Files ignored due to path filters (2)
  • apps/portal/public/og/background-1.png is excluded by !**/*.png
  • apps/portal/public/og/icons/contract.svg is excluded by !**/*.svg
📒 Files selected for processing (14)
  • apps/portal/package.json (1 hunks)
  • apps/portal/src/app/api/og/route.tsx (0 hunks)
  • apps/portal/src/app/contracts/page.mdx (1 hunks)
  • apps/portal/src/app/payments/custom-data/page.mdx (2 hunks)
  • apps/portal/src/app/payments/page.mdx (1 hunks)
  • apps/portal/src/app/payments/products/page.mdx (2 hunks)
  • apps/portal/src/app/payments/routes/page.mdx (1 hunks)
  • apps/portal/src/app/payments/sell/page.mdx (1 hunks)
  • apps/portal/src/app/payments/send/page.mdx (3 hunks)
  • apps/portal/src/app/payments/tokens/page.mdx (1 hunks)
  • apps/portal/src/app/payments/webhooks/page.mdx (4 hunks)
  • apps/portal/src/app/vault/layout.tsx (1 hunks)
  • apps/portal/src/app/vault/page.mdx (1 hunks)
  • apps/portal/src/components/Document/metadata.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/portal/src/app/api/og/route.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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/portal/src/app/vault/layout.tsx
  • apps/portal/src/components/Document/metadata.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

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

Files:

  • apps/portal/src/app/vault/layout.tsx
  • apps/portal/src/components/Document/metadata.ts
🧠 Learnings (13)
📓 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
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} : Spacing utilities (`px-*`, `py-*`, `gap-*`) are preferred over custom margins.
Learnt from: MananTank
PR: thirdweb-dev/js#7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/shared-settings-page.tsx:29-39
Timestamp: 2025-05-27T20:10:47.245Z
Learning: MananTank prefers adding error handling (try-catch) directly inside utility functions like `shouldRenderNewPublicPage` rather than requiring callers to wrap the function calls in try-catch blocks. This centralizes error handling and benefits all callers automatically.
apps/portal/src/app/payments/products/page.mdx (4)

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.

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/**/*client.tsx : Interactive UI that relies on hooks (useState, useEffect, React Query, wallet hooks).

apps/portal/src/app/payments/sell/page.mdx (5)

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.

Learnt from: MananTank
PR: #7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts:49-49
Timestamp: 2025-05-27T19:55:25.056Z
Learning: In the ERC20 public pages token price data hook (useTokenPriceData.ts), direct array access on json.data[0] without optional chaining is intentionally correct and should not be changed to use safety checks.

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: 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} : Icons come from lucide-react or the project-specific …/icons exports – never embed raw SVG.

apps/portal/src/app/payments/tokens/page.mdx (3)

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.

Learnt from: MananTank
PR: #7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts:49-49
Timestamp: 2025-05-27T19:55:25.056Z
Learning: In the ERC20 public pages token price data hook (useTokenPriceData.ts), direct array access on json.data[0] without optional chaining is intentionally correct and should not be changed to use safety checks.

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)

apps/portal/src/app/payments/page.mdx (1)

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/portal/src/app/payments/custom-data/page.mdx (2)

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: gregfromstl
PR: #7450
File: packages/thirdweb/src/bridge/Webhook.ts:57-81
Timestamp: 2025-06-26T19:46:04.024Z
Learning: In the onramp webhook schema (packages/thirdweb/src/bridge/Webhook.ts), the currencyAmount field is intentionally typed as z.number() while other amount fields use z.string() because currencyAmount represents fiat currency amounts in decimals (like $10.50), whereas other amount fields represent token amounts in wei (very large integers that benefit from bigint representation). The different naming convention (currencyAmount vs amount) reflects this intentional distinction.

apps/portal/src/app/vault/layout.tsx (4)

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.

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: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.

apps/portal/src/app/payments/routes/page.mdx (1)

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} : Icons come from lucide-react or the project-specific …/icons exports – never embed raw SVG.

apps/portal/src/components/Document/metadata.ts (1)

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} : Icons come from lucide-react or the project-specific …/icons exports – never embed raw SVG.

apps/portal/package.json (4)

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to biome.json : Biome is the primary linter/formatter; rules are defined in biome.json

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Run pnpm biome check --apply before committing (pre-commit hook)

Learnt from: jnsdls
PR: #7363
File: apps/dashboard/src/app/(app)/layout.tsx:63-74
Timestamp: 2025-06-18T02:01:06.006Z
Learning: In Next.js applications, instrumentation files (instrumentation.ts or instrumentation-client.ts) placed in the src/ directory are automatically handled by the framework and included in the client/server bundles without requiring manual imports. The framework injects these files as part of the build process.

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Build all packages using pnpm build and specific packages with dependencies using turbo run build --filter=./packages/*

apps/portal/src/app/payments/send/page.mdx (4)

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: 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: MananTank
PR: #7081
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx:110-118
Timestamp: 2025-05-20T18:54:15.781Z
Learning: In the thirdweb dashboard's token asset creation flow, the transferBatch function from thirdweb/extensions/erc20 accepts the raw quantity values from the form without requiring explicit conversion to wei using toUnits(). The function appears to handle this conversion internally or is designed to work with the values in the format they're already provided.

Learnt from: gregfromstl
PR: #7450
File: packages/thirdweb/src/bridge/Webhook.ts:57-81
Timestamp: 2025-06-26T19:46:04.024Z
Learning: In the onramp webhook schema (packages/thirdweb/src/bridge/Webhook.ts), the currencyAmount field is intentionally typed as z.number() while other amount fields use z.string() because currencyAmount represents fiat currency amounts in decimals (like $10.50), whereas other amount fields represent token amounts in wei (very large integers that benefit from bigint representation). The different naming convention (currencyAmount vs amount) reflects this intentional distinction.

apps/portal/src/app/contracts/page.mdx (6)

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.

Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions

Learnt from: MananTank
PR: #7434
File: apps/dashboard/src/app/(app)/team///contract/[chain]/[contractAddress]/components/project-selector.tsx:62-76
Timestamp: 2025-06-24T21:38:03.155Z
Learning: In the project-selector.tsx component for contract imports, the addToProject.mutate() call is intentionally not awaited (fire-and-forget pattern) to allow immediate navigation to the contract page while the import happens in the background. This is a deliberate design choice to prioritize user experience.

Learnt from: MananTank
PR: #7332
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nft-drop-claim.tsx:82-90
Timestamp: 2025-06-13T13:03:41.732Z
Learning: The thirdweb contract object is serializable and can safely be used in contexts (e.g., React-Query keys) that require serializable values.

Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Event name: human-readable <subject> <verb> phrase (e.g. "contract deployed").

apps/portal/src/app/payments/webhooks/page.mdx (6)

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: gregfromstl
PR: #7450
File: packages/thirdweb/src/bridge/Webhook.ts:57-81
Timestamp: 2025-06-26T19:46:04.024Z
Learning: In the onramp webhook schema (packages/thirdweb/src/bridge/Webhook.ts), the currencyAmount field is intentionally typed as z.number() while other amount fields use z.string() because currencyAmount represents fiat currency amounts in decimals (like $10.50), whereas other amount fields represent token amounts in wei (very large integers that benefit from bigint representation). The different naming convention (currencyAmount vs amount) reflects this intentional distinction.

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.

Learnt from: AmineAfia
PR: #7173
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx:59-73
Timestamp: 2025-05-27T21:57:09.248Z
Learning: In the webhooks functionality, form validation prevents users from reaching test webhook functionality without entering a valid URL, ensuring data integrity before testing operations.

Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.

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} : Icons come from lucide-react or the project-specific …/icons exports – never embed raw SVG.

⏰ 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). (8)
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
apps/portal/src/app/payments/products/page.mdx (1)

15-16: Verify icon whitelist after adding "payments"

This page now uses icon: "payments". Ensure the union in DynamicImageOptions (and any OG-image handler) has been updated accordingly; otherwise the build will fail once TS picks up the new literal.

apps/portal/src/app/contracts/page.mdx (1)

9-12: Icon Verification Completed: contract is Enumerated
The "contract" icon appears in the DynamicImageOptions["icon"] union at apps/portal/src/components/Document/metadata.ts:16. No further action required.

apps/portal/src/app/payments/webhooks/page.mdx (1)

24-26: Confirm the icon name is registered

icon: "payments" assumes the "payments" literal was added to the DynamicImageOptions union ( apps/portal/src/components/Document/metadata.ts ).
If that union wasn’t extended, createMetadata will now reject the value at compile-time.

Would you double-check that the "payments" option is present in DynamicImageOptions?

apps/portal/src/app/vault/layout.tsx (1)

17-20: Looks good – ensure the global icon list contains "vault"

The added image block is syntactically correct and matches the pattern used elsewhere.
Just confirm that "vault" has been appended to the DynamicImageOptions union so that TS doesn’t complain.

Copy link
Contributor

github-actions bot commented Jul 21, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.23 KB (0%) 1.3 s (0%) 193 ms (+151.42% 🔺) 1.5 s
thirdweb (cjs) 353.45 KB (0%) 7.1 s (0%) 688 ms (+9.99% 🔺) 7.8 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 95 ms (+1789.53% 🔺) 209 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 38 ms (+1613.64% 🔺) 48 ms
thirdweb/react (minimal + tree-shaking) 19.59 KB (0%) 392 ms (0%) 71 ms (+543.2% 🔺) 463 ms

@MananTank MananTank force-pushed the 07-22-_pro-249_portal_update_og_images branch from 8b4e429 to 54c3943 Compare July 21, 2025 19:30
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 21, 2025 19:30 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 21, 2025 19:30 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 21, 2025 19:30 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www July 21, 2025 19:30 Inactive
@MananTank MananTank force-pushed the 07-22-_pro-249_portal_update_og_images branch from 54c3943 to 93b8567 Compare July 21, 2025 19:41
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 21, 2025 19:41 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www July 21, 2025 19:41 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 21, 2025 19:41 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 21, 2025 19:41 Inactive
Copy link
Contributor

graphite-app bot commented Jul 21, 2025

Merge activity

graphite-app bot pushed a commit that referenced this pull request Jul 21, 2025
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the metadata for various payment-related components in the `thirdweb` application, enhancing the clarity and consistency of the titles and icons associated with payments and vault features.

### Detailed summary
- Updated metadata in `apps/portal/src/app/payments/sell/page.mdx`: Changed title to "Sell Tokens" and icon to "payments".
- Updated metadata in `apps/portal/src/app/vault/page.mdx`: Added image with title "thirdweb Vault" and icon "vault".
- Updated metadata in `apps/portal/src/app/payments/routes/page.mdx`: Changed title to "Find Routes" and icon to "payments".
- Updated metadata in `apps/portal/src/app/payments/layout.tsx`: Changed icon from "payment" to "payments".
- Updated metadata in `apps/portal/src/app/payments/tokens/page.mdx`: Changed title to "Get Token Prices" and icon to "payments".
- Updated metadata in `apps/portal/src/app/payments/page.mdx`: Changed title to "Get started with Payments" and icon to "payments".
- Updated metadata in `apps/portal/src/app/payments/products/page.mdx`: Changed title to "Sell a Product" and icon to "payments".
- Updated metadata in `apps/portal/src/app/payments/custom-data/page.mdx`: Changed title to "Custom Payment Data" and icon to "payments".
- Updated metadata in `apps/portal/src/app/payments/send/page.mdx`: Changed title to "Send a payment" and icon to "payments".
- Updated metadata in `apps/portal/src/app/payments/webhooks/page.mdx`: Changed title to "Payments Webhooks" and icon to "payments".
- Added new format script in `apps/portal/package.json`.

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

<!-- end pr-codex -->

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

* **New Features**
  * Added and updated metadata images and titles across several pages, including "Contracts", "Vault", and various "Payments" pages for improved visual representation.
  * Introduced support for a new "vault" icon in metadata image options.

* **Style**
  * Improved formatting and removed extraneous blank lines in code examples and UI components for better readability.
  * Cleaned up whitespace in multiple example code snippets.

* **Chores**
  * Added a new formatting script for consistent code style across the project.

* **Refactor**
  * Simplified Open Graph image layouts by removing certain UI elements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the 07-22-_pro-249_portal_update_og_images branch from 93b8567 to 53b4635 Compare July 21, 2025 20:40
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 21, 2025 20:41 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www July 21, 2025 20:41 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 21, 2025 20:41 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 21, 2025 20:41 Inactive
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the metadata and image attributes across various pages in the `thirdweb` portal, particularly in the payments and vault sections. It modifies titles, icons, and descriptions to enhance clarity and consistency.

### Detailed summary
- Changed `metadata` for payments to use "payments" icon and updated titles.
- Updated vault metadata to include a new image with the "vault" icon.
- Modified various page descriptions for clarity and consistency.
- Added a new script for formatting in `package.json`.
- Removed unused code in `api/og/route.tsx`.

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

<!-- end pr-codex -->

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

* **New Features**
  * Added and updated metadata images and titles across several pages, including "Contracts", "Vault", and various "Payments" pages for improved visual representation.
  * Introduced support for a new "vault" icon in metadata image options.

* **Style**
  * Improved formatting and removed extraneous blank lines in code examples and UI components for better readability.
  * Cleaned up whitespace in multiple example code snippets.

* **Chores**
  * Added a new formatting script for consistent code style across the project.

* **Refactor**
  * Simplified Open Graph image layouts by removing certain UI elements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the 07-22-_pro-249_portal_update_og_images branch from 53b4635 to ddef888 Compare July 21, 2025 20:42
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 21, 2025 20:42 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 21, 2025 20:42 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 21, 2025 20:42 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www July 21, 2025 20:42 Inactive
@graphite-app graphite-app bot merged commit ddef888 into main Jul 21, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 07-22-_pro-249_portal_update_og_images branch July 21, 2025 20:51
@vercel vercel bot temporarily deployed to Production – thirdweb_playground July 21, 2025 20:51 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui July 21, 2025 20:51 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb-www July 21, 2025 20:51 Inactive
@vercel vercel bot temporarily deployed to Production – nebula July 21, 2025 20:51 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