-
Notifications
You must be signed in to change notification settings - Fork 77
fix(survey): improve feedback survey initialisation and telemetry #2642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ties * log reason for decision * log additional decision parameters
fc102ee to
54c251e
Compare
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/utils/survey.ts:215
- The configuration object is defined directly on SurveyConfig, yet its properties are accessed via SurveyConfig.settings. Ensure a consistent object structure to avoid potential runtime errors.
if (SurveyConfig.settings.DEBUG_ALWAYS_PROMPT) {
Collaborator
tnaum-ms
reviewed
Apr 7, 2025
Collaborator
tnaum-ms
approved these changes
Apr 7, 2025
sevoku
added a commit
that referenced
this pull request
Apr 7, 2025
) * update A/B test selection probability to 50% * add more focused telemetry to initSurvey (survey.init event) * add telemetry to promptAfterActionEventually (cherry picked from commit 5860860)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request focuses on improving the survey initialization and telemetry:
initSurvey(survey.initevent)isCandidate: whether qualified or notreason: string describing the decision step to disqualify as a candidate02_prompt_version_only_once:skipVersion: opt-out version03_survey_taken_recentlysurveyTakenDate: date when the survey was takendaysSinceTaken: days since the survey was taken04_opted_out_recentlyoptOutDate: date when user opted out05_prompted_todaylastSessionDate: date of the last session06_insufficient_sessionssessionCount: current session count07_not_in_ab_test_groupacceptedForABTest: whether machine has been selectednormalizedValue: normalized score08_randomusedFallbackSelection: whether A/B scoring failed previouslypromptAfterActionEventuallywith a newsurvey.measure-scoreeventtriggerAction: the action that triggered the prompttriggerActionScore: the score increase contributed by the actionexperience: the experienceexperienceScore: the current experience scorefullScore: the current experience scoreisSurveyDisabledGloballywasPromptedInSessionscoreTargetReached: whether the score target was reachedisCandidate: whether qualified or notImprovements to A/B Test Selection:
src/utils/survey.ts: Updated theA_B_TEST_SELECTIONvalue from 0.25 to 0.5 for consistent testing.Enhancements to Telemetry Logging:
src/utils/survey.ts: Added detailed telemetry properties in thepromptAfterActionEventuallyfunction to log various survey-related metrics.Refactoring Candidate Status Logic:
src/utils/survey.ts: Introduced thesetCandidateStatushelper function to streamline setting the candidate status and logging telemetry properties. This function is used in multiple places to simplify the code and ensure consistency. [1] [2] [3] [4] [5] [6] [7]Consistent Testing:
src/utils/survey.initSurvey.test.ts: SetSurveyConfig.settings.A_B_TEST_SELECTIONto 0.5 within themockABTesthelper function to ensure consistent testing.