Skip to content

Wallet details export screen#8698

Merged
0xFirekeeper merged 2 commits intomainfrom
cursor/wallet-details-export-screen-f065
Mar 5, 2026
Merged

Wallet details export screen#8698
0xFirekeeper merged 2 commits intomainfrom
cursor/wallet-details-export-screen-f065

Conversation

@Yash094
Copy link
Member

@Yash094 Yash094 commented Mar 5, 2026


Slack Thread

Open in Web Open in Cursor 


PR-Codex overview

This PR introduces the ability to specify an initial screen when opening the useWalletDetailsModal, allowing direct navigation to the "Export Private Key" screen.

Detailed summary

  • Added initialScreen prop to useWalletDetailsModal.
  • Updated screen state initialization to use props.initialScreen.
  • Modified conditional checks for the screen state to include "export".
  • Documented the new screen prop in UseWalletDetailsModalOptions.

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

Summary by CodeRabbit

  • New Features
    • You can now open the wallet details modal directly to a specific screen when launching it, improving quick access.
    • Direct jump to the Export Private Key screen is supported for faster key export workflows.
    • Programmatic opening of the modal will respect the requested destination, simplifying navigation and UX.

…to export screen

Co-authored-by: Yash <Yash094@users.noreply.github.com>
@cursor
Copy link

cursor bot commented Mar 5, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Mar 5, 2026

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

Project Deployment Actions Updated (UTC)
docs-v2 Ready Ready Preview, Comment Mar 5, 2026 5:44pm
nebula Ready Ready Preview, Comment Mar 5, 2026 5:44pm
thirdweb_playground Ready Ready Preview, Comment Mar 5, 2026 5:44pm
thirdweb-www Ready Ready Preview, Comment Mar 5, 2026 5:44pm
wallet-ui Ready Ready Preview, Comment Mar 5, 2026 5:44pm

@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: 3377f1a

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

This PR includes changesets to release 4 packages
Name Type
thirdweb Minor
@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 Mar 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c66db2ef-c4e1-4894-8810-7bc294ab5f5e

📥 Commits

Reviewing files that changed from the base of the PR and between 3377f1a and d31e33c.

📒 Files selected for processing (1)
  • .changeset/wallet-details-export-screen.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/wallet-details-export-screen.md

Walkthrough

This PR adds an initialScreen prop and a screen option to the wallet details modal/hook, allowing the modal to open directly at a specified screen (notably "export" to jump to the Export Private Key screen).

Changes

Cohort / File(s) Summary
Changeset Documentation
\.changeset/wallet-details-export-screen.md
Adds a patch-level changeset entry documenting the new screen prop for useWalletDetailsModal.
Modal Implementation
packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx
Added initialScreen prop to DetailsModal and screen?: WalletDetailsModalScreen to UseWalletDetailsModalOptions; modal state now initializes from `initialScreen

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and directly describes the main feature: enabling the Wallet Details modal to open directly to the Export Private Key screen.
Description check ✅ Passed The description is mostly complete with notes for reviewers, testing instructions, and implementation details, though it doesn't strictly follow the suggested template format.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/wallet-details-export-screen-f065

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

size-limit report 📦

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

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.73%. Comparing base (1d28988) to head (d31e33c).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...hirdweb/src/react/web/ui/ConnectWallet/Details.tsx 60.00% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (60.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8698      +/-   ##
==========================================
- Coverage   52.74%   52.73%   -0.02%     
==========================================
  Files         934      934              
  Lines       62965    62968       +3     
  Branches     4136     4138       +2     
==========================================
- Hits        33211    33204       -7     
- Misses      29654    29666      +12     
+ Partials      100       98       -2     
Flag Coverage Δ
packages 52.73% <60.00%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
...hirdweb/src/react/web/ui/ConnectWallet/Details.tsx 57.94% <60.00%> (+0.02%) ⬆️

... and 3 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.

@Yash094 Yash094 marked this pull request as ready for review March 5, 2026 08:24
@Yash094 Yash094 requested review from a team as code owners March 5, 2026 08:24
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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`:
- Line 1830: Add unit tests that cover the new screen propagation through the
ConnectWallet UI by asserting that when open({ screen: "export" }) is invoked
the UI lands on the Export Private Key view and that calling open() without a
screen starts at "main"; specifically, write tests that render the component
which uses initialScreen={props.screen} (the Details.tsx wiring), call the open
helper/prop used by your component with and without a screen value, and assert
the rendered output contains the Export Private Key content for the "export"
case and the main screen content for the omission case.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8ad4a910-e7b9-4c50-8ab2-45878839b72b

📥 Commits

Reviewing files that changed from the base of the PR and between 1d28988 and 3377f1a.

📒 Files selected for processing (2)
  • .changeset/wallet-details-export-screen.md
  • packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx

showTestnetFaucet: props.showTestnetFaucet,
}}
displayBalanceToken={props.displayBalanceToken}
initialScreen={props.screen}
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 | 🟡 Minor

Add regression tests for the new screen propagation path.

initialScreen={props.screen} is the core wiring for this feature, but the patch currently has no coverage on this line. Please add a test that verifies:

  • open({ screen: "export" }) lands on Export Private Key
  • omitting screen still starts at "main"
🧰 Tools
🪛 GitHub Check: codecov/patch

[warning] 1830-1830: packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx#L1830
Added line #L1830 was not covered by tests

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx` at line 1830,
Add unit tests that cover the new screen propagation through the ConnectWallet
UI by asserting that when open({ screen: "export" }) is invoked the UI lands on
the Export Private Key view and that calling open() without a screen starts at
"main"; specifically, write tests that render the component which uses
initialScreen={props.screen} (the Details.tsx wiring), call the open helper/prop
used by your component with and without a screen value, and assert the rendered
output contains the Export Private Key content for the "export" case and the
main screen content for the omission case.

Co-authored-by: Yash <Yash094@users.noreply.github.com>
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.

3 participants