Merge "Track generated suggestion edits only when suggestions remain"
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
index 48d7b1b..e9629b4 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
@@ -1753,8 +1753,12 @@
}
private trackGeneratedSuggestionEdit() {
+ const hasUserSuggestion = this.messageText.includes(
+ USER_SUGGESTION_START_PATTERN
+ );
const wasGeneratedSuggestionEdited =
this.addedGeneratedSuggestion &&
+ hasUserSuggestion &&
!this.messageText.includes(this.addedGeneratedSuggestion);
if (wasGeneratedSuggestionEdited) {
this.reporting.reportInteraction(Interaction.GENERATE_SUGGESTION_EDITED, {