feat(web): add dismissible in-app GitHub star nudge after successful sends
SI
1d ago+226+226+012345678901234567890123456789-1-1-0123456789
Summary of Changes
Adds a subtle, non-intrusive, one-time in-app toast nudging users to star the repo on GitHub after they have experienced real value from useSend.
- Value-Realized Triggers: Fires ~1.5s after a high-intent, successful real-world action:
- Sending a test email after configuring a domain (
send-test-mail.tsx) - Scheduling a campaign (
schedule-campaign.tsx)
- Sending a test email after configuring a domain (
- Non-blocking Toast UI: Uses the existing Sonner toast helper (
@usesend/ui/src/toaster), avoiding disruptive modals or layout-shifting banners. - Permanent Dismissal: Clicking "Star on GitHub", clicking "Not now", or dismissing the toast permanently persists
usesend:star-nudge-dismissed="true"inlocalStorageso users are never nagged again. - Feedback Session Guard: Checks
sessionStorage(usesend:feedback-active) to guarantee the star prompt never collides with or appears in the same session as theFeedbackDialog. - Zero Backend / Telemetry: 100% client-side logic with strict SSR guards (
typeof window !== "undefined") and defensivetry/catchwrappers around Web Storage for incognito/private browsing compatibility. - Cross-Platform Test Fix: Normalized CRLF line endings in
editor-dependencies.unit.test.tsso lockfile checks pass consistently on both Windows and Linux.
🎥 Screen Recording / Demo
https://github.com/user-attachments/assets/8929bd01-b736-441e-86a2-b7adbbbb9691
How it was Tested
- Unit Tests:
- Added
apps/web/src/lib/star-nudge.unit.test.ts(7/7 tests passing):- Initial state check when storage is empty.
- Persistent dismissal in
localStorage. - Session suppression when
FeedbackDialogis active. - Toast action handlers (
Star on GitHubopens repo in new tab & dismisses;Not nowdismisses).
- All 383 unit tests across the web package pass.
- Added
- Type Safety:
pnpm --filter=web typecheckpassed with 0 errors.
- Manual Verification:
- Clicked Send test email on a verified domain -> standard success toast displayed, followed 1.5s later by the star nudge toast.
- Verified clicking Star on GitHub opens
https://github.com/usesend/usesendin a new tab and permanently sets the dismissal flag. - Verified clicking Not now immediately dismisses without navigation.
- Verified subsequent sends never re-trigger the toast.
- Opened the Feedback dialog -> verified the star nudge is suppressed for the rest of that session.
Ask Polylane for an impact assessment of this pull request:
Summary by cubic
Adds a one-time, dismissible in-app toast that nudges users to star the GitHub repo after a successful test email send or campaign schedule. The nudge is fully client-side, persists dismissal in localStorage, and is suppressed whenever the feedback dialog has been opened in the same session.
Behavior
- Appears ~1.5s after a successful test send or schedule through the existing Sonner toast; eligibility is rechecked right before it renders, so opening the feedback dialog during the delay also suppresses it.
- "Star on GitHub" opens the repo in a new tab and dismisses the nudge permanently; "Not now", manual dismissal, and auto-close dismiss it too.
- Normalizes CRLF line endings in
editor-dependencies.unit.test.tsso lockfile assertions pass consistently on Windows and Linux.
Summary by CodeRabbit
- New Features
- After successfully scheduling a campaign or sending a test email, a delayed prompt invites you to star the project.
- The prompt links to the project page and can be dismissed; dismissal is remembered so it won’t appear again.
- The prompt is suppressed if feedback is opened during the same session, including while the prompt is waiting to appear.