Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Dec 5, 2025


PR-Codex overview

This PR updates the success messages displayed in various components of the thirdweb library to provide clearer feedback for users after completing transactions.

Detailed summary

  • Updated type for SuccessScreen in SwapWidget to "swap-success".
  • Added type prop handling in SuccessScreen for distinguishing between "swap-success" and "payment-success".
  • Modified success messages and titles in SuccessScreen based on the type.
  • Introduced a new story BasicSwapSuccess in SuccessScreen.stories.tsx to showcase the swap success scenario.

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

Summary by CodeRabbit

  • New Features
    • Success screens now show dynamic, context-specific titles and descriptions for swap vs. payment flows.
    • Button label unified to "View Transaction Receipt" across applicable success screens for clearer, consistent terminology.

✏️ Tip: You can customize this high-level summary in your review settings.

@linear
Copy link

linear bot commented Dec 5, 2025

@vercel
Copy link

vercel bot commented Dec 5, 2025

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

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Ready Preview Comment Dec 5, 2025 8:55pm
nebula Ready Ready Preview Comment Dec 5, 2025 8:55pm
thirdweb_playground Ready Ready Preview Comment Dec 5, 2025 8:55pm
thirdweb-www Ready Ready Preview Comment Dec 5, 2025 8:55pm
wallet-ui Ready Ready Preview Comment Dec 5, 2025 8:55pm

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2025

🦋 Changeset detected

Latest commit: 7b873d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
thirdweb Patch
@thirdweb-dev/nebula Patch
@thirdweb-dev/wagmi-adapter Patch
wagmi-inapp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 5, 2025

Walkthrough

Adds a discriminating type prop to SuccessScreen to render context-specific title/description ("swap-success" vs "payment-success"); prop is passed from SwapWidget, BuyWidget, CheckoutWidget, TransactionWidget and reflected in Storybook and a changeset.

Changes

Cohort / File(s) Summary
SuccessScreen component
packages/thirdweb/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx
Added exported prop type: "swap-success" | "payment-success". Component now derives title/description from type and updated button label text.
Widget integrations
packages/thirdweb/src/react/web/ui/Bridge/...SwapWidget.tsx, .../BuyWidget.tsx, .../CheckoutWidget.tsx, .../TransactionWidget.tsx
Pass type into SuccessScreen on success screens (swap-success for SwapWidget; payment-success for Buy/Checkout/Transaction widgets). No other control-flow changes.
Storybook
packages/thirdweb/src/stories/Bridge/SuccessScreen.stories.tsx
Set default meta.args.type = "payment-success" and added BasicSwapSuccess story with type: "swap-success".
Release changelog
.changeset/happy-dots-jam.md
Added changeset documenting the success message update.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review SuccessScreen.tsx for correctness of the new prop type, title/description logic, and updated button text.
  • Verify all widget invocations pass the appropriate type and that there are no prop-type or rendering regressions in SwapWidget, BuyWidget, CheckoutWidget, TransactionWidget.
  • Check Storybook stories render both variants as expected and that the changeset accurately reflects the user-visible change.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
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.
Description check ⚠️ Warning The PR description lacks required template sections: no PR title format, no issue tag, no explicit notes for reviewer, and no testing instructions provided. Add PR title following format '[SDK/Dashboard/Portal] Feature/Fix: title', include issue tag (MNY-322), provide explicit reviewer notes, and document testing approach (unit tests, playground, etc).
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating success messages in the SwapWidget component, which aligns with the primary objective of the PR.
Linked Issues check ✅ Passed The PR successfully implements the linked issue requirement: SuccessScreen now accepts a type prop distinguishing 'swap-success' from 'payment-success', enabling different titles like 'Swap successful' for swap flows.
Out of Scope Changes check ✅ Passed All changes are scoped to the linked issue MNY-322: updating SuccessScreen messaging with type discrimination, updating widget components to pass appropriate type props, and adding related story examples.
✨ 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-322

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.

@MananTank MananTank marked this pull request as ready for review December 5, 2025 20:17
@MananTank MananTank requested review from a team as code owners December 5, 2025 20:17
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Dec 5, 2025
Copy link
Member Author

MananTank commented Dec 5, 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.

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.65%. Comparing base (d33a943) to head (7b873d3).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ct/web/ui/Bridge/payment-success/SuccessScreen.tsx 0.00% 9 Missing ⚠️
...ges/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx 0.00% 1 Missing ⚠️
...dweb/src/react/web/ui/Bridge/TransactionWidget.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8509      +/-   ##
==========================================
- Coverage   54.66%   54.65%   -0.02%     
==========================================
  Files         920      920              
  Lines       61105    61114       +9     
  Branches     4142     4145       +3     
==========================================
- Hits        33404    33399       -5     
- Misses      27599    27613      +14     
  Partials      102      102              
Flag Coverage Δ
packages 54.65% <0.00%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
...ges/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx 4.60% <0.00%> (-0.02%) ⬇️
...dweb/src/react/web/ui/Bridge/TransactionWidget.tsx 7.00% <0.00%> (-0.02%) ⬇️
...ct/web/ui/Bridge/payment-success/SuccessScreen.tsx 8.69% <0.00%> (-0.47%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

size-limit report 📦

Path Size
@thirdweb-dev/nexus (esm) 105.66 KB (0%)
@thirdweb-dev/nexus (cjs) 319.47 KB (0%)

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 5, 2025

Merge activity

…8509)

<!--

## 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 updates the success messages in the `SuccessScreen` component across various widgets in the `thirdweb` package, specifically for payment and swap transactions.

### Detailed summary
- Updated success message type in `SwapWidget` to `"swap-success"`.
- Updated success message type in `BuyWidget` and `CheckoutWidget` to `"payment-success"`.
- Added a new story `BasicSwapSuccess` in `SuccessScreen.stories.tsx`.
- Modified `SuccessScreen` to handle different message types.
- Updated displayed titles and descriptions based on the success type.
- Changed button text from "View Payment Receipt" to "View Transaction Receipt".

> ✨ 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**
  * Success screens now display dynamic, context-appropriate messaging tailored to transaction type, with distinct titles and descriptions for swap versus payment transactions.
  * Enhanced user experience with improved terminology—the option to "View Transaction Receipt" now displays consistently across all payment flows for better clarity and consistency.

<sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants