Skip to content

feat: streak-triggered ask-for-review strip#6084

Open
tsahimatsliah wants to merge 8 commits into
mainfrom
feat/ask-for-review-prompt
Open

feat: streak-triggered ask-for-review strip#6084
tsahimatsliah wants to merge 8 commits into
mainfrom
feat/ask-for-review-prompt

Conversation

@tsahimatsliah
Copy link
Copy Markdown
Member

@tsahimatsliah tsahimatsliah commented May 20, 2026

Summary

Inline strip rendered at the top of the post modal that asks long-streak users for a store review. Two inline steps; happy users go to the right platform's review URL, unhappy users land in the existing Feedback modal.

  • Step 1: "Enjoying daily.dev so far?" [Yes] [No] [ x ]
  • Step 2 (Yes): "Awesome! Leave a quick {Chrome Web Store|App Store|...} review" with a [Leave a review] CTA opening the platform URL in a new tab.
  • No path: routes to LazyModal.Feedback with FeedbackCategory.UxIssue prefilled.

Behavior

  • Trigger gates: logged-in, streaks enabled, streak.current >= streakThreshold, GrowthBook variant enabled, destination available for the user's platform, no streak-milestone modal pending, not yet shown this session.
  • Re-ask loop: step-1 dismissal sets localStorage[askForReview:dismissedAt] and the strip stays hidden for cooldownDays. After the cooldown elapses, the next 3-day streak shows it again. Engagement past step 1 (Leave a review, No, step-2 dismiss) is permanent via ActionType.AskedForReviewComplete.
  • Once per session: sessionStorage[askForReview:shownThisSession] prevents re-mounting on subsequent posts.
  • Platform routing (getReviewDestination):
    • Extension: Chrome / Edge / Firefox Add-ons
    • Webapp iOS Safari -> App Store
    • Webapp Android -> Play Store
    • Webapp Chrome/Edge/Brave desktop -> Chrome Web Store / Edge Add-ons
    • Webapp Firefox/Safari desktop -> X share intent (fallback)

GrowthBook

featureAskForReview = { enabled: false, streakThreshold: 3, cooldownDays: 14 }

Recommend rolling out at low percentage first: the day the flag flips on, every existing user with streak.current >= 3 becomes eligible.

Out of scope

  • Touch-1 positive-reinforcement toast after first upvote/bookmark (follow-up)
  • iOS native StoreKit bridge (uses App Store URL even inside the native webview for v1)
  • Companion overlay on third-party pages (not mounted there since BasePostContent only renders in the post page / article modal)

Test plan

  • pnpm --filter shared lint clean
  • pnpm --filter shared test clean (incl. new AskForReviewStrip, useAskForReviewVisibility, askForReview specs)
  • node ./scripts/typecheck-strict-changed.js clean
  • Open Storybook -> Components/AskForReviewStrip/Demo panel and exercise each destination + dismiss
  • Manual QA matrix (with flag temporarily defaulted true):
    • Chrome desktop webapp -> Chrome Web Store
    • Edge desktop webapp -> Edge Add-ons
    • Firefox desktop webapp -> X share intent
    • iOS Safari -> App Store URL
    • Android Chrome -> Play Store URL
    • Chrome extension newtab -> Chrome Web Store
    • Confirm strip is NOT shown when streak < 3, when already permanently completed, or within cooldown window
    • Confirm the strip does not appear on a second post in the same session
    • Confirm step-1 dismiss + advance the clock 14+ days -> strip reappears on next post with streak >= 3

Notes for reviewers

  • I verified the API completeUserAction mutation accepts an arbitrary action type: String! (packages/shared/src/graphql/actions.ts). The two-action cooldown model in the original spec was replaced with localStorage because useActions().completeAction short-circuits on duplicate completion (line 96-98), so we cannot refresh completedAt for a cooldown loop without backend changes.
  • FeedbackModal gains a defaultCategory prop; the No path passes FeedbackCategory.UxIssue.

Made with Cursor

Preview domain

https://feat-ask-for-review-prompt.preview.app.daily.dev

Adds an inline strip at the top of the post modal that asks long-streak
users for a store review (Yes routes to the right Chrome/Edge/Firefox/App
Store/Play Store URL by platform, falls back to X share for Firefox/Safari
desktop). No routes them into the existing Feedback modal with a UX-issue
category. Step-1 dismissal triggers a 14-day cooldown loop; any
engagement past step 1 is permanent. Threshold and rollout are
GrowthBook-controlled via featureAskForReview.

Covered by unit specs for the destination helper, visibility hook
(including the cooldown loop), and the strip UI. Storybook DemoPanel
exposes every state for design review.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

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

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview May 20, 2026 11:03am
storybook Error Error May 20, 2026 11:03am

Request Review

Co-authored-by: Cursor <cursoragent@cursor.com>
Adds a floating QA panel mounted in MainLayout, gated on
?ask-for-review-qa=1, that bypasses all visibility gates and lets you
trigger the real strip + real handlers on any post page. Includes
state inspector, destination override, session/cooldown reset, and
manual Feedback modal/action-complete triggers.

Co-authored-by: Cursor <cursoragent@cursor.com>
…d modal

- Portal the strip to document.body with fixed top + z-max so it sits
  above the post modal, navigation, and X button
- Simplify to a single step (Yes / No / dismiss); fill stars in yellow
- Yes now opens a centered AskForReviewConfirmModal (star cover image,
  production-style review CTA) instead of a second inline step
- No still opens the prefilled Feedback modal
- Update tests + Storybook story labels to match the new flow

Co-authored-by: Cursor <cursoragent@cursor.com>
tsahimatsliah and others added 2 commits May 20, 2026 12:41
Use the shared cover-image success modal for the review ask and tighten the floating strip so it reads as part of the post modal instead of a full-width page banner.

Co-authored-by: Cursor <cursoragent@cursor.com>
…rompt

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	packages/shared/src/lib/featureManagement.ts
Replace the generic cover-image review modal with the compact dark review card that mirrors the production ask, including generated rating artwork and destination-specific platform icon.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant