Loading...
Loading...
Audit PostHog survey SDK features and version requirements
npx skill4agent add posthog/posthog survey-sdk-auditsurveyVersionRequirements.tsls$POSTHOG_JS_PATH$POSTHOG_IOS_PATH$POSTHOG_ANDROID_PATH$POSTHOG_FLUTTER_PATH.claude/settings.local.json{
"env": {
"POSTHOG_JS_PATH": "/path/to/posthog-js",
"POSTHOG_IOS_PATH": "/path/to/posthog-ios",
"POSTHOG_ANDROID_PATH": "/path/to/posthog-android",
"POSTHOG_FLUTTER_PATH": "/path/to/posthog-flutter"
},
"permissions": {
"allow": [
"Read(/path/to/posthog-js/**)",
"Read(/path/to/posthog-ios/**)",
"Read(/path/to/posthog-android/**)",
"Read(/path/to/posthog-flutter/**)",
"Grep(/path/to/posthog-js/**)",
"Grep(/path/to/posthog-ios/**)",
"Grep(/path/to/posthog-android/**)",
"Grep(/path/to/posthog-flutter/**)"
]
}
}ReadGrep$POSTHOG_JS_PATHecho $POSTHOG_JS_PATH- [ ] https://github.com/PostHog/repo/issues/123gh api repos/PostHog/posthog/issues/45658 --jq '.body' > /tmp/tracking_issue_body.md/tmp/tracking_issue_body.mdgh api repos/PostHog/posthog/issues/45658 -X PATCH -f body="$(cat /tmp/tracking_issue_body.md)"| SDK | Code Path | Changelog |
|---|---|---|
| posthog-js (browser) | | |
| posthog-react-native | | |
| posthog-ios | | |
| posthog-android | | |
| posthog-flutter | | |
$POSTHOG_FLUTTER_PATH/ios/posthog_flutter.podspecs.dependency 'PostHog'$POSTHOG_FLUTTER_PATH/android/build.gradleposthog-androidchecksurveyVersionRequirements.tss.conditions?.deviceTypess.appearance?.fontFamilys.conditions?.urlMatchType# Search changelog for the feature keyword
grep -n -i "KEYWORD" /path/to/CHANGELOG.md# Find commits that added the keyword (use -S for exact string match)
cd /path/to/sdk && git log --oneline --all -S "KEYWORD" -- "*.swift" "*.kt" "*.ts" "*.tsx"
# Then find the first version tag containing that commit
git tag --contains COMMIT_HASH | sort -V | head -3# Find when Flutter started requiring iOS version X.Y.Z
cd $POSTHOG_FLUTTER_PATH && git log --oneline -p -- "ios/posthog_flutter.podspec" | grep -B10 "X.Y.Z"
# Get the Flutter version for that commit
git tag --contains COMMIT_HASH | sort -V | head -1packages/react-native/src/surveys/PostHog/Surveys/SurveySheet.swiftQuestionTypes.swiftMultipleChoiceOptions.swiftPostHogDisplaySurveyPostHogDisplayChoiceQuestionissue: falselib/src/surveys/widgets/survey_bottom_sheet.dartchoice_question.dartissue: false$POSTHOG_JS_PATH/packages/browser/src/extensions/surveys/surveys-extension-utils.tsxcanActivateRepeatedlygetSurveySeenhasEvents$POSTHOG_JS_PATH/packages/browser/src/extensions/surveys.tsx$POSTHOG_JS_PATH/packages/react-native/src/surveys/getActiveMatchingSurveys.ts$POSTHOG_JS_PATH/packages/react-native/src/surveys/surveys-utils.tscanActivateRepeatedlyhasEvents$POSTHOG_IOS_PATH/PostHog/Surveys/PostHogSurveyIntegration.swiftgetActiveMatchingSurveys()canActivateRepeatedly$POSTHOG_ANDROID_PATH/posthog-android/src/main/java/com/posthog/android/surveys/PostHogSurveysIntegration.ktgetActiveMatchingSurveys()canActivateRepeatedly()canActivateRepeatedlyhasEventsgetSurveySeenlinkedFlagKeylinkedFlagVariantisFeatureEnabled(key)flags[key] === variantcanActivateRepeatedlyschedule === 'always'schedule$POSTHOG_JS_PATH/packages/browser/src/extensions/surveys/surveys-extension-utils.tsxgetDisplayOrderQuestions()getDisplayOrderChoices()$POSTHOG_JS_PATH/packages/react-native/src/surveys/surveys-utils.tsgetDisplayOrderQuestions()getDisplayOrderChoices()$POSTHOG_IOS_PATH/PostHog/Surveys/QuestionTypes.swiftSingleChoiceQuestionViewMultipleChoiceQuestionView$POSTHOG_IOS_PATH/PostHog/Surveys/SurveySheet.swift$POSTHOG_ANDROID_PATH/posthog/src/main/java/com/posthog/surveys/PostHogDisplaySurveyQuestion.ktPostHogDisplaySurveyAppearance.kt$POSTHOG_FLUTTER_PATH/lib/src/surveys/widgets/survey_bottom_sheet.dart$POSTHOG_FLUTTER_PATH/lib/src/surveys/widgets/choice_question.dartgetActiveMatchingSurveys()$POSTHOG_JS_PATH/packages/browser/src/extensions/surveys.ts$POSTHOG_JS_PATH/packages/react-native/src/surveys/getActiveMatchingSurveys.tsissue: falseissue: false{
feature: 'Feature Name',
sdkVersions: {
'posthog-js': 'X.Y.Z',
'posthog-react-native': 'X.Y.Z', // or omit if unsupported
'posthog-ios': 'X.Y.Z',
'posthog-android': 'X.Y.Z',
'posthog_flutter': 'X.Y.Z', // add comment: first version to require native SDK >= X.Y
},
unsupportedSdks: [
{ sdk: 'sdk-name', issue: 'https://github.com/PostHog/repo/issues/123' }, // needs implementation
{ sdk: 'sdk-name', issue: false }, // not applicable (e.g., web-only feature)
],
check: (s) => ...,
}# Search in the SDK-specific repo
gh issue list --repo PostHog/posthog-ios --search "FEATURE_KEYWORD" --state all --limit 20
gh issue list --repo PostHog/posthog-android --search "FEATURE_KEYWORD" --state all --limit 20
gh issue list --repo PostHog/posthog-flutter --search "FEATURE_KEYWORD" --state all --limit 20
# Also search with broader terms
gh issue list --repo PostHog/posthog-ios --search "survey feature flag" --state all --limit 20PostHog/posthog| Repository | Labels for Survey Features |
|---|---|
| PostHog/posthog-js | |
| PostHog/posthog-ios | |
| PostHog/posthog-android | |
| PostHog/posthog-flutter | |
# posthog-js (covers browser and react-native)
gh issue create --repo PostHog/posthog-js --label "feature/surveys" --title "..." --body "..."
# posthog-ios
gh issue create --repo PostHog/posthog-ios --label "Survey" --label "enhancement" --title "..." --body "..."
# posthog-android
gh issue create --repo PostHog/posthog-android --label "Survey" --label "enhancement" --title "..." --body "..."
# posthog-flutter
gh issue create --repo PostHog/posthog-flutter --label "Survey" --label "enhancement" --title "..." --body "..."## 🚨 IMPORTANT
This issue is likely user-facing in the main PostHog app, see [`surveyVersionRequirements.ts`](https://github.com/PostHog/posthog/blob/master/frontend/src/scenes/surveys/surveyVersionRequirements.ts). If you delete or close this issue, be sure to update the version requirements list here.
## Summary
The [SDK] SDK does not support [feature] for surveys.
## Current State
- [What exists, if anything - types, partial implementation, etc.]
## Expected Behavior
[What should happen when this feature is configured]
## Reference Implementation
See posthog-js browser: `packages/browser/src/extensions/surveys.ts`
For mobile-specific patterns, see posthog-react-native: `packages/react-native/src/surveys/getActiveMatchingSurveys.ts`
## Tracking
This is tracked in the survey SDK feature parity issue: https://github.com/PostHog/posthog/issues/45658
_This issue was generated by Claude using the `/survey-sdk-audit` skill._surveyVersionRequirements.tspnpm --filter=@posthog/frontend build:survey-sdk-docsdocs/published/docs/surveys/sdk-feature-support.mdxlinkedFlagKeylinkedFlagVariantcanActivateRepeatedlyissue: falseshuffleOptionsPostHogDisplayChoiceQuestionQuestionTypes.swiftI found some learnings during this audit that could improve the skill:
- [describe the improvement]
Would you like me to update the skill file?