Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Sep 24, 2025


PR-Codex overview

This PR focuses on renaming references from Universal Bridge to Bridge across various files in the codebase for consistency and clarity.

Detailed summary

  • Updated comments and documentation to replace Universal Bridge with Bridge.
  • Changed error messages in apps/dashboard/src/@/api/analytics.ts to reflect the new terminology.
  • Adjusted descriptions in multiple files, including Chain.ts, Webhook.ts, Transfer.ts, Routes.ts, Status.ts, Token.ts, Buy.ts, and Sell.ts, to align with the new naming.
  • Modified story descriptions in UnsupportedTokenScreen.stories.tsx to use Bridge instead of Universal Bridge.

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

Summary by CodeRabbit

  • Documentation
    • Replaced “Universal Bridge” with “Bridge” across API docs, stories, and descriptions. No functional changes.
  • Chores
    • Updated error log messages for bridge and bridge wallet usage to remove “universal.” Functionality unchanged.

@changeset-bot
Copy link

changeset-bot bot commented Sep 24, 2025

⚠️ No Changeset found

Latest commit: 3b986d5

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

@vercel
Copy link

vercel bot commented Sep 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Ready Preview Comment Sep 24, 2025 10:27pm
nebula Ready Ready Preview Comment Sep 24, 2025 10:27pm
thirdweb_playground Ready Ready Preview Comment Sep 24, 2025 10:27pm
thirdweb-www Ready Ready Preview Comment Sep 24, 2025 10:27pm
wallet-ui Ready Ready Preview Comment Sep 24, 2025 10:27pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 24, 2025

Walkthrough

Terminology updated from “Universal Bridge” to “Bridge” across SDK docs, comments, stories, and dashboard logs. Only textual changes were made; no code paths, APIs, or behaviors were altered.

Changes

Cohort / File(s) Summary of Changes
Dashboard analytics log text
apps/dashboard/src/@/api/analytics.ts
Removed the word “universal” from two failed-fetch error log messages. No logic or control-flow changes.
Bridge module docs/comments
packages/thirdweb/src/bridge/*, packages/thirdweb/src/bridge/types/Chain.ts
Replaced “Universal Bridge” with “Bridge” in JSDoc/comments for Buy, Sell, Transfer, Status, Routes, Chains, Token, Webhook, and Chain type. No code or API changes.
Exports label doc
packages/thirdweb/src/exports/thirdweb.ts
Updated documentation comment label from “UNIVERSAL BRIDGE” to “BRIDGE”. No export changes.
Stories copy
packages/thirdweb/src/stories/Bridge/UnsupportedTokenScreen.stories.tsx
Updated four story description strings to say “Bridge” instead of “Universal Bridge”. No functional changes.
Domains doc
packages/thirdweb/src/utils/domains.ts
Adjusted documentation to “bridge service” from “universal bridge service”. No logic changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description includes the template comments but does not populate required sections such as “Notes for the reviewer” or “How to test,” instead providing only a PR-Codex overview and leaving critical template fields incomplete. Please fill out the description template by adding concrete sections for “Notes for the reviewer” and “How to test,” including specific testing instructions and reviewer guidance, and remove or replace the commented placeholders.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly and accurately describes the primary change of renaming leftover references of “Universal Bridge” to “Bridge,” clearly reflecting the main objective of the pull request in a concise manner.
Linked Issues Check ✅ Passed The changes directly address linked issue MNY-201 by replacing all occurrences of “Universal Bridge” with “Bridge” in documentation, error messages, and UI text without altering any functionality, thereby satisfying the issue’s requirements.
Out of Scope Changes Check ✅ Passed All modifications are confined to renaming terminology in comments, documentation, and log messages to replace “Universal Bridge” with “Bridge,” with no unrelated functional or logic changes detected.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 09-25-sdk_rename_leftover_of_universal_bridge_to_bridge

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ee4e13e and 3b986d5.

📒 Files selected for processing (13)
  • apps/dashboard/src/@/api/analytics.ts (2 hunks)
  • packages/thirdweb/src/bridge/Buy.ts (2 hunks)
  • packages/thirdweb/src/bridge/Chains.ts (1 hunks)
  • packages/thirdweb/src/bridge/Routes.ts (1 hunks)
  • packages/thirdweb/src/bridge/Sell.ts (2 hunks)
  • packages/thirdweb/src/bridge/Status.ts (1 hunks)
  • packages/thirdweb/src/bridge/Token.ts (2 hunks)
  • packages/thirdweb/src/bridge/Transfer.ts (1 hunks)
  • packages/thirdweb/src/bridge/Webhook.ts (1 hunks)
  • packages/thirdweb/src/bridge/types/Chain.ts (1 hunks)
  • packages/thirdweb/src/exports/thirdweb.ts (1 hunks)
  • packages/thirdweb/src/stories/Bridge/UnsupportedTokenScreen.stories.tsx (4 hunks)
  • packages/thirdweb/src/utils/domains.ts (1 hunks)
👮 Files not reviewed due to content moderation or server errors (8)
  • packages/thirdweb/src/exports/thirdweb.ts
  • packages/thirdweb/src/utils/domains.ts
  • packages/thirdweb/src/bridge/Buy.ts
  • packages/thirdweb/src/bridge/Webhook.ts
  • packages/thirdweb/src/bridge/Status.ts
  • packages/thirdweb/src/bridge/Routes.ts
  • packages/thirdweb/src/bridge/Sell.ts
  • packages/thirdweb/src/bridge/Chains.ts
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{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

**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from @/types where applicable
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size

Files:

  • packages/thirdweb/src/stories/Bridge/UnsupportedTokenScreen.stories.tsx
  • packages/thirdweb/src/bridge/Transfer.ts
  • packages/thirdweb/src/bridge/Routes.ts
  • packages/thirdweb/src/utils/domains.ts
  • packages/thirdweb/src/bridge/Token.ts
  • packages/thirdweb/src/bridge/Status.ts
  • packages/thirdweb/src/bridge/Buy.ts
  • packages/thirdweb/src/exports/thirdweb.ts
  • packages/thirdweb/src/bridge/Webhook.ts
  • packages/thirdweb/src/bridge/types/Chain.ts
  • packages/thirdweb/src/bridge/Sell.ts
  • apps/dashboard/src/@/api/analytics.ts
  • packages/thirdweb/src/bridge/Chains.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • packages/thirdweb/src/stories/Bridge/UnsupportedTokenScreen.stories.tsx
  • packages/thirdweb/src/bridge/Transfer.ts
  • packages/thirdweb/src/bridge/Routes.ts
  • packages/thirdweb/src/utils/domains.ts
  • packages/thirdweb/src/bridge/Token.ts
  • packages/thirdweb/src/bridge/Status.ts
  • packages/thirdweb/src/bridge/Buy.ts
  • packages/thirdweb/src/exports/thirdweb.ts
  • packages/thirdweb/src/bridge/Webhook.ts
  • packages/thirdweb/src/bridge/types/Chain.ts
  • packages/thirdweb/src/bridge/Sell.ts
  • apps/dashboard/src/@/api/analytics.ts
  • packages/thirdweb/src/bridge/Chains.ts
**/*.stories.tsx

📄 CodeRabbit inference engine (CLAUDE.md)

For new UI components, add Storybook stories (*.stories.tsx) alongside the code

Files:

  • packages/thirdweb/src/stories/Bridge/UnsupportedTokenScreen.stories.tsx
packages/thirdweb/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling @example and a custom tag (@beta, @internal, @experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g., const { jsPDF } = await import("jspdf"))

Files:

  • packages/thirdweb/src/stories/Bridge/UnsupportedTokenScreen.stories.tsx
  • packages/thirdweb/src/bridge/Transfer.ts
  • packages/thirdweb/src/bridge/Routes.ts
  • packages/thirdweb/src/utils/domains.ts
  • packages/thirdweb/src/bridge/Token.ts
  • packages/thirdweb/src/bridge/Status.ts
  • packages/thirdweb/src/bridge/Buy.ts
  • packages/thirdweb/src/exports/thirdweb.ts
  • packages/thirdweb/src/bridge/Webhook.ts
  • packages/thirdweb/src/bridge/types/Chain.ts
  • packages/thirdweb/src/bridge/Sell.ts
  • packages/thirdweb/src/bridge/Chains.ts
packages/thirdweb/src/exports/**

📄 CodeRabbit inference engine (CLAUDE.md)

packages/thirdweb/src/exports/**: Export everything via exports/ directory, grouped by feature in the SDK public API
Every public symbol must have comprehensive TSDoc with at least one @example block that compiles and custom annotation tags (@beta, @internal, @experimental)

Files:

  • packages/thirdweb/src/exports/thirdweb.ts
apps/{dashboard,playground-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/api/analytics.ts
apps/{dashboard,playground}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

apps/{dashboard,playground}/**/*.{ts,tsx}: Import UI primitives from @/components/ui/_ (e.g., Button, Input, Tabs, Card)
Use NavLink for internal navigation to get active state handling
Use Tailwind CSS for styling; no inline styles
Merge class names with cn() from @/lib/utils for conditional classes
Stick to design tokens (e.g., bg-card, border-border, text-muted-foreground)
Server Components must start with import "server-only"; use next/headers, server‑only env, heavy data fetching, and redirect() where appropriate
Client Components must start with 'use client'; handle interactivity with hooks and browser APIs
Server-side data fetching: call getAuthToken() from cookies, send Authorization: Bearer <token> header, and return typed results (avoid any)
Client-side data fetching: wrap calls in React Query with descriptive, stable queryKeys and set sensible staleTime/cacheTime (≥ 60s default); keep tokens secret via internal routes or server actions
Do not import posthog-js in server components (client-side only)

Files:

  • apps/dashboard/src/@/api/analytics.ts
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Pull‑request titles must start with the affected workspace in brackets (e.g., [SDK], [Dashboard], [Portal], [Playground])
📚 Learning: 2025-09-24T11:08:43.783Z
Learnt from: MananTank
PR: thirdweb-dev/js#8106
File: packages/thirdweb/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx:34-41
Timestamp: 2025-09-24T11:08:43.783Z
Learning: In BridgeWidgetProps for packages/thirdweb/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx, the Swap onError callback signature requires a non-undefined SwapPreparedQuote parameter (unlike Buy's onError which allows undefined quote). This is intentional - SwapWidget's onError is only called when a quote is available.

Applied to files:

  • packages/thirdweb/src/bridge/Buy.ts
  • packages/thirdweb/src/bridge/Sell.ts
📚 Learning: 2025-09-24T11:09:45.142Z
Learnt from: MananTank
PR: thirdweb-dev/js#8106
File: packages/thirdweb/src/script-exports/readme.md:6-7
Timestamp: 2025-09-24T11:09:45.142Z
Learning: For thirdweb Bridge Widget script exports, the module is exported with globalName: "BridgeWidget" in tsup config, making the global API `BridgeWidget.render()` rather than `window.thirdweb.BridgeWidget.render()`.

Applied to files:

  • packages/thirdweb/src/exports/thirdweb.ts
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to packages/thirdweb/**/*.{ts,tsx} : Comment only ambiguous logic; avoid restating TypeScript in prose

Applied to files:

  • packages/thirdweb/src/exports/thirdweb.ts
⏰ 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). (5)
  • GitHub Check: Socket Security: Pull Request Alerts
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (5)
packages/thirdweb/src/stories/Bridge/UnsupportedTokenScreen.stories.tsx (1)

71-123: Terminology update looks consistent.

Thanks for aligning the story descriptions with the new naming.

packages/thirdweb/src/bridge/Transfer.ts (1)

12-12: Doc wording matches the new convention.

The updated JSDoc stays cohesive with the rest of the Bridge docs.

packages/thirdweb/src/bridge/types/Chain.ts (1)

2-2: Docs synced with Bridge terminology.

Looks good.

apps/dashboard/src/@/api/analytics.ts (1)

595-639: Log copy matches the renamed feature.

Appreciate the clean-up on the analytics error messages.

packages/thirdweb/src/bridge/Token.ts (1)

8-232: Bridge terminology reads well throughout the token docs.

Everything stays consistent and clear.

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.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Sep 24, 2025
@MananTank MananTank marked this pull request as ready for review September 24, 2025 18:35
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Sep 24, 2025
@MananTank MananTank requested review from a team as code owners September 24, 2025 18:35
@MananTank MananTank changed the title SDK: Rename leftover of Universal Bridge to Bridge [MNY-201] SDK: Rename leftover of Universal Bridge to Bridge Sep 24, 2025
Copy link
Member Author

MananTank commented Sep 24, 2025


How to use the Graphite Merge Queue

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

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

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

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

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

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

@linear
Copy link

linear bot commented Sep 24, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.07 KB (0%) 1.3 s (0%) 249 ms (+160.53% 🔺) 1.6 s
thirdweb (cjs) 361.6 KB (0%) 7.3 s (0%) 871 ms (+17.43% 🔺) 8.2 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 101 ms (+3519.43% 🔺) 216 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 97 ms (+5506.36% 🔺) 108 ms
thirdweb/react (minimal + tree-shaking) 19.14 KB (0%) 383 ms (0%) 101 ms (+2364.96% 🔺) 484 ms

@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.27%. Comparing base (ee4e13e) to head (3b986d5).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8117      +/-   ##
==========================================
- Coverage   56.27%   56.27%   -0.01%     
==========================================
  Files         906      906              
  Lines       59191    59191              
  Branches     4175     4171       -4     
==========================================
- Hits        33310    33308       -2     
- Misses      25776    25778       +2     
  Partials      105      105              
Flag Coverage Δ
packages 56.27% <ø> (-0.01%) ⬇️
Files with missing lines Coverage Δ
packages/thirdweb/src/bridge/Buy.ts 92.18% <ø> (ø)
packages/thirdweb/src/bridge/Chains.ts 68.96% <ø> (ø)
packages/thirdweb/src/bridge/Routes.ts 81.03% <ø> (ø)
packages/thirdweb/src/bridge/Sell.ts 92.96% <ø> (ø)
packages/thirdweb/src/bridge/Status.ts 38.88% <ø> (ø)
packages/thirdweb/src/bridge/Token.ts 44.18% <ø> (ø)
packages/thirdweb/src/bridge/Transfer.ts 93.15% <ø> (ø)
packages/thirdweb/src/bridge/Webhook.ts 100.00% <ø> (ø)
packages/thirdweb/src/utils/domains.ts 96.22% <ø> (ø)

... and 2 files with indirect coverage changes

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 24, 2025

Merge activity

  • Sep 24, 7:38 PM UTC: MananTank added this pull request to the Graphite merge queue.
  • Sep 24, 8:29 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #8113.
  • Sep 24, 10:11 PM UTC: The Graphite merge queue couldn't merge this PR because it failed for an unknown reason (The GitHub API is returning invalid responses. Please check the GitHub status page and try the merge again later).
  • Sep 24, 10:47 PM UTC: MananTank added this pull request to the Graphite merge queue.
  • Sep 24, 10:48 PM UTC: Merged by the Graphite merge queue.

@graphite-app graphite-app bot force-pushed the 09-25-sdk_rename_leftover_of_universal_bridge_to_bridge branch from b5f9237 to 2d05ee0 Compare September 24, 2025 20:39
<!--

## 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 renaming references from `Universal Bridge` to `Bridge` across multiple files to standardize terminology and improve clarity.

### Detailed summary
- Updated comments and documentation to replace `Universal Bridge` with `Bridge`.
- Modified error messages in `apps/dashboard/src/@/api/analytics.ts` to reflect the new terminology.
- Changed descriptions in various files related to `Chain`, `Token`, `Quote`, and webhooks to use `Bridge`.

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

<!-- end pr-codex -->
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. packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants