Conversation
Summary of ChangesHello @XiNiHa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the email verification flow by introducing a controlled delay for the "Resend verification email" button. This change aims to mitigate user confusion and prevent the accidental invalidation of the initial verification email by ensuring the button remains disabled for a short period after an email is sent, thereby improving the overall user experience during the verification process. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This PR introduces a delay for the resend verification email button. I've found a critical bug where the button can become permanently disabled on verification failure, and a potential issue from updating state on an unmounted component. I've included suggestions to fix both issues.
💻 Website PreviewThe latest changes are available as preview in: https://pr-7678.hive-landing-page.pages.dev |
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
| title: 'Verification email sent', | ||
| description: 'Please check your email inbox.', | ||
| }); | ||
| await new Promise(resolve => setTimeout(resolve, 3000)); |
There was a problem hiding this comment.
It's technically possible for the page to be unloaded during this timeout and the timeout will leak.
You can use the hook defined in packages/web/app/src/lib/hooks/use-timed.ts to have the timer cleaned up if the component is unmounted while it's running
jdolle
left a comment
There was a problem hiding this comment.
I'm okay with this UX as proposed. This delay might solve the problem, but perhaps we could provide a bit more context to users experiencing issues.
I was thinking about the UX the other day and had an idea that maybe this should be made a 2 step flow. E.g. on this page, have a text link (not a large button) asking, "Didn't receive a verification email?" and that could bring users to a page clarifying to check in spam/junk and also with a resend button.
Perhaps @jonathanawesome and @n1ru4l can weigh in on if we should adjust the design more or not.
Background
During the email verification flow, some users are getting confused and clicking the "Resend verification email" button right after the page loads, invalidating the first sent email.
Description
Added some delay before un-disabling the resend button
Checklist