[iOS] Conditionally hide Safety Check module in Magic Stack [chromium/src : main]

0 views
Skip to first unread message

Benjamin Williams (Gerrit)

unread,
Aug 12, 2024, 4:06:21 PM8/12/24
to Chris Lu, Ali Juma, Gauthier Ambard, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Ali Juma, Chris Lu and Gauthier Ambard

Benjamin Williams voted and added 1 comment

Votes added by Benjamin Williams

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Benjamin Williams . resolved

Hi folks,

  • thegreenfrog@ - Need overall review
  • gambard@/ajuma@ - Need OWNERS review (overall review also appreciated if your time permits)

Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Ali Juma
  • Chris Lu
  • Gauthier Ambard
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
Gerrit-Change-Number: 5784133
Gerrit-PatchSet: 9
Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
Gerrit-Reviewer: Chris Lu <thegre...@google.com>
Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Chris Lu <thegre...@google.com>
Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
Gerrit-Attention: Ali Juma <aj...@chromium.org>
Gerrit-Comment-Date: Mon, 12 Aug 2024 20:06:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Gauthier Ambard (Gerrit)

unread,
Aug 13, 2024, 8:05:47 AM8/13/24
to Benjamin Williams, Chris Lu, Ali Juma, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Ali Juma, Benjamin Williams and Chris Lu

Gauthier Ambard added 5 comments

File ios/chrome/browser/shared/public/features/features.h
Line 371, Patchset 10 (Latest):bool IsSafetyCheckModuleHiddenWithoutIssues();
Gauthier Ambard . unresolved

Nit: the method name is confusing. When reading it in the code I was expecting this to return whether the module is currently hidden or not, not a bool.
Did you consider replacing "Is" by "Should" (and adapting the rest) or something similar?

File ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_constants.h
Line 33, Patchset 10 (Latest):// LINT.ThenChange(/tools/metrics/histograms/metadata/ios/enums.xml:IOSSafetyCheckHiddenReason)
Gauthier Ambard . unresolved

If the linter error expected? Should the path starts with a `/`?

File ios/chrome/browser/ui/content_suggestions/magic_stack/magic_stack_ranking_model.mm
Line 438, Patchset 10 (Latest): UMA_HISTOGRAM_ENUMERATION(
Gauthier Ambard . unresolved

HEre and below, why using a macro and not a function?

Line 456, Patchset 10 (Latest): (previousIssuesCount == 0) && (previousIssuesCount == issuesCount);
Gauthier Ambard . unresolved

I am not sure to understand the logic. The module is hidden if there was 0 issues previously and there is currently 0 issues (and it is not the default value)?

So, if we used to have issues and now we don't, the module is shown?
And why checking the default value of the pref?

File ios/chrome/browser/ui/content_suggestions/safety_check/safety_check_magic_stack_mediator.mm
Line 385, Patchset 10 (Latest):- (void)logIssuesCount:(NSUInteger)issuesCount
Gauthier Ambard . unresolved

Nit, optional: "log" is associated with UMA in my mind. I would rather have something like `updateIssueCountPref: withCount:` or something like that.

Open in Gerrit

Related details

Attention is currently required from:
  • Ali Juma
  • Benjamin Williams
  • Chris Lu
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
    Gerrit-Change-Number: 5784133
    Gerrit-PatchSet: 10
    Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
    Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Chris Lu <thegre...@google.com>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Benjamin Williams <bwwil...@google.com>
    Gerrit-Attention: Chris Lu <thegre...@google.com>
    Gerrit-Attention: Ali Juma <aj...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Aug 2024 12:05:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Benjamin Williams (Gerrit)

    unread,
    Aug 13, 2024, 12:22:43 PM8/13/24
    to Chris Lu, Ali Juma, Gauthier Ambard, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Ali Juma, Chris Lu and Gauthier Ambard

    Benjamin Williams added 5 comments

    File ios/chrome/browser/shared/public/features/features.h
    Line 371, Patchset 10:bool IsSafetyCheckModuleHiddenWithoutIssues();
    Gauthier Ambard . resolved

    Nit: the method name is confusing. When reading it in the code I was expecting this to return whether the module is currently hidden or not, not a bool.
    Did you consider replacing "Is" by "Should" (and adapting the rest) or something similar?

    Benjamin Williams

    Great point. Done.

    File ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_constants.h
    Line 33, Patchset 10:// LINT.ThenChange(/tools/metrics/histograms/metadata/ios/enums.xml:IOSSafetyCheckHiddenReason)
    Gauthier Ambard . resolved

    If the linter error expected? Should the path starts with a `/`?

    Benjamin Williams

    Done

    File ios/chrome/browser/ui/content_suggestions/magic_stack/magic_stack_ranking_model.mm
    Line 438, Patchset 10: UMA_HISTOGRAM_ENUMERATION(
    Gauthier Ambard . resolved

    HEre and below, why using a macro and not a function?

    Benjamin Williams

    Thanks for catching that! I was initially following the file's existing use of macros for histograms. I've now updated everything to `base::UmaHistogramEnumeration()`.

    Line 456, Patchset 10: (previousIssuesCount == 0) && (previousIssuesCount == issuesCount);
    Gauthier Ambard . unresolved

    I am not sure to understand the logic. The module is hidden if there was 0 issues previously and there is currently 0 issues (and it is not the default value)?

    So, if we used to have issues and now we don't, the module is shown?
    And why checking the default value of the pref?

    Benjamin Williams

    Overall, yes, that's correct! This is new business logic from Product. The Safety Check module will now only be visible in the Magic Stack if there are issues to display. If both the previous and current state is 'All Safe' (i.e. zero issues), the module will be hidden.

    "So, if we used to have issues and now we don't, the module is shown?"

    >> Yes, that's right, because Product wants users to see the 'All Safe' state maximally once.

    "And why checking the default value of the pref?"

    >> Because the Pref being zero typically means the 'All Safe' state. However, not when it's the default value, that just means it hasn't been set before.

    If my answers are satisfactory, please feel free to mark this thread as complete. Thanks Gauthier for raising this!

    Also, I've updated the CL description, and added some new comments, to make this business logic more clear.

    File ios/chrome/browser/ui/content_suggestions/safety_check/safety_check_magic_stack_mediator.mm
    Line 385, Patchset 10:- (void)logIssuesCount:(NSUInteger)issuesCount
    Gauthier Ambard . resolved

    Nit, optional: "log" is associated with UMA in my mind. I would rather have something like `updateIssueCountPref: withCount:` or something like that.

    Benjamin Williams

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ali Juma
    • Chris Lu
    • Gauthier Ambard
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
    Gerrit-Change-Number: 5784133
    Gerrit-PatchSet: 11
    Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
    Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Chris Lu <thegre...@google.com>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Attention: Chris Lu <thegre...@google.com>
    Gerrit-Attention: Ali Juma <aj...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Aug 2024 16:22:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Gauthier Ambard <gam...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ali Juma (Gerrit)

    unread,
    Aug 13, 2024, 1:04:43 PM8/13/24
    to Benjamin Williams, Ali Juma, Chris Lu, Gauthier Ambard, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Benjamin Williams, Chris Lu and Gauthier Ambard

    Ali Juma voted and added 1 comment

    Votes added by Ali Juma

    Code-Review+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 11 (Latest):
    Ali Juma . resolved

    histograms lgtm

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benjamin Williams
    • Chris Lu
    • Gauthier Ambard
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
    Gerrit-Change-Number: 5784133
    Gerrit-PatchSet: 11
    Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
    Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Chris Lu <thegre...@google.com>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Benjamin Williams <bwwil...@google.com>
    Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Attention: Chris Lu <thegre...@google.com>
    Gerrit-Comment-Date: Tue, 13 Aug 2024 17:04:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Benjamin Williams (Gerrit)

    unread,
    Aug 13, 2024, 1:23:14 PM8/13/24
    to Ali Juma, Chris Lu, Gauthier Ambard, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Chris Lu and Gauthier Ambard

    Benjamin Williams added 1 comment

    File ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_constants.h
    Line 33, Patchset 10:// LINT.ThenChange(/tools/metrics/histograms/metadata/ios/enums.xml:IOSSafetyCheckHiddenReason)
    Gauthier Ambard . resolved

    If the linter error expected? Should the path starts with a `/`?

    Benjamin Williams

    Done

    Benjamin Williams

    I'll see if `//` fixes the issue, but not sure yet.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Chris Lu
    • Gauthier Ambard
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
    Gerrit-Change-Number: 5784133
    Gerrit-PatchSet: 11
    Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
    Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Chris Lu <thegre...@google.com>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Attention: Chris Lu <thegre...@google.com>
    Gerrit-Comment-Date: Tue, 13 Aug 2024 17:22:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Benjamin Williams <bwwil...@google.com>
    Comment-In-Reply-To: Gauthier Ambard <gam...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Gauthier Ambard (Gerrit)

    unread,
    Aug 14, 2024, 4:41:00 AM8/14/24
    to Benjamin Williams, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Ali Juma, Benjamin Williams and Chris Lu

    Gauthier Ambard voted and added 3 comments

    Votes added by Gauthier Ambard

    Code-Review+1

    3 comments

    Patchset-level comments
    File-level comment, Patchset 12 (Latest):
    Gauthier Ambard . resolved

    Thanks!

    File ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_constants.h
    Line 33, Patchset 12 (Latest):// LINT.ThenChange(//tools/metrics/histograms/metadata/ios/enums.xml:IOSSafetyCheckHiddenReason)
    Gauthier Ambard . unresolved

    Sorry I wasn't clear, my suggestion was to remove the leading "/". (Feel free to land if it doesn't work)

    File ios/chrome/browser/ui/content_suggestions/magic_stack/magic_stack_ranking_model.mm
    Line 456, Patchset 10: (previousIssuesCount == 0) && (previousIssuesCount == issuesCount);
    Gauthier Ambard . resolved

    I am not sure to understand the logic. The module is hidden if there was 0 issues previously and there is currently 0 issues (and it is not the default value)?

    So, if we used to have issues and now we don't, the module is shown?
    And why checking the default value of the pref?

    Benjamin Williams

    Overall, yes, that's correct! This is new business logic from Product. The Safety Check module will now only be visible in the Magic Stack if there are issues to display. If both the previous and current state is 'All Safe' (i.e. zero issues), the module will be hidden.

    "So, if we used to have issues and now we don't, the module is shown?"
    >> Yes, that's right, because Product wants users to see the 'All Safe' state maximally once.

    "And why checking the default value of the pref?"
    >> Because the Pref being zero typically means the 'All Safe' state. However, not when it's the default value, that just means it hasn't been set before.

    If my answers are satisfactory, please feel free to mark this thread as complete. Thanks Gauthier for raising this!

    Also, I've updated the CL description, and added some new comments, to make this business logic more clear.

    Gauthier Ambard

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ali Juma
    • Benjamin Williams
    • Chris Lu
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
    Gerrit-Change-Number: 5784133
    Gerrit-PatchSet: 12
    Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
    Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Chris Lu <thegre...@google.com>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Benjamin Williams <bwwil...@google.com>
    Gerrit-Attention: Chris Lu <thegre...@google.com>
    Gerrit-Attention: Ali Juma <aj...@chromium.org>
    Gerrit-Comment-Date: Wed, 14 Aug 2024 08:40:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Benjamin Williams (Gerrit)

    unread,
    Aug 14, 2024, 9:06:59 AM8/14/24
    to Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Ali Juma and Chris Lu

    Benjamin Williams voted and added 1 comment

    Votes added by Benjamin Williams

    Commit-Queue+2

    1 comment

    File ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_constants.h
    Line 33, Patchset 12:// LINT.ThenChange(//tools/metrics/histograms/metadata/ios/enums.xml:IOSSafetyCheckHiddenReason)
    Gauthier Ambard . resolved

    Sorry I wasn't clear, my suggestion was to remove the leading "/". (Feel free to land if it doesn't work)

    Benjamin Williams

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ali Juma
    • Chris Lu
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
    Gerrit-Change-Number: 5784133
    Gerrit-PatchSet: 13
    Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
    Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
    Gerrit-Reviewer: Chris Lu <thegre...@google.com>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Chris Lu <thegre...@google.com>
    Gerrit-Attention: Ali Juma <aj...@chromium.org>
    Gerrit-Comment-Date: Wed, 14 Aug 2024 13:06:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Gauthier Ambard <gam...@chromium.org>
    satisfied_requirement
    open
    diffy

    Chris Lu (Gerrit)

    unread,
    Aug 14, 2024, 11:18:18 AM8/14/24
    to Benjamin Williams, Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Ali Juma, Benjamin Williams and Chris Lu

    Chris Lu added 2 comments

    Patchset-level comments
    File-level comment, Patchset 11:
    Chris Lu . resolved

    I think we need to now update the EGTest to ensure the safety check card is added to the MagicStack

    File ios/chrome/browser/ui/content_suggestions/magic_stack/magic_stack_ranking_model.mm
    Line 432, Patchset 11 (Parent): if (!IsSafetyCheckMagicStackEnabled() ||
    Chris Lu . unresolved

    as an aside, can we do feature flag cleanup?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ali Juma
    • Benjamin Williams
    • Chris Lu
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
      Gerrit-Change-Number: 5784133
      Gerrit-PatchSet: 13
      Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
      Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Chris Lu <thegre...@google.com>
      Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
      Gerrit-CC: Chris Lu <thegre...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Benjamin Williams <bwwil...@google.com>
      Gerrit-Attention: Chris Lu <thegre...@google.com>
      Gerrit-Attention: Ali Juma <aj...@chromium.org>
      Gerrit-Comment-Date: Wed, 14 Aug 2024 15:18:08 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Benjamin Williams (Gerrit)

      unread,
      Aug 19, 2024, 9:31:36 AM8/19/24
      to Code Review Nudger, Chris Lu, Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Ali Juma, Chris Lu and Chris Lu

      Benjamin Williams voted and added 1 comment

      Votes added by Benjamin Williams

      Commit-Queue+2

      1 comment

      File ios/chrome/browser/ui/content_suggestions/magic_stack/magic_stack_ranking_model.mm
      Line 432, Patchset 11 (Parent): if (!IsSafetyCheckMagicStackEnabled() ||
      Chris Lu . resolved

      as an aside, can we do feature flag cleanup?

      Benjamin Williams

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ali Juma
      • Chris Lu
      • Chris Lu
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
      Gerrit-Change-Number: 5784133
      Gerrit-PatchSet: 14
      Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
      Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Chris Lu <thegre...@google.com>
      Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
      Gerrit-CC: Chris Lu <thegre...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Chris Lu <thegre...@google.com>
      Gerrit-Attention: Chris Lu <thegre...@chromium.org>
      Gerrit-Attention: Ali Juma <aj...@chromium.org>
      Gerrit-Comment-Date: Mon, 19 Aug 2024 13:31:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Chris Lu <thegre...@chromium.org>
      satisfied_requirement
      open
      diffy

      Benjamin Williams (Gerrit)

      unread,
      Aug 19, 2024, 9:36:31 AM8/19/24
      to Code Review Nudger, Chris Lu, Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Ali Juma, Chris Lu and Chris Lu

      Benjamin Williams added 1 comment

      File ios/chrome/browser/ui/content_suggestions/magic_stack/magic_stack_ranking_model.mm
      Line 432, Patchset 11 (Parent): if (!IsSafetyCheckMagicStackEnabled() ||
      Chris Lu . resolved

      as an aside, can we do feature flag cleanup?

      Benjamin Williams

      Done

      Benjamin Williams

      This will be handled in a separate CL.

      Gerrit-Comment-Date: Mon, 19 Aug 2024 13:36:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Benjamin Williams <bwwil...@google.com>
      Comment-In-Reply-To: Chris Lu <thegre...@chromium.org>
      satisfied_requirement
      open
      diffy

      Benjamin Williams (Gerrit)

      unread,
      Aug 19, 2024, 1:49:53 PM8/19/24
      to Code Review Nudger, Chris Lu, Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Ali Juma, Chris Lu and Chris Lu

      Benjamin Williams voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ali Juma
      • Chris Lu
      • Chris Lu
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
      Gerrit-Change-Number: 5784133
      Gerrit-PatchSet: 15
      Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
      Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Chris Lu <thegre...@google.com>
      Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
      Gerrit-CC: Chris Lu <thegre...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Chris Lu <thegre...@google.com>
      Gerrit-Attention: Chris Lu <thegre...@chromium.org>
      Gerrit-Attention: Ali Juma <aj...@chromium.org>
      Gerrit-Comment-Date: Mon, 19 Aug 2024 17:49:43 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Benjamin Williams (Gerrit)

      unread,
      Aug 19, 2024, 6:19:16 PM8/19/24
      to Code Review Nudger, Chris Lu, Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Ali Juma, Chris Lu and Chris Lu

      Benjamin Williams added 1 comment

      Patchset-level comments
      File-level comment, Patchset 15:
      Benjamin Williams . resolved

      Hi team, please ignore this latest patchset. SafetyCheckView EG Test is failing on ios-simulator-full-configs. I'm investigating why the module isn't showing up (which causes the test to fail). Added some temporary logs to help with this. Will update once resolved.

      Gerrit-Comment-Date: Mon, 19 Aug 2024 22:19:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      Benjamin Williams (Gerrit)

      unread,
      Aug 19, 2024, 8:51:21 PM8/19/24
      to Code Review Nudger, Chris Lu, Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Ali Juma, Chris Lu and Chris Lu

      Benjamin Williams added 1 comment

      Patchset-level comments
      File-level comment, Patchset 17 (Latest):
      Benjamin Williams . resolved

      Hi everyone, thanks for your patience while I resolved the module visibility issue. The problem was that the new code was checking if the `kHomeCustomizationMagicStackSafetyCheckIssuesCount` Pref was set to its default value, initially aimed at distinguishing between intentional and default zero values. However, this check proved fragile and unnecessary. The fix is to hide the module only if both previous and current issue counts are zero; any change will unhide it. I've removed the default value check, and all tests should pass, with submission working as expected. Thanks again for your patience!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ali Juma
      • Chris Lu
      • Chris Lu
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
      Gerrit-Change-Number: 5784133
      Gerrit-PatchSet: 17
      Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
      Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Chris Lu <thegre...@google.com>
      Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
      Gerrit-CC: Chris Lu <thegre...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Chris Lu <thegre...@google.com>
      Gerrit-Attention: Chris Lu <thegre...@chromium.org>
      Gerrit-Attention: Ali Juma <aj...@chromium.org>
      Gerrit-Comment-Date: Tue, 20 Aug 2024 00:51:12 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      Benjamin Williams (Gerrit)

      unread,
      Aug 19, 2024, 10:43:41 PM8/19/24
      to Code Review Nudger, Chris Lu, Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Ali Juma, Chris Lu and Chris Lu

      Benjamin Williams voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ali Juma
      • Chris Lu
      • Chris Lu
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
      Gerrit-Change-Number: 5784133
      Gerrit-PatchSet: 18
      Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
      Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Chris Lu <thegre...@google.com>
      Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
      Gerrit-CC: Chris Lu <thegre...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Chris Lu <thegre...@google.com>
      Gerrit-Attention: Chris Lu <thegre...@chromium.org>
      Gerrit-Attention: Ali Juma <aj...@chromium.org>
      Gerrit-Comment-Date: Tue, 20 Aug 2024 02:43:31 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Benjamin Williams (Gerrit)

      unread,
      Aug 20, 2024, 9:59:43 AM8/20/24
      to Code Review Nudger, Chris Lu, Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Ali Juma, Chris Lu and Chris Lu

      Benjamin Williams voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ali Juma
      • Chris Lu
      • Chris Lu
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
      Gerrit-Change-Number: 5784133
      Gerrit-PatchSet: 19
      Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
      Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Chris Lu <thegre...@google.com>
      Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
      Gerrit-CC: Chris Lu <thegre...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Chris Lu <thegre...@google.com>
      Gerrit-Attention: Chris Lu <thegre...@chromium.org>
      Gerrit-Attention: Ali Juma <aj...@chromium.org>
      Gerrit-Comment-Date: Tue, 20 Aug 2024 13:59:11 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Benjamin Williams (Gerrit)

      unread,
      Aug 20, 2024, 10:59:26 AM8/20/24
      to Code Review Nudger, Chris Lu, Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Ali Juma, Chris Lu and Chris Lu

      Benjamin Williams removed a vote from this change

      Removed Commit-Queue+2 by Benjamin Williams <bwwil...@google.com>
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ali Juma
      • Chris Lu
      • Chris Lu
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: deleteVote
      satisfied_requirement
      open
      diffy

      Benjamin Williams (Gerrit)

      unread,
      Aug 20, 2024, 11:15:56 AM8/20/24
      to Code Review Nudger, Chris Lu, Gauthier Ambard, Ali Juma, Chris Lu, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Ali Juma, Chris Lu and Chris Lu

      Benjamin Williams voted and added 1 comment

      Votes added by Benjamin Williams

      Commit-Queue+2

      1 comment

      Patchset-level comments
      File-level comment, Patchset 20 (Latest):
      Benjamin Williams . resolved

      Fingers crossed this fixes the module visibility issue for SafetyCheckView EG test.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ali Juma
      • Chris Lu
      • Chris Lu
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
      Gerrit-Change-Number: 5784133
      Gerrit-PatchSet: 20
      Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
      Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Chris Lu <thegre...@google.com>
      Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
      Gerrit-CC: Chris Lu <thegre...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Chris Lu <thegre...@google.com>
      Gerrit-Attention: Chris Lu <thegre...@chromium.org>
      Gerrit-Attention: Ali Juma <aj...@chromium.org>
      Gerrit-Comment-Date: Tue, 20 Aug 2024 15:15:46 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Aug 20, 2024, 12:36:59 PM8/20/24
      to Benjamin Williams, Code Review Nudger, Chris Lu, Gauthier Ambard, Ali Juma, Chris Lu, Chromium Metrics Reviews, AyeAye, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org

      Chromium LUCI CQ submitted the change with unreviewed changes

      Unreviewed changes

      12 is the latest approved patch-set.
      The change was submitted with unreviewed changes in the following files:

      ```
      The name of the file: ios/chrome/browser/ui/content_suggestions/magic_stack/magic_stack_ranking_model.mm
      Insertions: 3, Deletions: 7.

      The diff is too large to show. Please review the diff.
      ```
      ```
      The name of the file: ios/chrome/browser/ui/content_suggestions/safety_check/safety_check_view_egtest.mm
      Insertions: 12, Deletions: 8.

      The diff is too large to show. Please review the diff.
      ```
      ```
      The name of the file: ios/chrome/browser/ui/content_suggestions/content_suggestions_metrics_constants.h
      Insertions: 2, Deletions: 2.

      The diff is too large to show. Please review the diff.
      ```

      Change information

      Commit message:
      [iOS] Conditionally hide Safety Check module in Magic Stack

      This change optimizes the visibility of the Safety Check module within
      the Magic Stack by dynamically displaying it only when new issues arise.
      This approach prevents unnecessary visual clutter and ensures users are
      promptly informed about potential safety concerns without bloating the
      Magic Stack. The module will be hidden if the user currently has no
      Safety Check issues and the previous Safety Check state also displayed
      no issues. As soon as new issues are detected, the module will be
      unhidden and re-included in the Magic Stack.

      This CL introduces a new local-state Pref to store the previous issues
      count, adds logging to a new histogram to better understand why the
      Safety Check module may not be displayed in the Magic Stack, and places
      all of this functionality behind a Finch killswitch for enhanced safety
      and control.
      Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
      Fixed: 359279090
      Reviewed-by: Gauthier Ambard <gam...@chromium.org>
      Commit-Queue: Benjamin Williams <bwwil...@google.com>
      Cr-Commit-Position: refs/heads/main@{#1344209}
      Files:
      Change size: M
      Delta: 13 files changed, 147 insertions(+), 16 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Gauthier Ambard
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic5c9288d27dd035c995711af7a31537b0e9b90f0
      Gerrit-Change-Number: 5784133
      Gerrit-PatchSet: 21
      Gerrit-Owner: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Ali Juma <aj...@chromium.org>
      Gerrit-Reviewer: Benjamin Williams <bwwil...@google.com>
      Gerrit-Reviewer: Chris Lu <thegre...@google.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
      Gerrit-CC: Chris Lu <thegre...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages