feat(feedback): prompt for a store review after successful sessions
Add expo-store-review (SDK 54-matched via `expo install`) and wire a one-time in-app rating prompt into the SSE busy->idle "session completed" transition in stores/events.ts — the same signal that already drives the "Task completed" notification, so it only fires on genuine success, never on session.error. State (success count, one-time "asked" flag) persists in expo-secure-store, mirroring the consent pattern in telemetry.ts. The threshold check is split into store-review-policy.ts, free of expo imports, so it's unit-testable with plain `node --test` (same split as buildAuth in auth.ts). F-Droid/Play-Services-absent safety comes from the library itself: StoreReview.isAvailableAsync() resolves false there, so requestReview() is never called and there's no store-URL fallback configured in app.json.
This commit is contained in:
15
package-lock.json
generated
15
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@opencode-ai/mobile",
|
||||
"version": "0.4.3",
|
||||
"version": "0.4.7",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@opencode-ai/mobile",
|
||||
"version": "0.4.3",
|
||||
"version": "0.4.7",
|
||||
"dependencies": {
|
||||
"@expo/vector-icons": "^15.0.3",
|
||||
"@gorhom/bottom-sheet": "5.2.8",
|
||||
@@ -26,6 +26,7 @@
|
||||
"expo-secure-store": "~15.0.8",
|
||||
"expo-speech-recognition": "3.0.1",
|
||||
"expo-status-bar": "~3.0.9",
|
||||
"expo-store-review": "~9.0.9",
|
||||
"react": "19.1.0",
|
||||
"react-native": "0.81.5",
|
||||
"react-native-gesture-handler": "~2.28.0",
|
||||
@@ -5254,6 +5255,16 @@
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/expo-store-review": {
|
||||
"version": "9.0.9",
|
||||
"resolved": "https://registry.npmjs.org/expo-store-review/-/expo-store-review-9.0.9.tgz",
|
||||
"integrity": "sha512-99vS7edXlKzPcdjrzVlMQWc4zOyq4khQfFjhNqJgpGP+AgRn4U0LaZkHIrVjmzolryD3rcHJSiUQH9Vi0sD0MQ==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"expo": "*",
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/expo/node_modules/@expo/cli": {
|
||||
"version": "54.0.24",
|
||||
"resolved": "https://registry.npmjs.org/@expo/cli/-/cli-54.0.24.tgz",
|
||||
|
||||
Reference in New Issue
Block a user