Skip to content

[_]: fetch fresh email verification status and update referral reward amount#1894

Open
terrerox wants to merge 3 commits intomasterfrom
feature/cello-email-blocker
Open

[_]: fetch fresh email verification status and update referral reward amount#1894
terrerox wants to merge 3 commits intomasterfrom
feature/cello-email-blocker

Conversation

@terrerox
Copy link
Contributor

@terrerox terrerox commented Mar 25, 2026

Description

  • Fetch emailVerified from API in openPanel to avoid stale local state
  • Close Cello panel when email is not verified to prevent modal overlap
  • Remove cello-launcher attribute from AccountPopover to avoid SDK auto-open
  • Fix Cello notification dot causing layout shift via CSS absolute positioning
  • Update referral reward amount from €1,000 to €100 across all locales

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Additional Notes

…d amount

  - Fetch emailVerified from API in openPanel to avoid stale local state
  - Close Cello panel when email is not verified to prevent modal overlap
  - Remove cello-launcher attribute from AccountPopover to avoid SDK auto-open
  - Fix Cello notification dot causing layout shift via CSS absolute positioning
  - Update referral reward amount from €1,000 to €100 across all locales
@terrerox terrerox self-assigned this Mar 25, 2026
@terrerox terrerox changed the title [_]: fetch fresh email verification status and update referral rewa… [_]: fetch fresh email verification status and update referral reward amount Mar 25, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 25, 2026

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6a289d2
Status: ✅  Deploy successful!
Preview URL: https://417228e2.drive-web.pages.dev
Branch Preview URL: https://feature-cello-email-blocker.drive-web.pages.dev

View logs

@terrerox terrerox marked this pull request as draft March 25, 2026 04:55
@terrerox terrerox marked this pull request as ready for review March 25, 2026 13:33
Comment on lines +68 to +76
const fetchEmailVerifiedStatus = async (fallback: boolean): Promise<boolean> => {
try {
const usersClient = SdkFactory.getNewApiInstance().createUsersClient();
const { user } = await usersClient.refreshUser();
return user.emailVerified;
} catch {
return fallback;
}
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think taht it is not necessary to do the fetch if user.emailVerified is already true

Comment on lines +139 to +144
text: 'Verify your email to be elegible to referrals. Check your inbox or',
type: ToastType.Info,
duration: Infinity,
containerClassName: 'w-100 border-primary/30 bg-primary/5 dark:bg-primary/10',
action: {
text: 'resend verification',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rembember to add the text to translations file :)

},
});
if (globalThis.Cello) {
await globalThis.Cello('close');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a call to the Cello API? It might be a good idea to encapsulate it so that it doesn’t look so odd and is easier to maintain (in another task)

…ication check

- replace hardcoded referral verification toast text with i18n keys
- add email verification message/action translations to all supported locales
- skip API verification lookup when user is already marked as verified
- remove explicit infinite toast duration to use default notification behavior
@sonarqubecloud
Copy link

@terrerox terrerox requested a review from CandelR March 25, 2026 14:10
Comment on lines +1651 to +1653
"emailVerification": {
"message": "Verifica tu correo electrónico para ser elegible para referidos. Revisa tu bandeja de entrada o",
"resendVerification": "reenviar verificación"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something’s missing here "Revisa tu bandeja de entrada o" or what? :O
It might work in English, but in other languages it sounds a bit robotic, like in Spanish

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is aligned with the design provided by the product team

@terrerox terrerox requested a review from CandelR March 25, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants