Skip to content

[TOOL-4667] Dashboard: Various improvements in ERC20 asset creation flow #7264

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

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Jun 3, 2025


PR-Codex overview

This PR focuses on renaming terms related to "Token" to "Coin" throughout the codebase for consistency and clarity. It also refines error handling and updates certain UI components.

Detailed summary

  • Renamed "Token" to "Coin" in various UI components and messages.
  • Updated parseError function to be exported.
  • Introduced ContractTypeCellUI component for better contract type display.
  • Enhanced multi-step status handling with structured status objects.

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

Summary by CodeRabbit

  • New Features

    • Enhanced multi-step status tracking with structured error messages and improved error display in step-based processes.
  • Improvements

    • Updated all user-facing terminology from "Token" to "Coin" across creation, distribution, and sale interfaces.
    • Distribution and allocation charts now reflect "Coin" terminology and dynamically display the coin symbol when available.
    • Improved contract table to show "Coin" for relevant contract types.
    • Refined event tracking to trigger only when relevant actions occur.
  • Bug Fixes

    • Error messages in step-based processes are now displayed more clearly with detailed information.
  • Refactor

    • Streamlined contract type badge rendering for consistency and maintainability.

Copy link

linear bot commented Jun 3, 2025

Copy link

changeset-bot bot commented Jun 3, 2025

⚠️ No Changeset found

Latest commit: 1c6ed9b

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 – login June 3, 2025 18:29 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 3, 2025 18:29 Inactive
Copy link

vercel bot commented Jun 3, 2025

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

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

@vercel vercel bot temporarily deployed to Preview – wallet-ui June 3, 2025 18:29 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 3, 2025 18:29 Inactive
Copy link
Contributor

coderabbitai bot commented Jun 3, 2025

"""

Walkthrough

This change refactors the ERC-20 creation wizard and related asset pages to replace all user-facing references of "Token" with "Coin." It also updates the multi-step status logic to use structured status objects with error messages, and adjusts supporting components and utilities accordingly. No changes to exported/public entity signatures except for one utility function.

Changes

File(s) Change Summary
.../multi-step-status/multi-step-status.stories.tsx
.../multi-step-status.tsx
.../launch/launch-token.tsx
Refactored step status from string to object with type and optional message; removed retryLabel; updated error handling and UI.
.../assets/cards.tsx
.../assets/create/create-token-page-impl.tsx
.../assets/create/distribution/token-sale.tsx
.../assets/create/page.tsx
.../assets/create/token-info-fieldset.tsx
Changed user-facing text from "Token" to "Coin" in titles, descriptions, and labels.
.../assets/create/create-token-page.client.tsx
.../assets/create/distribution/token-distribution.tsx
Passed and handled new tokenSymbol prop; updated labels and titles from "Token" to "Coin."
.../tables/cells.tsx
.../tables/contract-table.tsx
Refactored contract type cell rendering; introduced ContractTypeCellUI; mapped "DropERC20" to "Coin" for asset type display.
.../utils/errorParser.tsx Made parseError function exported for use in error handling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CreateCoinWizard
    participant MultiStepStatus
    participant ErrorParser

    User->>CreateCoinWizard: Initiate coin creation
    CreateCoinWizard->>MultiStepStatus: Update step status ({ type: "pending" })
    MultiStepStatus-->>CreateCoinWizard: Status update acknowledged
    alt Error occurs
        CreateCoinWizard->>ErrorParser: parseError(error)
        ErrorParser-->>CreateCoinWizard: error message
        CreateCoinWizard->>MultiStepStatus: Update status ({ type: "error", message })
    end
    MultiStepStatus-->>User: Display current step status and error message if any
Loading

Assessment against linked issues

Objective Addressed Explanation
Rename Token to Coin in ERC20 creation wizard and asset page (TOOL-4667)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Refactor multi-step status from string to object with error message (multi-step-status.tsx, launch-token.tsx, etc.) This structural change to status handling is not strictly required for the "Token" to "Coin" rename, but may be justified as internal improvement.
Export parseError function (utils/errorParser.tsx) Making the error parser exportable is not directly related to the rename objective.

Suggested reviewers

  • MananTank
  • jnsdls
    """

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 bd9ca69 and 1c6ed9b.

📒 Files selected for processing (13)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx (1 hunks)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/cards.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/create-token-page-impl.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/create-token-page.client.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-distribution.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-sale.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/launch/launch-token.tsx (8 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/token-info-fieldset.tsx (3 hunks)
  • apps/dashboard/src/components/contract-components/tables/cells.tsx (1 hunks)
  • apps/dashboard/src/components/contract-components/tables/contract-table.tsx (3 hunks)
  • apps/dashboard/src/utils/errorParser.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-sale.tsx
🚧 Files skipped from review as they are similar to previous changes (12)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/page.tsx
  • apps/dashboard/src/utils/errorParser.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/create-token-page-impl.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/create-token-page.client.tsx
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-distribution.tsx
  • apps/dashboard/src/components/contract-components/tables/cells.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/cards.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/token-info-fieldset.tsx
  • apps/dashboard/src/components/contract-components/tables/contract-table.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/launch/launch-token.tsx
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Build Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
✨ 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.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Jun 3, 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.

@MananTank MananTank marked this pull request as ready for review June 3, 2025 18:30
@MananTank MananTank requested review from a team as code owners June 3, 2025 18:30
Copy link

codecov bot commented Jun 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.57%. Comparing base (82035fd) to head (1c6ed9b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7264   +/-   ##
=======================================
  Coverage   55.57%   55.57%           
=======================================
  Files         909      909           
  Lines       58681    58681           
  Branches     4167     4167           
=======================================
  Hits        32612    32612           
  Misses      25961    25961           
  Partials      108      108           
Flag Coverage Δ
packages 55.57% <ø> (ø)
🚀 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

🧹 Nitpick comments (1)
apps/dashboard/src/components/contract-components/tables/contract-table.tsx (1)

295-297: Consider adding JSDoc for better maintainability.

The mapping object correctly implements the DropERC20 → Coin transformation. Consider adding documentation to help future maintainers understand the purpose and expected format.

Apply this diff to add documentation:

+/**
+ * Maps contract types to their corresponding asset type display names
+ * Used when rendering contract tables in "asset" variant
+ */
 const contractTypeToAssetTypeRecord: Record<string, string | undefined> = {
   DropERC20: "Coin",
 };
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between dfe4cf0 and ab2396d.

📒 Files selected for processing (13)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx (1 hunks)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/cards.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/create-token-page-impl.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/create-token-page.client.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-distribution.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-sale.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/launch/launch-token.tsx (8 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/token-info-fieldset.tsx (3 hunks)
  • apps/dashboard/src/components/contract-components/tables/cells.tsx (1 hunks)
  • apps/dashboard/src/components/contract-components/tables/contract-table.tsx (3 hunks)
  • apps/dashboard/src/utils/errorParser.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
apps/dashboard/src/components/contract-components/tables/contract-table.tsx (1)
apps/dashboard/src/components/contract-components/tables/cells.tsx (2)
  • ContractTypeCellUI (116-127)
  • ContractTypeCell (59-114)
apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx (1)
packages/thirdweb/src/react/web/ui/components/Spinner.tsx (1)
  • Spinner (11-34)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/launch/launch-token.tsx (2)
apps/dashboard/src/utils/errorParser.tsx (1)
  • parseError (29-69)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/create-token-card.tsx (1)
  • StepCard (6-79)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Size
  • GitHub Check: Build Packages
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (34)
apps/dashboard/src/components/contract-components/tables/cells.tsx (1)

116-127: LGTM! Well-structured UI component.

The ContractTypeCellUI component effectively consolidates the badge rendering logic with consistent styling and appropriate fallback behavior.

apps/dashboard/src/components/contract-components/tables/contract-table.tsx (2)

36-40: LGTM! Import statement correctly updated.

The import statement properly includes the new ContractTypeCellUI component needed for the asset type mapping functionality.


193-207: Excellent implementation of asset type mapping.

The conditional logic correctly implements the "Token" to "Coin" terminology change for asset tables while maintaining backward compatibility for contract tables. The logic properly validates all required conditions before applying the mapping.

apps/dashboard/src/utils/errorParser.tsx (1)

29-29: LGTM! Good refactor for code reusability.

Exporting the parseError function enables its reuse in other parts of the codebase, particularly in the launch token process for enhanced error handling. This follows good software engineering practices.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/cards.tsx (2)

35-36: LGTM! Consistent terminology update.

The terminology change from "Token" to "Coin" aligns with the PR objectives and maintains consistency across the UI.


79-86: LGTM! Good defensive programming improvement.

The logic now correctly guards the tracking and onClick execution to only occur when onClick is actually defined, preventing unnecessary tracking events and potential runtime errors.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/create-token-page-impl.tsx (1)

339-339: LGTM! Consistent terminology update.

The change from "Token Sale phase" to "Coin Sale phase" maintains consistency with the broader terminology update across the asset creation flow.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/page.tsx (3)

92-92: LGTM! Consistent breadcrumb terminology update.

The breadcrumb text change from "Create Token" to "Create Coin" maintains consistency with the overall terminology refactoring.


101-101: LGTM! Consistent page heading update.

The page heading change from "Create Token" to "Create Coin" aligns with the UI terminology standardization.


104-104: LGTM! Consistent description update.

The description change from "Launch an ERC-20 token" to "Launch an ERC-20 coin" completes the terminology consistency across the page elements.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-sale.tsx (1)

29-29: LGTM! Terminology update aligns with PR objectives.

The change from "token" to "coin" in the user-facing description text is consistent with the broader terminology standardization effort across the ERC20 asset creation flow.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/create-token-page.client.tsx (1)

104-104:

✅ Verification successful

Verify TokenDistributionFieldset handles the new tokenSymbol prop correctly.

The addition of the tokenSymbol prop enables dynamic terminology updates in the distribution step. This supports the "Token" to "Coin" terminology shift by allowing the component to use the actual symbol name.


🏁 Script executed:

#!/bin/bash
# Description: Verify TokenDistributionFieldset component accepts and uses the tokenSymbol prop

# Search for TokenDistributionFieldset component definition and prop usage
ast-grep --pattern $'function TokenDistributionFieldset(props: {
  $$$
  tokenSymbol: $_
  $$$
}) {
  $$$
}'

# Also search for any usage of tokenSymbol within the component
rg -A 10 "tokenSymbol" apps/dashboard/src/app/\(app\)/team/\[team_slug\]/\[project_slug\]/\(sidebar\)/assets/create/distribution/

Length of output: 12216


TokenDistributionFieldset handles tokenSymbol prop correctly

Verified that TokenDistributionFieldset’s props include tokenSymbol: string | undefined and that the component uses props.tokenSymbol || "Tokens" to render the UI dynamically. No further changes needed.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/token-info-fieldset.tsx (3)

35-35: LGTM! Title updated to reflect new terminology.

The StepCard title change from "Token Information" to "Coin Information" is consistent with the broader terminology standardization effort.


73-73: LGTM! Placeholder text updated appropriately.

The name input placeholder change from "My Token" to "My Coin" maintains consistency with the new terminology while preserving the example format.


123-123: LGTM! Description placeholder updated consistently.

The textarea placeholder change from "Describe your token" to "Describe your coin" completes the terminology update for this component.

apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx (2)

39-39: LGTM! Error status now supports descriptive messages.

The error status object now includes a message field, which enables better error communication to users. This is an improvement over the previous simple string status.


25-25:

✅ Verification successful

Verify all MultiStepStatus usages match the new status structure.

The status structure has changed from simple strings to objects with a type property. This is a breaking change that improves the API by enabling structured status handling.

Also applies to: 32-32, 46-46, 53-53


🏁 Script executed:

#!/bin/bash
# Description: Find all usages of MultiStepStatus component to ensure they use the new status structure

# Search for MultiStepStatus component usage
rg -A 10 -B 5 "MultiStepStatus" --type tsx --type ts

# Search for potential old status usage patterns (simple strings)
rg -A 5 -B 5 'status:\s*["\'](?:completed|pending|error|idle)["\']' --type tsx --type ts

# Search for the new status object pattern
rg -A 5 -B 5 'status:\s*{\s*type:' --type tsx --type ts

Length of output: 352


I've updated the search to cover all .ts/.tsx files without relying on built-in file types and refined the regex. Running:


🏁 Script executed:

#!/bin/bash
set -e

# Search for MultiStepStatus component usage across .ts and .tsx
rg -nH -C3 "MultiStepStatus" -g '*.ts*'

# Search for old simple-string status usage
rg -nH -C3 "status:\s*['\"](completed|pending|error|idle)['\"]" -g '*.ts*'

# Search for new object-based status usage
rg -nH -C3 "status:\s*{[^}]*type\s*:" -g '*.ts*'

Length of output: 21420


No breaking changes in component usage detected—only Storybook stories use the new status shape

I verified that everywhere in the app codebase the MultiStepStatus component is only ever invoked with a steps array (not a standalone status prop), so the new { type: … } shape only affects Storybook stories and stubs.

• The only direct status: object usages are in

  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx
  • apps/dashboard/src/stories/stubs.ts

• All real-world imports of MultiStepStatus (e.g. in launch-token.tsx) consume steps, so no runtime breakage will occur.

No further changes are required.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-distribution.tsx (4)

26-26: Good addition of dynamic token symbol prop.

The optional tokenSymbol prop enhances the component's flexibility by allowing dynamic display of the actual token symbol instead of generic text.


34-34: Consistent terminology update.

The change from "Token Distribution" to "Coin Distribution" aligns with the broader terminology update across the application.


54-54: Proper fallback handling for token symbol.

The implementation correctly uses the provided tokenSymbol or falls back to "Tokens" when undefined, ensuring the UI always displays meaningful text.


111-111: Consistent chart title update.

The change from "Token Allocation" to "Coin Allocation" maintains consistency with the overall terminology update.

apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx (4)

14-21: Excellent type safety improvement with discriminated union.

The refactor from simple string status to a discriminated union is a significant improvement that:

  • Provides better type safety
  • Allows error messages to be strongly typed
  • Enables more sophisticated error handling

This is a well-designed change that follows TypeScript best practices.


34-42: Proper status type checking updates.

All status comparisons have been correctly updated to use the .type property, maintaining consistency with the new discriminated union structure.


46-53: Consistent styling logic updates.

The text styling conditions have been properly updated to use the .type property, ensuring visual feedback remains accurate with the new status structure.


58-62: Improved error message display.

The change to use step.status.message for error display is an improvement over the previous separate retryLabel approach, providing more contextual and specific error information.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/launch/launch-token.tsx (9)

19-23: Good import additions for enhanced functionality.

The addition of ArrowUpFromLineIcon and parseError import supports the UI updates and centralized error handling improvements.


28-28: Centralized error parsing import.

Using the centralized parseError utility promotes consistency in error handling across the application.


93-96: Proper status object format implementation.

The status updates correctly use the new discriminated union format with type property for "pending" and "completed" states, aligning with the refactored MultiStepState type.


109-109: Enhanced error handling with structured status.

The error status now properly uses the discriminated union format with parseError to provide consistent error messaging. This is a significant improvement in error handling quality.


123-149: Consistent initial status format.

All initial step statuses correctly use the new object format with type: "idle", ensuring consistency with the refactored type definition.


164-165: Proper completion and pending state checks.

The completion and pending checks have been correctly updated to use .type property, maintaining functionality with the new status structure.


170-170: Consistent terminology update in step title.

The change from "Launch Token" to "Launch Coin" maintains consistency with the application-wide terminology update.


186-187: Updated button styling and terminology.

The icon change to ArrowUpFromLineIcon and text update to "Launch Coin" improve both visual appeal and terminology consistency.


260-260: Consistent link text update.

The change from "View Token" to "View Coin" completes the terminology consistency throughout the launch flow.

Copy link
Contributor

github-actions bot commented Jun 3, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 62.57 KB (0%) 1.3 s (0%) 237 ms (+196.32% 🔺) 1.5 s
thirdweb (cjs) 345.38 KB (0%) 7 s (0%) 600 ms (+1.71% 🔺) 7.6 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 47 ms (+751.53% 🔺) 161 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 15 ms (+700.76% 🔺) 25 ms
thirdweb/react (minimal + tree-shaking) 19.56 KB (0%) 392 ms (0%) 66 ms (+471.8% 🔺) 457 ms

@MananTank MananTank force-pushed the 06-03-_tool-4667_dashboard_various_improvements_in_erc20_asset_creation_flow branch from ab2396d to bd9ca69 Compare June 3, 2025 19:31
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 3, 2025 19:31 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 3, 2025 19:31 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 3, 2025 19:31 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 3, 2025 19:31 Inactive
Copy link
Contributor

graphite-app bot commented Jun 3, 2025

Merge activity

…low (#7264)

<!--

## 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 "Token" to "Coin" throughout the codebase, along with some improvements in error handling and component structure.

### Detailed summary
- Renamed "Token" to "Coin" in various components and UI elements.
- Updated the `parseError` function to be exported.
- Introduced `ContractTypeCellUI` for better contract type rendering.
- Modified multi-step status handling to include more structured error messages.

> ✨ 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**
	- Enhanced multi-step status tracking with structured error messages and improved error display in step-based processes.

- **Improvements**
	- Updated all user-facing terminology from "Token" to "Coin" across creation, distribution, and sale interfaces.
	- Distribution and allocation charts now reflect "Coin" terminology and dynamically display the coin symbol when available.
	- Improved contract table to show "Coin" for relevant contract types.
	- Refined event tracking to trigger only when relevant actions occur.

- **Bug Fixes**
	- Error messages in step-based processes are now displayed more clearly with detailed information.

- **Refactor**
	- Streamlined contract type badge rendering for consistency and maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the 06-03-_tool-4667_dashboard_various_improvements_in_erc20_asset_creation_flow branch from bd9ca69 to 1c6ed9b Compare June 3, 2025 22:33
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 3, 2025 22:33 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 3, 2025 22:33 Inactive
@vercel vercel bot temporarily deployed to Preview – login June 3, 2025 22:33 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 3, 2025 22:33 Inactive
@graphite-app graphite-app bot merged commit 1c6ed9b into main Jun 3, 2025
24 checks passed
@graphite-app graphite-app bot deleted the 06-03-_tool-4667_dashboard_various_improvements_in_erc20_asset_creation_flow branch June 3, 2025 22:41
@vercel vercel bot temporarily deployed to Production – login June 3, 2025 22:41 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 June 3, 2025 22:41 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground June 3, 2025 22:41 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui June 3, 2025 22:41 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.

2 participants