feat(mobile): "Rate Superset" settings row and App Store rating prompt after positive moments

Merged
SA
3mo ago
+135-5

Summary

  • Settings → Support gets a Rate Superset row directly under Contact Support (last row of the group, same star + external-link treatment as the other outbound rows). Tapping opens the App Store write-review page for the live listing (apps.apple.com/app/id6788926383?action=write-review).
  • Apple's native rating sheet (expo-store-review) is requested only right after Superset did something for the user: immediately when a pull request is merged from the phone; on the third session an agent finished for them.
  • Never asked twice for the same build or within 90 days; Apple's own 3-per-year cap and the system-wide opt-out apply on top. app_review_prompt_requested fires in PostHog so we can see it working.

Why / Context

We want more 5-star reviews without an in-app banner. Well-regarded iOS apps do two things: a passive "Rate …" row next to Contact Support in Settings, and Apple's system prompt at a peak moment (Duolingo after a lesson, Halide after real usage). The system sheet is the only mechanism that actually moves the rating count and is also the least intrusive one available — it's Apple's small card, capped and user-disableable.

How It Works

  • packages/shared/src/constants.ts — COMPANY.APP_STORE_URL (id from eas.json ascAppId).
  • screens/(authenticated)/stores/appReviewStore — persisted tally of positive moments (deduped to one per hour so an agent stopping several times while the user watches counts once), plus last-prompted time and version.
  • screens/(authenticated)/hooks/useAppReviewPrompt — requestAppReview("pr_merged" | "session_completed"): applies the gates above, waits 1.5s for the screen to settle, checks isAvailableAsync, marks prompted, captures the PostHog event, calls requestReview().
  • Wired into WorkspaceScreen (the existing attention === "review" → seen transition) and PullRequestScreen onMerged.

Manual QA Checklist

  • Settings renders the new row under Contact Support (screenshots: https://claude.ai/code/artifact/f8b180a9-088f-4d61-b599-baa13772bbf8)
  • Fresh dev client with expo-store-review@56.0.3 boots against expo-modules-core@56.0.23 (no DYLD missing-symbol crash)
  • Rating sheet appears after merging a PR from the phone (dev build shows it every call; TestFlight never shows it; production is where Apple's cap applies)

Testing

  • bun run lint (root, clean)
  • bunx tsc --noEmit in apps/mobile — no errors in touched files; total error count unchanged vs. baseline (pre-existing host-service / workspace-fs type noise)

Design Decisions

  • Settings row opens the store URL instead of calling requestReview(): Apple says not to tie the sheet to a button, since it may not show. The URL is deterministic.
  • Community moved above Contact Support: so the rating row is adjacent to Contact Support and the last row of the group.

Notes

  • Native module added → dev clients need a rebuild after pulling this.

Summary by cubic

Adds a “Rate Superset” row in Settings and requests Apple’s rating sheet after positive moments to drive App Store reviews without in‑app banners. Previously there was no entry point or prompt; now the row opens the write‑review page and we request the native sheet at targeted moments with strict caps and an immediate reservation to avoid double prompts.

  • Adds expo-store-review@56.0.3. Dev clients must rebuild after pulling.
  • Settings → Support: moves Community above Contact Support; adds “Rate Superset” directly under Contact Support (last in the group). Tapping opens the write‑review page for the live App Store listing.
  • Requests the system rating sheet after merging a PR on device (immediate) and after the third distinct “agent finished” session. Moments dedupe within 1h.
  • Never prompts again for the same app version or within 90 days; still subject to Apple’s 3/year cap and OS opt‑out. Reserves the prompt before the 1.5s settle delay to prevent back‑to‑back moments from double‑requesting.
  • Wires into PullRequestScreen merge callback and WorkspaceScreen when attention === "review". Dev builds show the sheet on each call; TestFlight often suppresses it; production follows Apple’s caps.
  • Captures app_review_prompt_requested in PostHog.

Summary by CodeRabbit

  • New Features
    • Added prompts to rate the app after a pull request is merged or a session is successfully completed.
    • Added “Rate Superset” and “Community” options in Settings.
    • Review prompts are limited by availability, app version, and a 90-day cooldown to avoid interruptions.