Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Oct 17, 2025


PR-Codex overview

This PR enhances the UI components in the dashboard by improving styling, adding new functionalities, and introducing a new LinkWithCopyButton component for better user interaction with links and copy actions.

Detailed summary

  • Updated CopyTextButton and wallet-address components to support truncation.
  • Introduced LinkWithCopyButton for copying text and linking.
  • Adjusted styles for better visibility and consistency.
  • Enhanced BridgeStatus and TokenInfo components with improved layout and spacing.
  • Replaced some CopyTextButton instances with LinkWithCopyButton.

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

Summary by CodeRabbit

  • New Features

    • Added a combined copy-and-open-link control with tooltip and temporary success feedback for quick copying and opening external links.
  • Style

    • Improved text truncation for wallet names, addresses and copy controls to prevent overflow.
    • Refined spacing, typography and section layout across the dashboard for clearer hierarchy.
    • Added external-link arrows for clearer link affordance.

@vercel vercel bot temporarily deployed to Preview – nebula October 17, 2025 14:52 Inactive
@vercel
Copy link

vercel bot commented Oct 17, 2025

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

Project Deployment Preview Comments Updated (UTC)
thirdweb-www Ready Ready Preview Comment Oct 17, 2025 8:31pm
4 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
docs-v2 Skipped Skipped Oct 17, 2025 8:31pm
nebula Skipped Skipped Oct 17, 2025 8:31pm
thirdweb_playground Skipped Skipped Oct 17, 2025 8:31pm
wallet-ui Skipped Skipped Oct 17, 2025 8:31pm

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

@linear
Copy link

linear bot commented Oct 17, 2025

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 17, 2025 14:52 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

⚠️ No Changeset found

Latest commit: db291d2

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 vercel bot temporarily deployed to Preview – docs-v2 October 17, 2025 14:52 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 17, 2025 14:52 Inactive
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Oct 17, 2025
Copy link
Member Author

MananTank commented Oct 17, 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.

@MananTank MananTank marked this pull request as ready for review October 17, 2025 14:53
@MananTank MananTank requested review from a team as code owners October 17, 2025 14:53
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Walkthrough

Adds truncation utilities to wallet and copy-button components, introduces a new LinkWithCopyButton component combining copy-to-clipboard and external-link actions, and refactors bridge-status to use LinkWithCopyButton, adjust link href logic/icons, and update spacing and layout.

Changes

Cohort / File(s) Summary
Text truncation updates
apps/dashboard/src/@/components/blocks/wallet-address.tsx, apps/dashboard/src/@/components/ui/CopyTextButton.tsx
Add max-w-full and truncate utility classes to Button and inner text spans to constrain width and enable truncation.
New combined copy+link UI
apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
Add LinkWithCopyButton component: ghost small copy button that writes textToCopy to clipboard, toggles isCopied for 1s (switching between CopyIcon and CheckIcon), shows tooltip, and renders an external link (href) with truncated textToShow and ArrowUpRightIcon.
Bridge status refactor
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
Replace multiple CopyTextButton usages with LinkWithCopyButton; add ArrowUpRightIcon imports; introduce isNativeToken logic to choose link hrefs; adjust headings, spacing, layout, and icon placement for token/address/tx sections; render links and copy controls as stacked rows.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LinkUI as LinkWithCopyButton
    participant Clipboard
    participant Explorer as ExternalSite

    User->>LinkUI: Click copy button
    LinkUI->>Clipboard: navigator.clipboard.writeText(textToCopy)
    LinkUI-->>User: set isCopied = true (show CheckIcon)
    Note right of LinkUI: after 1s set isCopied = false
    User->>LinkUI: Click external link
    LinkUI->>Explorer: open href in new tab
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description provided by the author leaves the required template sections empty (Notes for the reviewer and How to test) and only includes placeholder comments from the template along with a PR-Codex summary. While the PR-Codex section does provide a detailed overview of the changes, it does not fulfill the structured template requirements specified in the repository, which explicitly asks for notes for reviewers and testing instructions. The description lacks actionable guidance for reviewers about what to focus on and provides no guidance on how to verify the changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "[MNY-268] Bridge Status UI updates" is directly related to the changeset. It clearly references the linked issue (MNY-268) and accurately summarizes the primary focus of the changes, which involve updating UI components in the bridge status page including truncation improvements, introducing a new LinkWithCopyButton component, and adjusting layout and styling. The title is concise, specific, and would help teammates understand the main change when scanning history.
Linked Issues Check ✅ Passed The PR successfully addresses the key objectives from issue MNY-268. The introduction of the LinkWithCopyButton component directly fulfills the requirement for two interactions on transaction hashes: clicking the link opens the transaction on the destination chain, and clicking the copy button copies the hash to clipboard. The component is used throughout bridge-status.tsx to replace CopyTextButton instances, enabling this dual-interaction pattern. The PR also updates layout and spacing across BridgeStatus and TokenInfo sections to improve presentation when horizontal space is limited, addressing the requirement to present items in rows when needed. The truncation improvements and full text preservation in copy functionality support showing complete addresses and hashes.
Out of Scope Changes Check ✅ Passed All changes in the PR are directly related to the objectives outlined in issue MNY-268. The modifications to CopyTextButton and wallet-address components (adding truncation classes) are foundational updates that support the main Bridge Status UI improvements. The introduction of LinkWithCopyButton and its usage throughout bridge-status.tsx directly implements the dual-interaction requirement (view and copy). The layout and spacing adjustments support the requirement to present items in rows when space is limited. No extraneous or tangential changes are present that fall outside the scope of the Bridge Status UI enhancement objectives.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mny-268

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.

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8273   +/-   ##
=======================================
  Coverage   54.89%   54.89%           
