-
Notifications
You must be signed in to change notification settings - Fork 619
[SDK] Feature: Allow proceeding past first checkout widget page with no wallet #7937
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
[SDK] Feature: Allow proceeding past first checkout widget page with no wallet #7937
Conversation
🦋 Changeset detectedLatest commit: caa9fa9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds a patch changeset; CheckoutWidget now shows an error UI with a retry for bridge-data fetch failures; DirectPayment removes wallet-connection gating and the Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant CW as CheckoutWidget
participant API as Bridge Data API
U->>CW: Open widget
CW->>API: fetch bridge data
alt success
API-->>CW: data
CW-->>U: Render normal content
else error
API-->>CW: error
Note right of CW #f9f1d7: New error UI with "Something went wrong." + Retry
CW-->>U: Show error + Retry Button
U->>CW: Click Retry
CW->>API: refetch()
API-->>CW: data or error
end
sequenceDiagram
autonumber
participant BO as BridgeOrchestrator
participant DP as DirectPayment
participant U as User
BO->>DP: Init direct payment (without connectOptions)
Note right of DP #e6f7ff: Always renders primary Button (no ConnectButton)
U->>DP: Click primary action
DP-->>BO: onContinue()
BO-->>U: Proceed to next step
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.changeset/eager-loops-fold.md (1)
1-5: Tighten the changeset note for clarity and consistency.Consider clarifying scope and adding a period.
-Allows using the checkout widget without a wallet connected +CheckoutWidget: allow using the widget without a wallet connected.packages/thirdweb/src/react/web/ui/Bridge/payment-selection/WalletFiatSelection.tsx (1)
124-124: Label can be context-aware.When the user already has connected wallets, “Connect another wallet” is clearer; otherwise “Connect a wallet”.
- Connect a Wallet + {connectedWallets.length > 0 + ? "Connect another wallet" + : "Connect a wallet"}packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx (1)
427-438: Handle all error states, add a11y, and prevent multiple retries.
- Also handle locale load failures to avoid spinner lock.
- Mark error region for assistive tech.
- Disable Retry during refetch.
- if (bridgeDataQuery.isError) { + if (bridgeDataQuery.isError || localeQuery.isError) { content = ( - <Container flex="column" center="both" gap="md" p="md" py="xl"> + <Container + flex="column" + center="both" + gap="md" + p="md" + py="xl" + role="alert" + aria-live="polite" + > <Text center size="md" weight={600}> Something went wrong. </Text> - <Button variant="ghost" onClick={() => bridgeDataQuery.refetch()}> + <Button + variant="ghost" + onClick={() => bridgeDataQuery.refetch()} + disabled={bridgeDataQuery.isFetching} + aria-busy={bridgeDataQuery.isFetching} + > Retry </Button> </Container> ); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (5)
.changeset/eager-loops-fold.md(1 hunks)packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx(0 hunks)packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx(2 hunks)packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx(1 hunks)packages/thirdweb/src/react/web/ui/Bridge/payment-selection/WalletFiatSelection.tsx(1 hunks)
💤 Files with no reviewable changes (1)
- packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Files:
packages/thirdweb/src/react/web/ui/Bridge/payment-selection/WalletFiatSelection.tsxpackages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsxpackages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
packages/thirdweb/src/react/web/ui/Bridge/payment-selection/WalletFiatSelection.tsxpackages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsxpackages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx
🧠 Learnings (7)
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Support for in-app wallets (social/email login)
Applied to files:
.changeset/eager-loops-fold.md
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
Applied to files:
.changeset/eager-loops-fold.md
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Smart wallets with account abstraction
Applied to files:
.changeset/eager-loops-fold.md
📚 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:
packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
📚 Learning: 2025-06-06T23:46:08.795Z
Learnt from: MananTank
PR: thirdweb-dev/js#7298
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:424-424
Timestamp: 2025-06-06T23:46:08.795Z
Learning: The thirdweb project has an ESLint rule that restricts direct usage of `defineChain`. When it's necessary to use `defineChain` directly, it's acceptable to disable the rule with `// eslint-disable-next-line no-restricted-syntax`.
Applied to files:
packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Applied to files:
packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.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/**/*.{tsx,jsx} : Reuse core UI primitives; avoid re-implementing buttons, cards, modals.
Applied to files:
packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx
🧬 Code graph analysis (2)
packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx (1)
packages/thirdweb/src/react/web/ui/components/buttons.tsx (1)
Button(19-140)
packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx (1)
packages/thirdweb/src/react/web/ui/components/text.tsx (1)
Text(17-32)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Size
- GitHub Check: Lint Packages
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: Build Packages
- GitHub Check: Unit Tests
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx (2)
25-29: LGTM: lightweight UI imports.New UI primitives are within our design system and won’t impact bundle size materially.
427-438: Connect gating removal verified and correctly appliedAll checks confirm that
connectOptionshas been fully removed from the direct payment flow:
DirectPaymentPropsno longer declaresconnectOptions(packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx)- No JSX call sites pass
connectOptionsto<DirectPayment>anywhere in the codebase- In
BridgeOrchestrator, the direct payment branch renders<DirectPayment>without forwardingconnectOptionsNo further changes needed.
packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx (1)
179-181: LGTM: proceed CTA always enabled.Matches the PR objective to proceed without requiring wallet connection.
size-limit report 📦
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7937 +/- ##
==========================================
+ Coverage 56.53% 56.54% +0.01%
==========================================
Files 904 904
Lines 58592 58573 -19
Branches 4143 4140 -3
==========================================
- Hits 33126 33123 -3
+ Misses 25360 25344 -16
Partials 106 106
🚀 New features to boost your workflow:
|
Merge activity
|
PR-Codex overview
This PR introduces enhancements to the
thirdwebcheckout widget, allowing it to function without a connected wallet. It also improves UI text for clarity and adds error handling for the widget.Detailed summary
WalletFiatSelectionfor better clarity.CheckoutWidgetwith a retry option.DirectPayment.DirectPayment.Summary by CodeRabbit
New Features
Style
Chores