feat(mobile): ask for a rating on returning Home after real use
Merged
SA
2mo ago+86+86+01234567890123456789-49-49-01234567890123456789
Summary
The App Store rating prompt used to fire on the third finished agent session the phone opened (any agent Stop, including a clarifying question), or on a PR merge from mobile. That second path never fired: all 60 app_review_prompt_requested events to date were session_completed. Now:
- Sending a message from a session's composer counts as a message, and each successful workspace create (local-host or cloud) counts as a workspace. A send from the Home composer creates a workspace, so it counts once.
- It asks on the next return to Home after either action, once the user has sent 5 messages or created 2 workspaces. Over the last 14 days, 97 of 599 mobile users would have qualified.
- The "acted since Home" flag lives only in memory, so a cold launch never prompts.
- Unchanged: at most once per version, a 90-day cooldown, and Apple's own limits. Stored last-prompted stamps carry over through a persist migration, and the counters start at zero.
- The event now sends
messages_sentandworkspaces_createdinstead ofmoment.
Test plan
-
bunx turbo typecheck --filter=@superset/mobile -
bun run lint -
apps/mobilebun test: 129 pass - Not run in the simulator: Apple's sheet only shows on dev builds
Summary by CodeRabbit
-
New Features
- App review prompts are now triggered on the Home screen after users send 5 messages or create 2 workspaces.
- Message sends and workspace creations now contribute to app review eligibility.
- Prompt frequency limits and app-version checks remain in place.
-
Changes
- App review prompts no longer appear directly after pull request merges or terminal activity.
- Existing review progress is reset while prompt history is retained.