=======================================
  Files         919      919           
  Lines       60622    60622           
  Branches     4126     4126           
=======================================
  Hits        33278    33278           
  Misses      27242    27242           
  Partials      102      102           
Flag Coverage Δ
packages 54.89% <ø> (ø)
🚀 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: 3

📜 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 5ff6063 and 21751dd.

📒 Files selected for processing (4)
  • apps/dashboard/src/@/components/blocks/wallet-address.tsx (2 hunks)
  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx (1 hunks)
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (8 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{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:

  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
  • apps/dashboard/src/@/components/blocks/wallet-address.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
  • apps/dashboard/src/@/components/blocks/wallet-address.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
  • apps/dashboard/src/@/components/blocks/wallet-address.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
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/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
  • apps/dashboard/src/@/components/blocks/wallet-address.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
apps/{dashboard,playground}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Expose a className prop on the root element of every component

Files:

  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
  • apps/dashboard/src/@/components/blocks/wallet-address.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
🧠 Learnings (1)
📚 Learning: 2025-07-18T19:20:32.530Z
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).

Applied to files:

  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
🧬 Code graph analysis (1)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (4)
apps/dashboard/src/@/components/ui/CopyTextButton.tsx (1)
  • CopyTextButton (9-68)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
  • WalletAddress (20-178)
apps/dashboard/src/@/components/ui/link-with-copy-button.tsx (1)
  • LinkWithCopyButton (9-45)
apps/playground-web/src/app/ai/components/resolveSchemeWithErrorHandler.ts (1)
  • resolveSchemeWithErrorHandler (4-21)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (6)
apps/dashboard/src/@/components/ui/CopyTextButton.tsx (1)

44-44: LGTM: Truncation classes added for proper text overflow handling.

The addition of max-w-full truncate ensures the button respects its container width and displays ellipsis for overflowing text, working in conjunction with the existing min-w-0 truncate on the inner spans.

apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)

81-81: LGTM: Consistent truncation pattern applied.

The max-w-full truncate classes on both the Button and inner span ensure proper text overflow handling for long wallet addresses and profile names, maintaining a responsive layout.

Also applies to: 96-96

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (4)

55-96: LGTM: Status and Payment ID UI improvements.

The spacing, typography, and color updates improve visual hierarchy. The full Payment ID display (line 88) with tabular-nums (line 90) aligns with the PR objective to show full values without truncation.


123-124: LGTM: Native token handling with correct link logic.

The isNativeToken check properly differentiates between native tokens (link to chain page) and contract tokens (link to token address page), and the full address display meets the PR requirement.

