Skip to content

chore: remove Team from confirmEmail response #7200

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

Merged
merged 1 commit into from
May 30, 2025

Conversation

arcoraven
Copy link
Contributor

@arcoraven arcoraven commented May 29, 2025

PR-Codex overview

This PR focuses on removing the dependency on the Team type across various components related to email verification, simplifying the data structures used in the onboarding process.

Detailed summary

  • Removed teamStub import in VerifyEmail.stories.tsx.
  • Eliminated Team type usage in useApi.ts, VerifyEmail.tsx, and account-onboarding-ui.tsx.
  • Updated onEmailConfirmed and verifyEmail props to only include account instead of both account and team.
  • Adjusted the onComplete callback in AccountOnboardingUI to directly use props.onComplete.

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

Summary by CodeRabbit

  • Refactor
    • Simplified onboarding and email verification flows by removing the requirement for team-related data. All relevant callbacks and functions now operate solely with account information.
  • Type Updates
    • Updated type signatures for onboarding and verification handlers to exclude the team property, streamlining integration for end-users and developers.

@arcoraven arcoraven requested review from a team as code owners May 29, 2025 15:18
Copy link

vercel bot commented May 29, 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 May 30, 2025 1:16am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) May 30, 2025 1:16am
login ⬜️ Skipped (Inspect) May 30, 2025 1:16am
thirdweb_playground ⬜️ Skipped (Inspect) May 30, 2025 1:16am
wallet-ui ⬜️ Skipped (Inspect) May 30, 2025 1:16am

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 29, 2025 15:18 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 29, 2025 15:18 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 29, 2025 15:18 Inactive
Copy link

changeset-bot bot commented May 29, 2025

⚠️ No Changeset found

Latest commit: ac4ade6

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 May 29, 2025 15:18 Inactive
Copy link
Contributor

coderabbitai bot commented May 29, 2025

Warning

Rate limit exceeded

@graphite-app[bot] has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 3 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 7ac54a4 and ac4ade6.

📒 Files selected for processing (4)
  • apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts (1 hunks)
  • apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.stories.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/login/onboarding/account-onboarding-ui.tsx (2 hunks)

Walkthrough

The changes remove all references to the Team type and related data from the email verification and onboarding flow. Function signatures, callback parameters, and return types are updated to only include the account property, simplifying the data structures passed between components and API calls.

Changes

File(s) Change Summary
apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts Removed Team type import; updated verifyEmailClient result type to only include account, not team.
apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.stories.tsx Removed teamStub import; verifyEmail mock no longer returns team property.
apps/dashboard/src/app/(app)/login/onboarding/VerifyEmail/VerifyEmail.tsx Removed Team type; updated onEmailConfirmed and verifyEmail types to exclude team from parameters/results.
apps/dashboard/src/app/(app)/login/onboarding/account-onboarding-ui.tsx Removed Team type; updated onComplete and verifyEmail types to exclude team; simplified handlers.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant VerifyEmailComponent
    participant API

    User->>VerifyEmailComponent: Submit confirmation token
    VerifyEmailComponent->>API: verifyEmail({ confirmationToken })
    API-->>VerifyEmailComponent: { account }
    VerifyEmailComponent->>ParentComponent: onEmailConfirmed({ account })
Loading
sequenceDiagram
    participant ParentComponent
    participant AccountOnboarding
    participant API

    ParentComponent->>AccountOnboarding: Start onboarding
    AccountOnboarding->>API: verifyEmail({ confirmationToken })
    API-->>AccountOnboarding: { account }
    AccountOnboarding->>ParentComponent: onComplete({ account })
Loading
✨ 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.

Copy link
Contributor

graphite-app bot commented May 29, 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.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label May 29, 2025
Copy link

codecov bot commented May 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.65%. Comparing base (819ce86) to head (ac4ade6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7200      +/-   ##
==========================================
+ Coverage   55.63%   55.65%   +0.01%     
==========================================
  Files         908      908              
  Lines       58546    58546              
  Branches     4129     4130       +1     
==========================================
+ Hits        32573    32582       +9     
+ Misses      25868    25858      -10     
- Partials      105      106       +1     
Flag Coverage Δ
packages 55.63% <ø> (-0.01%) ⬇️

see 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.

Copy link
Contributor

github-actions bot commented May 29, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 62.11 KB (0%) 1.3 s (0%) 3.2 s (+22.08% 🔺) 4.5 s
thirdweb (cjs) 345.28 KB (0%) 7 s (0%) 22 s (+0.51% 🔺) 28.9 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 885 ms (+448.36% 🔺) 999 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 173 ms (+205.31% 🔺) 183 ms
thirdweb/react (minimal + tree-shaking) 19.52 KB (0%) 391 ms (0%) 518 ms (+31.37% 🔺) 908 ms

Copy link
Contributor

graphite-app bot commented May 30, 2025

Merge activity

graphite-app bot pushed a commit that referenced this pull request May 30, 2025
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on removing the `Team` type from several components and functions related to email verification and onboarding, simplifying the data structure by only handling the `Account` type.

### Detailed summary
- Removed `teamStub` usage in `VerifyEmail.stories.tsx`.
- Updated `useUpdateNotifications` to remove `team` from the response data type.
- Modified `VerifyEmailProps` to exclude `team` in `onEmailConfirmed` and `verifyEmail`.
- Adjusted `AccountOnboardingProps` to remove `team` in `onComplete` and `verifyEmail`.
- Simplified `onEmailConfirmed` callback in `AccountOnboardingUI`.

> ✨ 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

- **Refactor**
  - Simplified onboarding and email verification flows by removing the requirement for team-related data. All relevant callbacks and functions now operate solely with account information.
- **Type Updates**
  - Updated type signatures for onboarding and verification handlers to exclude the team property, streamlining integration for end-users and developers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the ph/remove-team-from-confirmEmail-response branch from 7ac54a4 to 9d62cf5 Compare May 30, 2025 01:01
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 30, 2025 01:01 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 30, 2025 01:01 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 30, 2025 01:01 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 30, 2025 01:01 Inactive
graphite-app bot pushed a commit that referenced this pull request May 30, 2025
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on simplifying the data structure by removing the `team` object from various components and functions related to email verification and account onboarding, streamlining the code for better clarity and maintenance.

### Detailed summary
- Removed `team` from the `onEmailConfirmed` callback in `VerifyEmailProps`.
- Updated `verifyEmail` function to return only `account` instead of both `team` and `account`.
- Adjusted the `onComplete` prop in `AccountOnboardingProps` to accept only `account`.
- Eliminated `team` type import from relevant files.

> ✨ 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

- **Refactor**
  - Simplified onboarding and email verification flows by removing the requirement for team-related data. All relevant callbacks and functions now operate solely with account information.
- **Type Updates**
  - Updated type signatures for onboarding and verification handlers to exclude the team property, streamlining integration for end-users and developers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the ph/remove-team-from-confirmEmail-response branch from 9d62cf5 to 1f7d47e Compare May 30, 2025 01:02
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 30, 2025 01:02 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 30, 2025 01:02 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 30, 2025 01:02 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 30, 2025 01:02 Inactive
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on removing references to `Team` in various components related to email verification and onboarding, simplifying the data structure passed around.

### Detailed summary
- Removed `teamStub` import and related references in `VerifyEmail.stories.tsx`.
- Eliminated `Team` type imports in `useApi.ts`, `VerifyEmail.tsx`, and `account-onboarding-ui.tsx`.
- Updated `onEmailConfirmed` and `verifyEmail` props to only handle `account` in `VerifyEmail.tsx` and `account-onboarding-ui.tsx`.
- Adjusted the `onComplete` prop in `AccountOnboardingProps` to reflect the removal of `team`.

> ✨ 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

- **Refactor**
  - Simplified onboarding and email verification flows by removing the requirement for team-related data. All relevant callbacks and functions now operate solely with account information.
- **Type Updates**
  - Updated type signatures for onboarding and verification handlers to exclude the team property, streamlining integration for end-users and developers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the ph/remove-team-from-confirmEmail-response branch from 1f7d47e to ac4ade6 Compare May 30, 2025 01:03
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 30, 2025 01:03 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 30, 2025 01:03 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 30, 2025 01:03 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 30, 2025 01:03 Inactive
@graphite-app graphite-app bot merged commit ac4ade6 into main May 30, 2025
24 checks passed
@graphite-app graphite-app bot deleted the ph/remove-team-from-confirmEmail-response branch May 30, 2025 01:17
@vercel vercel bot temporarily deployed to Production – wallet-ui May 30, 2025 01:17 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground May 30, 2025 01:17 Inactive
@vercel vercel bot temporarily deployed to Production – login May 30, 2025 01:17 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 May 30, 2025 01:17 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