fix(auto-edit): fix the false notification for auto-edit non eligibility #6899
+63
−12
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.
Context
This PR fixes an issue where users would receive a non-eligibility notification for auto-edits even when they were in the experiment flag and it is enabled for them. This happens because of the flaky network issue, and although we get error while evaluating the feature flag, we return
false
by default. This creates noisy alerts for the users.To address this, I added a check that ensures the user is likely viewing the settings editor (either the JSON settings file or the graphical Settings UI) before displaying the non-eligibility notification.
Test plan
cody-autoedit-experiment-enabled-flag
to false.settings.json
or the settings UI is open