Also applies to: 219-229


305-318: LGTM: Failed status section improvements.

The heading size adjustment and spacing refinements improve the visual structure of the failed transactions list.


362-368: LGTM: Correct transaction link implementation.

The TxHashRow component correctly constructs the transaction URL with the /tx/ path segment, providing both copy and view functionality as required.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.51 KB (0%) 1.3 s (0%) 170 ms (+104.69% 🔺) 1.5 s
thirdweb (cjs) 365.68 KB (0%) 7.4 s (0%) 746 ms (-0.07% 🔽) 8.1 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 111 ms (+2824.81% 🔺) 226 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 111 ms (+3468.82% 🔺) 122 ms
thirdweb/react (minimal + tree-shaking) 19.13 KB (0%) 383 ms (0%) 110 ms (+2844.63% 🔺) 493 ms

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

📜 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 21751dd and 5a3b897.

📒 Files selected for processing (4)
  • apps/dashboard/src/@/components/blocks/wallet-address.tsx (2 hunks)
  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx (1 hunks)
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/dashboard/src/@/components/blocks/wallet-address.tsx
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{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:

  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
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/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
apps/{dashboard,playground}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Expose a className prop on the root element of every component

Files:

  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
🧠 Learnings (2)
📚 Learning: 2025-07-18T19:20:32.530Z
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).

Applied to files:

  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
📚 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 **/*.{ts,tsx} : Use explicit function declarations and explicit return types in TypeScript

Applied to files:

  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
🧬 Code graph analysis (1)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (4)
apps/dashboard/src/@/components/ui/CopyTextButton.tsx (1)
  • CopyTextButton (9-68)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
  • WalletAddress (20-178)
apps/dashboard/src/@/components/ui/link-with-copy-button.tsx (1)
  • LinkWithCopyButton (9-45)
apps/playground-web/src/app/ai/components/resolveSchemeWithErrorHandler.ts (1)
  • resolveSchemeWithErrorHandler (4-21)
⏰ 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). (2)
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
apps/dashboard/src/@/components/ui/CopyTextButton.tsx (1)

44-44: LGTM! Truncation support added.

The addition of max-w-full truncate enables proper text overflow handling when the button is used in space-constrained layouts, which aligns with the PR objective.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (3)

362-368: LGTM! Correct implementation of transaction hash display.

The TxHashRow correctly displays the full transaction hash without truncation and uses the proper href pattern for linking to the transaction page, which aligns with the PR objectives.


208-214: Good: Full wallet address display aligns with PR objective.

Setting shortenAddress={false} ensures the full wallet address is displayed, which correctly implements the PR objective to "show full addresses and transaction hashes without truncation."


219-229: LGTM! Token address link and display are correct.

The implementation correctly:

  • Uses isNativeToken to determine the appropriate link destination (chain vs. token page)
  • Displays the full token address without truncation
  • Provides copy functionality with proper tooltip

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 17, 2025

Merge activity

<!--

## 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 enhancing UI components in the dashboard by improving styles for better text handling and introducing a new `LinkWithCopyButton` component for copying links and displaying tooltips.

### Detailed summary
- Updated `className` in `CopyTextButton` and `WalletAddress` for better text truncation.
- Introduced `LinkWithCopyButton` component for link handling and copying functionality.
- Adjusted styles in `BridgeStatus` and `TokenInfo` for improved UI consistency.
- Replaced `CopyTextButton` with `LinkWithCopyButton` for token address and transaction hash.

> ✨ 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 a combined copy-and-open-link component with tooltip and temporary visual feedback for quick copying and opening external links.

* **Style**
  * Improved text truncation for wallet names, addresses and copy controls to prevent overflow.
  * Updated spacing, typography and section layout across the dashboard for clearer hierarchy.
  * Added external-link arrows for clearer link affordance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (2)

139-148: Add rel on external token/icon link.

target="_blank" without rel is a security risk.

-            <Link
+            <Link
               href={
                 props.token.address.toLowerCase() ===
                 NATIVE_TOKEN_ADDRESS.toLowerCase()
                   ? `/${chainQuery.data?.slug || props.token.chainId}`
                   : `/${chainQuery.data?.slug || props.token.chainId}/${props.token.address}`
               }
               target="_blank"
+              rel="noopener noreferrer"
               aria-label="View Token"
               className="absolute inset-0 z-10"
             />

307-315: Non-unique React list key.

Using chainId alone can collide if multiple tx exist for the same chain. Use a composite or the tx hash.

-              key={tx.chainId}
+              key={`${tx.chainId}:${tx.transactionHash}`}
♻️ Duplicate comments (3)
apps/dashboard/src/@/components/ui/link-with-copy-button.tsx (2)

9-15: Add explicit return type.

Per repo guidelines, declare the return type for TSX components.

-export function LinkWithCopyButton(props: {
+export function LinkWithCopyButton(props: {
   href: string;
   textToShow: string;
   textToCopy: string;
   copyTooltip: string;
   className?: string;
-}) {
+}): React.JSX.Element {

16-18: Unify clipboard logic via hook; prevent leaks; improve UX.

Replace manual clipboard + timeout with existing useClipboard hook; also stop event bubbling to avoid accidental parent clicks.

-import { useState } from "react";
+import { useState } from "react";
+import { useClipboard } from "@/hooks/useClipboard";
@@
-export function LinkWithCopyButton(props: {
+export function LinkWithCopyButton(props: {
@@
-  const [isCopied, setIsCopied] = useState(false);
-  const Icon = isCopied ? CheckIcon : CopyIcon;
+  const { hasCopied, onCopy } = useClipboard(props.textToCopy, 1000);
+  const Icon = hasCopied ? CheckIcon : CopyIcon;
@@
-        <Button
+        <Button
           variant="ghost"
           size="sm"
           className="p-1 h-auto shrink-0 opacity-70 hover:opacity-100 text-muted-foreground"
-          onClick={() => {
-            navigator.clipboard.writeText(props.textToCopy);
-            setIsCopied(true);
-            setTimeout(() => setIsCopied(false), 1000);
-          }}
+          aria-label={props.copyTooltip}
+          onClick={(e) => {
+            e.stopPropagation();
+            onCopy();
+          }}
         >
           <Icon className="size-3" />
         </Button>

Also applies to: 22-33

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (1)

232-241: Transaction Hash should show full value (no truncation).

The display is still sliced. Use the full hash.

           <LinkWithCopyButton
             className="-translate-x-1"
             href={`/${chainQuery.data?.slug || props.token.chainId}/tx/${props.txHash}`}
-            textToShow={`${props.txHash.slice(0, 12)}...${props.txHash.slice(-4)}`}
+            textToShow={props.txHash}
             textToCopy={props.txHash}
             copyTooltip="Copy Transaction Hash"
           />
🧹 Nitpick comments (1)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (1)

27-33: Add explicit return types for exported components.

Keep to the codebase convention; declare return types for exported functions.

-export function BridgeStatus(props: {
+export function BridgeStatus(props: {
   bridgeStatus: Status;
   client: ThirdwebClient;
-}) {
+}): JSX.Element {
@@
-export function BridgeStatusWithPolling(props: {
+export function BridgeStatusWithPolling(props: {
   bridgeStatus: Status;
   client: ThirdwebClient;
   chainId: number;
   transactionHash: string;
-}) {
+}): JSX.Element {

Also applies to: 373-405

📜 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 ca88051 and db291d2.

📒 Files selected for processing (4)
  • apps/dashboard/src/@/components/blocks/wallet-address.tsx (2 hunks)
  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx (1 hunks)
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/dashboard/src/@/components/blocks/wallet-address.tsx
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{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:

  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
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/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
apps/{dashboard,playground}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Expose a className prop on the root element of every component

Files:

  • apps/dashboard/src/@/components/ui/CopyTextButton.tsx
  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
🧠 Learnings (2)
📚 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 **/*.{ts,tsx} : Use explicit function declarations and explicit return types in TypeScript

Applied to files:

  • apps/dashboard/src/@/components/ui/link-with-copy-button.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
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).

Applied to files:

  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
🧬 Code graph analysis (1)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (4)
apps/dashboard/src/@/components/ui/CopyTextButton.tsx (1)
  • CopyTextButton (9-68)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
  • WalletAddress (20-178)
apps/dashboard/src/@/components/ui/link-with-copy-button.tsx (1)
  • LinkWithCopyButton (9-45)
apps/playground-web/src/app/ai/components/resolveSchemeWithErrorHandler.ts (1)
  • resolveSchemeWithErrorHandler (4-21)
⏰ 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). (6)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx (3)

217-229: Token Address: good switch to LinkWithCopyButton.

Href logic handles native vs. contract correctly; full address displayed. This aligns with MNY-268.

Please confirm that LinkWithCopyButton no longer truncates after applying my suggested change in that component; otherwise the address may still be ellipsized.


189-197: Add rel on external chain link.

Same issue for this Link.

-                <Link
+                <Link
                   href={`/${chainQuery.data?.slug || props.token.chainId}`}
-                  className="text-sm text-muted-foreground leading-none hover:underline flex items-center gap-1"
+                  className="text-sm text-muted-foreground leading-none hover:underline flex items-center gap-1"
                   target="_blank"
+                  rel="noopener noreferrer"
                 >
⛔ Skipped due to learnings
Learnt from: MananTank
PR: thirdweb-dev/js#7812
File: apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx:48-60
Timestamp: 2025-08-07T20:43:21.864Z
Learning: In the TokenBanner component at apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx, the Link components use target="_blank" with internal application routes (starting with "/") to open pages in new tabs within the same application. These internal links do not require rel="noopener noreferrer" security attributes, which are only needed for external URLs.
Learnt from: jnsdls
PR: thirdweb-dev/js#7365
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx:16-17
Timestamp: 2025-06-18T04:30:04.326Z
Learning: Next.js Link component fully supports both internal and external URLs and works appropriately with all standard anchor attributes including target="_blank", rel="noopener noreferrer", etc. Using Link for external URLs is completely appropriate and recommended.
Learnt from: MananTank
PR: thirdweb-dev/js#7984
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/components/FeatureCard.client.tsx:93-99
Timestamp: 2025-09-05T19:45:22.949Z
Learning: In the thirdweb dashboard project, rel="noopener noreferrer" attributes are not required for external links with target="_blank" in Link components, as confirmed by MananTank.

343-369: Add rel="noopener noreferrer" to LinkWithCopyButton external link.

The LinkWithCopyButton component uses target="_blank" without rel="noopener" or rel="noreferrer" to avoid security issues. The component is at apps/dashboard/src/@/components/ui/link-with-copy-button.tsx, line 36:

  <Link
    href={props.href}
    target="_blank"
+   rel="noopener noreferrer"
    className="text-sm text-muted-foreground hover:underline flex items-center gap-1 tabular-nums flex-1 truncate hover:text-foreground group"
  >
⛔ Skipped due to learnings
Learnt from: MananTank
PR: thirdweb-dev/js#7812
File: apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx:48-60
Timestamp: 2025-08-07T20:43:21.864Z
Learning: In the TokenBanner component at apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx, the Link components use target="_blank" with internal application routes (starting with "/") to open pages in new tabs within the same application. These internal links do not require rel="noopener noreferrer" security attributes, which are only needed for external URLs.
Learnt from: MananTank
PR: thirdweb-dev/js#7984
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/components/FeatureCard.client.tsx:93-99
Timestamp: 2025-09-05T19:45:22.949Z
Learning: In the thirdweb dashboard project, rel="noopener noreferrer" attributes are not required for external links with target="_blank" in Link components, as confirmed by MananTank.
Learnt from: jnsdls
PR: thirdweb-dev/js#7365
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx:16-17
Timestamp: 2025-06-18T04:30:04.326Z
Learning: Next.js Link component fully supports both internal and external URLs and works appropriately with all standard anchor attributes including target="_blank", rel="noopener noreferrer", etc. Using Link for external URLs is completely appropriate and recommended.
apps/dashboard/src/@/components/ui/link-with-copy-button.tsx (1)

35-42: Add rel="noopener noreferrer" to external links.

Links opened with target="_blank" must include rel to prevent reverse tabnabbing.

-      <Link
+      <Link
         href={props.href}
-        target="_blank"
+        target="_blank"
+        rel="noopener noreferrer"
         className="text-sm text-muted-foreground hover:underline flex items-center gap-1 tabular-nums flex-1 truncate hover:text-foreground group"
       >
⛔ Skipped due to learnings
Learnt from: MananTank
PR: thirdweb-dev/js#7984
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/components/FeatureCard.client.tsx:93-99
Timestamp: 2025-09-05T19:45:22.949Z
Learning: In the thirdweb dashboard project, rel="noopener noreferrer" attributes are not required for external links with target="_blank" in Link components, as confirmed by MananTank.
Learnt from: MananTank
PR: thirdweb-dev/js#7812
File: apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx:48-60
Timestamp: 2025-08-07T20:43:21.864Z
Learning: In the TokenBanner component at apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/token-banner.tsx, the Link components use target="_blank" with internal application routes (starting with "/") to open pages in new tabs within the same application. These internal links do not require rel="noopener noreferrer" security attributes, which are only needed for external URLs.
Learnt from: jnsdls
PR: thirdweb-dev/js#7365
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx:16-17
Timestamp: 2025-06-18T04:30:04.326Z
Learning: Next.js Link component fully supports both internal and external URLs and works appropriately with all standard anchor attributes including target="_blank", rel="noopener noreferrer", etc. Using Link for external URLs is completely appropriate and recommended.

Comment on lines +44 to 46
"flex h-auto w-auto gap-2 rounded-lg px-1.5 py-0.5 font-normal text-foreground max-w-full truncate",
props.className,
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Show full values; remove truncation (MNY-268).

Current classes enforce truncation on the button and text spans, contradicting the PR objective to show full Payment IDs/addresses/hashes. Allow wrapping instead.

Apply this diff:

-          "flex h-auto w-auto gap-2 rounded-lg px-1.5 py-0.5 font-normal text-foreground max-w-full truncate",
+          "flex h-auto w-auto gap-2 rounded-lg px-1.5 py-0.5 font-normal text-foreground max-w-full",
-            <span className="min-w-0 truncate"> {props.textToShow} </span>
+            <span className="min-w-0 break-all whitespace-normal"> {props.textToShow} </span>
-            <span className="min-w-0 truncate"> {props.textToShow} </span>
+            <span className="min-w-0 break-all whitespace-normal"> {props.textToShow} </span>

Also applies to: 56-56, 62-62

🤖 Prompt for AI Agents
In apps/dashboard/src/@/components/ui/CopyTextButton.tsx around lines 44-46 (and
also lines 56 and 62), the component currently forces truncation via the
"truncate" (and "max-w-full") utility classes which hides full Payment
IDs/addresses/hashes; remove "truncate" (and remove "max-w-full" if present)
from the class lists and replace with wrapping utilities such as
"whitespace-normal" and "break-words" (or "break-all" if hard breaks are
desired) so the button and inner spans allow wrapping and show the full values.

Comment on lines +38 to +41
className="text-sm text-muted-foreground hover:underline flex items-center gap-1 tabular-nums flex-1 truncate hover:text-foreground group"
>
<span className="max-w-full truncate">{props.textToShow}</span>
<ArrowUpRightIcon className="size-3.5 opacity-70 shrink-0 group-hover:opacity-100" />
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Do not truncate; wrap long hashes/addresses.

This component truncates by default, violating MNY-268. Allow wrapping with break-all; remove truncate classes.

-        className="text-sm text-muted-foreground hover:underline flex items-center gap-1 tabular-nums flex-1 truncate hover:text-foreground group"
+        className="text-sm text-muted-foreground hover:underline flex items-center gap-1 tabular-nums flex-1 break-all hover:text-foreground group"
@@
-        <span className="max-w-full truncate">{props.textToShow}</span>
+        <span className="max-w-full break-all">{props.textToShow}</span>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
className="text-sm text-muted-foreground hover:underline flex items-center gap-1 tabular-nums flex-1 truncate hover:text-foreground group"
>
<span className="max-w-full truncate">{props.textToShow}</span>
<ArrowUpRightIcon className="size-3.5 opacity-70 shrink-0 group-hover:opacity-100" />
className="text-sm text-muted-foreground hover:underline flex items-center gap-1 tabular-nums flex-1 break-all hover:text-foreground group"
>
<span className="max-w-full break-all">{props.textToShow}</span>
<ArrowUpRightIcon className="size-3.5 opacity-70 shrink-0 group-hover:opacity-100" />
🤖 Prompt for AI Agents
In apps/dashboard/src/@/components/ui/link-with-copy-button.tsx around lines 38
to 41, the component currently forces truncation (parent has "flex-1 truncate"
and the span has "max-w-full truncate"); remove these "truncate" classes and
instead allow wrapping by adding "break-all" (or "break-words" if preferred) to
the parent and/or the span so long hashes/addresses wrap across lines; keep
existing layout and icon classes but ensure no fixed truncation remains.

Comment on lines +84 to 95
<div className="space-y-1">
<p className="text-sm text-foreground ">Payment ID</p>
<CopyTextButton
textToCopy={bridgeStatus.paymentId}
textToShow={`${bridgeStatus.paymentId.slice(0, 6)}...${bridgeStatus.paymentId.slice(-4)}`}
textToShow={bridgeStatus.paymentId}
tooltip="Payment ID"
className="text-sm translate-x-1.5"
className="text-sm -translate-x-1.5 tabular-nums text-muted-foreground"
copyIconPosition="left"
iconClassName="text-muted-foreground/70"
variant="ghost"
/>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Payment ID must not truncate.

As implemented, CopyTextButton applies truncation internally; ensure the full Payment ID is visible per MNY-268.

Quick fix here: override truncation via className.

-          <CopyTextButton
+          <CopyTextButton
             textToCopy={bridgeStatus.paymentId}
             textToShow={bridgeStatus.paymentId}
             tooltip="Payment ID"
-            className="text-sm -translate-x-1.5 tabular-nums text-muted-foreground"
+            className="text-sm -translate-x-1.5 tabular-nums text-muted-foreground whitespace-normal break-all overflow-visible"
             copyIconPosition="left"
             iconClassName="text-muted-foreground/70"
             variant="ghost"
           />

Preferably also remove truncate in CopyTextButton itself (see my comment there).

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
around lines 84–95, the Payment ID is currently being truncated by
CopyTextButton; override that by adding a non-truncating class to this instance
(e.g., remove any "truncate" and add a class that forces full text display such
as disabling text-overflow/white-space truncation) so the full paymentId is
visible, and also follow up by removing the default truncation behavior inside
CopyTextButton itself so other callers don’t need to override it.

Comment on lines +205 to 214
<div className="space-y-4">
<div className="space-y-1">
<p className="text-sm text-foreground ">{props.addressLabel}</p>
<WalletAddress
address={props.walletAddress}
client={props.client}
className="py-0.5 h-auto text-sm [&>*]:!font-sans"
iconClassName="size-3.5"
className="py-0.5 h-auto text-sm [&>*]:!font-sans tabular-nums [&>*]:font-normal text-muted-foreground hover:text-foreground"
iconClassName="size-3"
shortenAddress={false}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

WalletAddress may still truncate even with shortenAddress={false}.

The WalletAddress component uses max-w-full truncate internally (see wallet-address.tsx). That will still ellipsize long addresses and conflicts with MNY-268.

Consider removing truncate or adding break-all/whitespace-normal in WalletAddress. I can open a follow-up PR to adjust that component if desired.

Run this to confirm and spot other truncation sites:


🏁 Script executed:

#!/bin/bash
rg -n --type=tsx -C2 'WalletAddress\(|className=.*truncate|break-all' apps/dashboard/src | sed -n '1,200p'

Length of output: 27


I'll fix the command and verify the truncation issue.


🏁 Script executed:

#!/bin/bash
# Corrected search: use --type=ts for TypeScript/TSX files, or use glob pattern
echo "=== Searching for WalletAddress usage and truncate classes ==="
rg -n --type=ts -C2 'WalletAddress\(|className=.*truncate|break-all' apps/dashboard/src 2>&1 | head -150

echo ""
echo "=== Inspecting wallet-address.tsx file ==="
fd -e tsx -e ts -path '*/wallet-address*' apps/dashboard/src

Length of output: 17973



🏁 Script executed:

#!/bin/bash
# Find wallet-address component file with correct fd syntax
echo "=== Finding wallet-address component file ==="
fd -type f -name '*wallet-address*' apps/dashboard/src

echo ""
echo "=== Display wallet-address.tsx content ==="
fd -type f -name '*wallet-address*' apps/dashboard/src -exec cat {} \;

echo ""
echo "=== View bridge-status.tsx lines 200-220 ==="
sed -n '200,220p' apps/dashboard/src/app/\(app\)/\(dashboard\)/\(chain\)/\[chain_id\]/tx/\[txHash\]/bridge-status.tsx 2>/dev/null || echo "File not found, searching for it..."

echo ""
echo "=== Search for bridge-status file ==="
fd -type f -name '*bridge-status*' apps/dashboard/src

Length of output: 1383



🏁 Script executed:

#!/bin/bash
# Use simpler grep to find wallet-address component
echo "=== Search for WalletAddress component definition ==="
find apps/dashboard/src -name '*.tsx' -o -name '*.ts' | xargs grep -l 'export.*WalletAddress\|function WalletAddress\|const WalletAddress' | head -20

echo ""
echo "=== Search in components directory ==="
find apps/dashboard/src -type d -name components | head -10

echo ""
echo "=== List files in components/ui ==="
ls -la apps/dashboard/src/components/ui/ 2>/dev/null | head -30

echo ""
echo "=== Search across all apps for wallet-address ==="
find . -type f -name '*wallet*' 2>/dev/null | grep -E '\.(tsx?|jsx?)$' | head -20

Length of output: 3598



🏁 Script executed:

#!/bin/bash
echo "=== Content of WalletAddress component ==="
cat apps/dashboard/src/@/components/blocks/wallet-address.tsx

echo ""
echo "=== Search for truncate in WalletAddress component ==="
grep -n "truncate\|max-w" apps/dashboard/src/@/components/blocks/wallet-address.tsx

Length of output: 7669


WalletAddress component uses max-w-full truncate internally, causing addresses to ellipsize despite shortenAddress={false}.

The concern is valid. The WalletAddress component (at apps/dashboard/src/@/components/blocks/wallet-address.tsx, lines 81 and 96) applies max-w-full truncate to both the Button wrapper and the address span. The shortenAddress prop only controls the display format (shortened like 0x1234...5678 vs. full), but doesn't prevent CSS truncation. When shortenAddress={false}, long addresses will still be ellipsized, conflicting with MNY-268's requirement for full address visibility.

Remove the truncate class from WalletAddress or add break-all/whitespace-normal to override it, as suggested.

🤖 Prompt for AI Agents
In
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx
around lines 205-214, the WalletAddress component is rendering long addresses
that are being ellipsized despite shortenAddress={false} because the
WalletAddress component
(apps/dashboard/src/@/components/blocks/wallet-address.tsx at lines ~81 and ~96)
applies max-w-full truncate to the wrapper and span; modify WalletAddress to
stop forcing CSS truncation: either remove the truncate class entirely or make
it conditional (only apply truncate when props.shortenAddress is true), or
replace truncate with a non-ellipsizing alternative such as break-all and
whitespace-normal when shortenAddress is false, and ensure the class updates
cover both the Button wrapper and the address span so full addresses display as
required; run the app and verify long addresses are no longer ellipsized when
shortenAddress={false}.

@graphite-app graphite-app bot merged commit db291d2 into main Oct 17, 2025
24 checks passed
@graphite-app graphite-app bot deleted the mny-268 branch October 17, 2025 20:32
@vercel vercel bot temporarily deployed to Production – thirdweb_playground October 17, 2025 20:32 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui October 17, 2025 20:32 Inactive
@vercel vercel bot temporarily deployed to Production – nebula October 17, 2025 20:32 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 October 17, 2025 20:32 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants