[iOS] Add Gemini FRE UI components [chromium/src : main]

0 views
Skip to first unread message

Joemer Ramos (Gerrit)

unread,
Dec 12, 2025, 2:52:29 PMDec 12
to Tarek Makkouk, Adam Arcaro, Joemer Ramos, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Adam Arcaro and Tarek Makkouk

Joemer Ramos added 23 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Joemer Ramos . resolved

Apologies for the large amount of comments and that you have to resolve each one by one, but just wanted to make sure that instances found of BWG were marked and addressed

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator.h
Line 25, Patchset 3 (Latest):// Dismisses the BWG flow with a completion block before stopping the
Joemer Ramos . unresolved

nit: Gemini

Line 13, Patchset 3 (Latest):// Coordinator that manages the first run and any BWG triggers.
Joemer Ramos . unresolved

nit: Gemini

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator.mm
Line 47, Patchset 3 (Latest): // Mediator for handling all logic related to BWG.
Joemer Ramos . unresolved

nit: Gemini First Run Promo

Line 51, Patchset 3 (Latest): BWGFREWrapperViewController* _FREWrapperViewController;
Joemer Ramos . unresolved

Since this coordinator is now specific to FRE, you can just rename this to `_viewController` as the FREWrapper is implied.

Line 53, Patchset 3 (Latest): // Handler for sending BWG commands.
Joemer Ramos . unresolved

nit:Gemini

Line 54, Patchset 3 (Latest): id<BWGCommands> _BWGCommandsHandler;
Joemer Ramos . unresolved

nit: Rename to `_geminiCommandsHandler`.

Line 88, Patchset 3 (Latest): [self dismissBWGFromOtherWindowsWithCompletion:^() {
Joemer Ramos . unresolved

This is fine for now, but can't we also move this functionality to `GeminiBrowserAgent`?

Line 120, Patchset 3 (Latest):- (void)dismissBWGConsentUIWithCompletion:(void (^)())completion {
Joemer Ramos . unresolved

nit: replace BWG with Gemini

Line 139, Patchset 3 (Latest):// Starts the BWG coordinator.
Joemer Ramos . unresolved

nit: GeminiFirstRunCoordinator

Line 215, Patchset 3 (Latest):// Returns the currently active WebState's BWG tab helper.
Joemer Ramos . unresolved

nit: Gemini

Line 216, Patchset 3 (Latest):- (BwgTabHelper*)activeWebStateBWGTabHelper {
Joemer Ramos . unresolved

nit:Gemini

Line 236, Patchset 3 (Latest):- (void)dismissBWGFromOtherWindowsWithCompletion:(ProceduralBlock)completion {
Joemer Ramos . unresolved

nit: Gemini

Line 264, Patchset 3 (Latest): // Dismiss BWG in all the other browsers for all profiles.
Joemer Ramos . unresolved

nit: Gemini

Line 266, Patchset 3 (Latest): id<BWGCommands> BWGCommandsHandler =
Joemer Ramos . unresolved

nit: Gemini

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator.mm
Line 56, Patchset 3 (Latest): raw_ptr<BwgService> _BWGService;
Joemer Ramos . unresolved

nit:`_geminiService`

Line 59, Patchset 3 (Latest): raw_ptr<BwgBrowserAgent> _BwgBrowserAgent;
Joemer Ramos . unresolved

nit: _geminiBrowserAgent

Line 80, Patchset 3 (Latest): BWGService:(BwgService*)BWGService
Joemer Ramos . unresolved

nit: Gemini

Line 174, Patchset 3 (Latest):#pragma mark - BWGConsentMutator
Joemer Ramos . unresolved

all these BWG instances you can leave, as BWGConsentMutator being refactored to GeminiFREConsentMutator should be a separate CL. Feel free to resolve after you see this

Line 214, Patchset 3 (Latest):// Notifies the currently active WebState's BWG tab helper that the FRE will be
Joemer Ramos . unresolved

nit: Gemini

Line 216, Patchset 3 (Latest):- (void)FREWillBeBackgrounded {
Joemer Ramos . unresolved

can we rename to `prepareFREBackground`?

Line 236, Patchset 3 (Latest):// Fetches zero-state suggestions from the BWG tab helper and pass them to the
Joemer Ramos . unresolved

nit: Gemini but im guessing this method will be moved soon to `GeminiBrowserAgent`?

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator_delegate.h
Line 17, Patchset 3 (Latest):- (void)dismissBWGFlow;
Joemer Ramos . unresolved

nit: Gemini

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Arcaro
  • Tarek Makkouk
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
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: I40c20e3973706a525b9a8760cc628483cb242e35
Gerrit-Change-Number: 7251673
Gerrit-PatchSet: 3
Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
Gerrit-Attention: Tarek Makkouk <tarekm...@google.com>
Gerrit-Attention: Adam Arcaro <ada...@google.com>
Gerrit-Comment-Date: Fri, 12 Dec 2025 19:52:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Adam Arcaro (Gerrit)

unread,
Dec 12, 2025, 2:55:55 PMDec 12
to Tarek Makkouk, Joemer Ramos, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Tarek Makkouk

Adam Arcaro added 16 comments

Patchset-level comments
File-level comment, Patchset 1:
Adam Arcaro . resolved

Thanks Tarek! Please see some comments

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator.h
Line 16, Patchset 1:- (instancetype)initWithBaseViewController:(UIViewController*)viewController
Adam Arcaro . unresolved

nit: Please add a comment to cover the extra params, such as `entryPoint` and `completion`

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator.mm
Line 88, Patchset 1: [self dismissBWGFromOtherWindowsWithCompletion:^() {
Adam Arcaro . unresolved

Not for this CL, but now that we're moving the floaty presentation to the browser agent, let's make sure to dismiss the floaty on other windows in there too. This line will only affect FREs now

You can add a TODO for tracking

Line 105, Patchset 1: ios::provider::ResetGemini();
Adam Arcaro . unresolved

We can move this to the browser agent since the FRE doesn't show Gemini anymore

Line 139, Patchset 1:// Starts the BWG coordinator.
Adam Arcaro . unresolved

`Starts the Gemini FRE coordinator.`

Line 171, Patchset 1: [self prepareAIHubIPH];
Adam Arcaro . unresolved

Remove the duplicate

Line 173, Patchset 1: [_mediator updateFRECompletionHandler:_completion];
Adam Arcaro . unresolved

Similar to the coordinator, if we expect the mediator to always need a completion handler, then let's put it in its constructor

Line 177, Patchset 1: initWithPromo:showPromo
Adam Arcaro . unresolved

nit: Just use `_mediator.shouldShowPromo` inline here

Line 182, Patchset 1: BwgTabHelper* BWGTabHelper = [self activeWebStateBWGTabHelper];
Adam Arcaro . unresolved

Please add a TODO to remove all this animation background logic, we won't need it for the FRE (and maybe not even for the floaty with copresence)

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator.mm
Line 88, Patchset 1: _baseViewController = baseViewController;
Adam Arcaro . unresolved

This isn't being used, let's remove it

Line 89, Patchset 1: _BWGService = BWGService;
Adam Arcaro . unresolved

ditto

Line 90, Patchset 1: _BwgBrowserAgent = BwgBrowserAgent;
Adam Arcaro . unresolved

ditto

Line 117, Patchset 1: }
Adam Arcaro . unresolved

Most stuff in this function shouldn't fire off when the completion handler property is set. Things like notifying events, logging metrics etc are probably results of UI events (like the FRE being shown, next page being pressed etc). It would be best to have the VC notify the mediator of these events through a `mutator`, and then the mediator can call these events

Line 138, Patchset 1:- (BOOL)shouldShowConsent {
Adam Arcaro . unresolved

With this refactor, starting the FRE coordinator should always present some UI, so at the very least the consent page will always be shown. We can remove this function and condition entirely

Line 166, Patchset 1:- (BOOL)shouldShowAIHubIPH {
Adam Arcaro . unresolved

This is repeated here and in the coordinator

Maybe @joeme...@google.com has thoughts on where this should live?

Line 238, Patchset 1:- (void)executeZeroStateSuggestions {
Adam Arcaro . unresolved

This will be called by the BrowserAgent when the overlay is shown, so we can remove it here

Open in Gerrit

Related details

Attention is currently required from:
  • Tarek Makkouk
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
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: I40c20e3973706a525b9a8760cc628483cb242e35
Gerrit-Change-Number: 7251673
Gerrit-PatchSet: 1
Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
Gerrit-Attention: Tarek Makkouk <tarekm...@google.com>
Gerrit-Comment-Date: Fri, 12 Dec 2025 19:55:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Tarek Makkouk (Gerrit)

unread,
Dec 12, 2025, 5:08:36 PMDec 12
to Adam Arcaro, Joemer Ramos, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Adam Arcaro and Joemer Ramos

Tarek Makkouk added 37 comments

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator.h
Line 25, Patchset 3:// Dismisses the BWG flow with a completion block before stopping the
Joemer Ramos . resolved

nit: Gemini

Tarek Makkouk

Done

Line 13, Patchset 3:// Coordinator that manages the first run and any BWG triggers.
Joemer Ramos . resolved

nit: Gemini

Tarek Makkouk

Done

Line 16, Patchset 1:- (instancetype)initWithBaseViewController:(UIViewController*)viewController
Adam Arcaro . resolved

nit: Please add a comment to cover the extra params, such as `entryPoint` and `completion`

Tarek Makkouk

Done

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator.mm
Line 47, Patchset 3: // Mediator for handling all logic related to BWG.
Joemer Ramos . resolved

nit: Gemini First Run Promo

Tarek Makkouk

Done

Line 51, Patchset 3: BWGFREWrapperViewController* _FREWrapperViewController;
Joemer Ramos . resolved

Since this coordinator is now specific to FRE, you can just rename this to `_viewController` as the FREWrapper is implied.

Tarek Makkouk

Done

Line 53, Patchset 3: // Handler for sending BWG commands.
Joemer Ramos . resolved

nit:Gemini

Tarek Makkouk

Done

Line 54, Patchset 3: id<BWGCommands> _BWGCommandsHandler;
Joemer Ramos . resolved

nit: Rename to `_geminiCommandsHandler`.

Tarek Makkouk

Done

Line 88, Patchset 1: [self dismissBWGFromOtherWindowsWithCompletion:^() {
Adam Arcaro . resolved

Not for this CL, but now that we're moving the floaty presentation to the browser agent, let's make sure to dismiss the floaty on other windows in there too. This line will only affect FREs now

You can add a TODO for tracking

Tarek Makkouk

Done

Line 88, Patchset 3: [self dismissBWGFromOtherWindowsWithCompletion:^() {
Joemer Ramos . resolved

This is fine for now, but can't we also move this functionality to `GeminiBrowserAgent`?

Tarek Makkouk

Added a TODO for the next CL.

Line 105, Patchset 1: ios::provider::ResetGemini();
Adam Arcaro . resolved

We can move this to the browser agent since the FRE doesn't show Gemini anymore

Tarek Makkouk

Removed, I'll have it in the browser agent in the next CL.

Line 120, Patchset 3:- (void)dismissBWGConsentUIWithCompletion:(void (^)())completion {
Joemer Ramos . resolved

nit: replace BWG with Gemini

Tarek Makkouk

Done

Line 139, Patchset 1:// Starts the BWG coordinator.
Adam Arcaro . resolved

`Starts the Gemini FRE coordinator.`

Tarek Makkouk

Done

Line 139, Patchset 3:// Starts the BWG coordinator.
Joemer Ramos . resolved

nit: GeminiFirstRunCoordinator

Tarek Makkouk

Done

Line 171, Patchset 1: [self prepareAIHubIPH];
Adam Arcaro . resolved

Remove the duplicate

Tarek Makkouk

Done

Line 173, Patchset 1: [_mediator updateFRECompletionHandler:_completion];
Adam Arcaro . resolved

Similar to the coordinator, if we expect the mediator to always need a completion handler, then let's put it in its constructor

Tarek Makkouk

Done

Line 177, Patchset 1: initWithPromo:showPromo
Adam Arcaro . resolved

nit: Just use `_mediator.shouldShowPromo` inline here

Tarek Makkouk

Done

Line 182, Patchset 1: BwgTabHelper* BWGTabHelper = [self activeWebStateBWGTabHelper];
Adam Arcaro . resolved

Please add a TODO to remove all this animation background logic, we won't need it for the FRE (and maybe not even for the floaty with copresence)

Tarek Makkouk

Done

Line 215, Patchset 3:// Returns the currently active WebState's BWG tab helper.
Joemer Ramos . resolved

nit: Gemini

Tarek Makkouk

Done

Line 216, Patchset 3:- (BwgTabHelper*)activeWebStateBWGTabHelper {
Joemer Ramos . resolved

nit:Gemini

Tarek Makkouk

Done

Line 236, Patchset 3:- (void)dismissBWGFromOtherWindowsWithCompletion:(ProceduralBlock)completion {
Joemer Ramos . resolved

nit: Gemini

Tarek Makkouk

Done

Line 264, Patchset 3: // Dismiss BWG in all the other browsers for all profiles.
Joemer Ramos . resolved

nit: Gemini

Tarek Makkouk

Done

Line 266, Patchset 3: id<BWGCommands> BWGCommandsHandler =
Joemer Ramos . resolved

nit: Gemini

Tarek Makkouk

Done

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator.mm
Line 56, Patchset 3: raw_ptr<BwgService> _BWGService;
Joemer Ramos . resolved

nit:`_geminiService`

Tarek Makkouk

Done

Line 59, Patchset 3: raw_ptr<BwgBrowserAgent> _BwgBrowserAgent;
Joemer Ramos . resolved

nit: _geminiBrowserAgent

Tarek Makkouk

Done

Line 80, Patchset 3: BWGService:(BwgService*)BWGService
Joemer Ramos . resolved

nit: Gemini

Tarek Makkouk

Done

Line 88, Patchset 1: _baseViewController = baseViewController;
Adam Arcaro . resolved

This isn't being used, let's remove it

Tarek Makkouk

Done

Line 89, Patchset 1: _BWGService = BWGService;
Adam Arcaro . resolved

ditto

Tarek Makkouk

Done

Line 90, Patchset 1: _BwgBrowserAgent = BwgBrowserAgent;
Adam Arcaro . resolved

ditto

Tarek Makkouk

Done

Line 117, Patchset 1: }
Adam Arcaro . resolved

Most stuff in this function shouldn't fire off when the completion handler property is set. Things like notifying events, logging metrics etc are probably results of UI events (like the FRE being shown, next page being pressed etc). It would be best to have the VC notify the mediator of these events through a `mutator`, and then the mediator can call these events

Tarek Makkouk

Done

Line 138, Patchset 1:- (BOOL)shouldShowConsent {
Adam Arcaro . resolved

With this refactor, starting the FRE coordinator should always present some UI, so at the very least the consent page will always be shown. We can remove this function and condition entirely

Tarek Makkouk

Done

Line 166, Patchset 1:- (BOOL)shouldShowAIHubIPH {
Adam Arcaro . resolved

This is repeated here and in the coordinator

Maybe @joeme...@google.com has thoughts on where this should live?

Tarek Makkouk

I think it makes sense to keep it in the mediator given that the coordinator owns the mediator, so I just put it in the coordinator as:

```
// Returns whether to show AI Hub IPH.
- (BOOL)shouldShowAIHubIPH {
return _mediator.shouldShowAIHubIPH;
}
```

@joeme...@google.com Please feel free to mark as unresolved if you disagree.

Line 174, Patchset 3:#pragma mark - BWGConsentMutator
Joemer Ramos . resolved

all these BWG instances you can leave, as BWGConsentMutator being refactored to GeminiFREConsentMutator should be a separate CL. Feel free to resolve after you see this

Tarek Makkouk

Seen

Line 214, Patchset 3:// Notifies the currently active WebState's BWG tab helper that the FRE will be
Joemer Ramos . resolved

nit: Gemini

Tarek Makkouk

Done

Line 216, Patchset 3:- (void)FREWillBeBackgrounded {
Joemer Ramos . resolved

can we rename to `prepareFREBackground`?

Tarek Makkouk

Done

Line 236, Patchset 3:// Fetches zero-state suggestions from the BWG tab helper and pass them to the
Joemer Ramos . resolved

nit: Gemini but im guessing this method will be moved soon to `GeminiBrowserAgent`?

Tarek Makkouk

Done

Line 238, Patchset 1:- (void)executeZeroStateSuggestions {
Adam Arcaro . resolved

This will be called by the BrowserAgent when the overlay is shown, so we can remove it here

Tarek Makkouk

Done

File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator_delegate.h
Line 17, Patchset 3:- (void)dismissBWGFlow;
Joemer Ramos . resolved

nit: Gemini

Tarek Makkouk

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Arcaro
  • Joemer Ramos
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    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: I40c20e3973706a525b9a8760cc628483cb242e35
    Gerrit-Change-Number: 7251673
    Gerrit-PatchSet: 4
    Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
    Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
    Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
    Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
    Gerrit-Attention: Joemer Ramos <joeme...@google.com>
    Gerrit-Attention: Adam Arcaro <ada...@google.com>
    Gerrit-Comment-Date: Fri, 12 Dec 2025 22:08:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Joemer Ramos <joeme...@google.com>
    Comment-In-Reply-To: Adam Arcaro <ada...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Joemer Ramos (Gerrit)

    unread,
    Dec 13, 2025, 4:58:14 PMDec 13
    to Tarek Makkouk, Adam Arcaro, Joemer Ramos, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Adam Arcaro and Tarek Makkouk

    Joemer Ramos added 4 comments

    File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator.mm
    Line 269, Patchset 4 (Latest): [GeminiCommandsHandler dismissGeminiFlowWithCompletion:^() {
    Joemer Ramos . unresolved

    nit: `geminiCommandsHandler`

    File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator_unittest.mm
    Line 102, Patchset 4 (Latest): [mediator viewDidAppear];
    Joemer Ramos . unresolved

    You can just do an `OCMExpect([mediator functionName])` and then a `OCMVerify(mediator)`. This will check that at some point, the mediator function was called. Generally, we should be able to write tests without having to find ways to access private variables. If we find ourselves searching for private variables often, we should rethink our design as it means the design itself is not easily testable.

    File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator.mm
    Line 166, Patchset 1:- (BOOL)shouldShowAIHubIPH {
    Adam Arcaro . unresolved

    This is repeated here and in the coordinator

    Maybe @joeme...@google.com has thoughts on where this should live?

    Tarek Makkouk

    I think it makes sense to keep it in the mediator given that the coordinator owns the mediator, so I just put it in the coordinator as:

    ```
    // Returns whether to show AI Hub IPH.
    - (BOOL)shouldShowAIHubIPH {
    return _mediator.shouldShowAIHubIPH;
    }
    ```

    @joeme...@google.com Please feel free to mark as unresolved if you disagree.

    Joemer Ramos

    Marked as unresolved. I think we should remove the mediator version. Triggering the AI Hub IPH (deciding and sending a trigger for non-Gemini FRE UI) sounds like something a coordinator would do rather than computing model logic within the FRE (what a mediator should handle more or less)

    Line 169, Patchset 4 (Latest):- (void)viewDidAppear {
    Joemer Ramos . unresolved

    Mediator function names should be related to model logic rather than a UI update. Nit: Rename to something like `promoShown`, `notifyPromoShown`, or `updateModel`.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adam Arcaro
    • Tarek Makkouk
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      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: I40c20e3973706a525b9a8760cc628483cb242e35
      Gerrit-Change-Number: 7251673
      Gerrit-PatchSet: 4
      Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
      Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
      Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
      Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
      Gerrit-Attention: Tarek Makkouk <tarekm...@google.com>
      Gerrit-Attention: Adam Arcaro <ada...@google.com>
      Gerrit-Comment-Date: Sat, 13 Dec 2025 21:58:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Tarek Makkouk <tarekm...@google.com>
      Comment-In-Reply-To: Adam Arcaro <ada...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Tarek Makkouk (Gerrit)

      unread,
      Dec 23, 2025, 11:21:41 AM (4 days ago) Dec 23
      to Adam Arcaro, Joemer Ramos, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
      Attention needed from Adam Arcaro and Joemer Ramos

      Tarek Makkouk added 4 comments

      File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator.mm
      Line 269, Patchset 4: [GeminiCommandsHandler dismissGeminiFlowWithCompletion:^() {
      Joemer Ramos . resolved

      nit: `geminiCommandsHandler`

      Tarek Makkouk

      Done

      File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator_unittest.mm
      Line 102, Patchset 4: [mediator viewDidAppear];
      Joemer Ramos . resolved

      You can just do an `OCMExpect([mediator functionName])` and then a `OCMVerify(mediator)`. This will check that at some point, the mediator function was called. Generally, we should be able to write tests without having to find ways to access private variables. If we find ourselves searching for private variables often, we should rethink our design as it means the design itself is not easily testable.

      Tarek Makkouk

      Updated the tests to verify observable public behavior without having to access internal variables.

      File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator.mm
      Line 166, Patchset 1:- (BOOL)shouldShowAIHubIPH {
      Adam Arcaro . resolved

      This is repeated here and in the coordinator

      Maybe @joeme...@google.com has thoughts on where this should live?

      Tarek Makkouk

      I think it makes sense to keep it in the mediator given that the coordinator owns the mediator, so I just put it in the coordinator as:

      ```
      // Returns whether to show AI Hub IPH.
      - (BOOL)shouldShowAIHubIPH {
      return _mediator.shouldShowAIHubIPH;
      }
      ```

      @joeme...@google.com Please feel free to mark as unresolved if you disagree.

      Joemer Ramos

      Marked as unresolved. I think we should remove the mediator version. Triggering the AI Hub IPH (deciding and sending a trigger for non-Gemini FRE UI) sounds like something a coordinator would do rather than computing model logic within the FRE (what a mediator should handle more or less)

      Tarek Makkouk

      Done

      Line 169, Patchset 4:- (void)viewDidAppear {
      Joemer Ramos . resolved

      Mediator function names should be related to model logic rather than a UI update. Nit: Rename to something like `promoShown`, `notifyPromoShown`, or `updateModel`.

      Tarek Makkouk

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Arcaro
      • Joemer Ramos
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        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: I40c20e3973706a525b9a8760cc628483cb242e35
        Gerrit-Change-Number: 7251673
        Gerrit-PatchSet: 7
        Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
        Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
        Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
        Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
        Gerrit-Attention: Joemer Ramos <joeme...@google.com>
        Gerrit-Attention: Adam Arcaro <ada...@google.com>
        Gerrit-Comment-Date: Tue, 23 Dec 2025 16:21:33 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Joemer Ramos <joeme...@google.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Adam Arcaro (Gerrit)

        unread,
        Dec 23, 2025, 12:50:55 PM (4 days ago) Dec 23
        to Tarek Makkouk, Joemer Ramos, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
        Attention needed from Joemer Ramos and Tarek Makkouk

        Adam Arcaro added 5 comments

        Patchset-level comments
        File-level comment, Patchset 14 (Latest):
        Adam Arcaro . resolved

        Mostly LG! Just a few minor comments

        File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator.mm
        Line 164, Patchset 14 (Latest):- (void)didCloseBWGPromo {
        Adam Arcaro . unresolved

        Please rename all of these from BWG -> Gemini

        Line 179, Patchset 14 (Latest): }
        Adam Arcaro . unresolved

        If `notifyPromoShown` is called, we should assume that the promo was actually show and therefore shouldn't need to check this. We can just call `[self logPromoShown]`

        File ios/chrome/browser/intelligence/bwg/ui/bwg_consent_mutator.h
        Line 27, Patchset 14 (Latest):- (void)notifyPromoShown;
        Adam Arcaro . unresolved

        For consistency with other functions, let's name this `didShowGeminiPromo`

        File ios/chrome/browser/intelligence/bwg/ui/bwg_fre_wrapper_view_controller.mm
        Line 130, Patchset 14 (Latest): [self.mutator notifyPromoShown];
        Adam Arcaro . unresolved

        I think this is also called when the consent page is shown, right? (like in the case where the user has already seen the promo 3x)

        We can probably check `_currentChildViewController` here

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Joemer Ramos
        • Tarek Makkouk
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          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: I40c20e3973706a525b9a8760cc628483cb242e35
          Gerrit-Change-Number: 7251673
          Gerrit-PatchSet: 14
          Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
          Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
          Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
          Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
          Gerrit-Attention: Joemer Ramos <joeme...@google.com>
          Gerrit-Attention: Tarek Makkouk <tarekm...@google.com>
          Gerrit-Comment-Date: Tue, 23 Dec 2025 17:50:50 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Joemer Ramos (Gerrit)

          unread,
          Dec 23, 2025, 2:23:22 PM (4 days ago) Dec 23
          to Tarek Makkouk, Adam Arcaro, Joemer Ramos, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
          Attention needed from Tarek Makkouk

          Joemer Ramos added 3 comments

          File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator.mm
          Line 56, Patchset 14 (Latest): // Returns the `_entryPoint` the coordinator was intialized from.
          Joemer Ramos . unresolved

          nit:initialized

          File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator.h
          Line 22, Patchset 14 (Latest):// Gemini Mediator.
          Joemer Ramos . unresolved

          nit: Gemini First Run Mediator.

          File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator.mm
          Line 62, Patchset 14 (Latest): base::TimeTicks _BWGOverlayPreparationStartTime;
          Joemer Ramos . unresolved

          nit: Same as Adam's comment to rename BWG to Gemini

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Tarek Makkouk
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          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: I40c20e3973706a525b9a8760cc628483cb242e35
          Gerrit-Change-Number: 7251673
          Gerrit-PatchSet: 14
          Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
          Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
          Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
          Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
          Gerrit-Attention: Tarek Makkouk <tarekm...@google.com>
          Gerrit-Comment-Date: Tue, 23 Dec 2025 19:23:17 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Tarek Makkouk (Gerrit)

          unread,
          Dec 23, 2025, 3:33:02 PM (4 days ago) Dec 23
          to Adam Arcaro, Joemer Ramos, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
          Attention needed from Adam Arcaro and Joemer Ramos

          Tarek Makkouk added 7 comments

          File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_coordinator.mm
          Line 56, Patchset 14: // Returns the `_entryPoint` the coordinator was intialized from.
          Joemer Ramos . resolved

          nit:initialized

          Tarek Makkouk

          Done

          File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator.h
          Line 22, Patchset 14:// Gemini Mediator.
          Joemer Ramos . resolved

          nit: Gemini First Run Mediator.

          Tarek Makkouk

          Done

          File ios/chrome/browser/intelligence/bwg/coordinator/gemini_first_run_mediator.mm
          Line 62, Patchset 14: base::TimeTicks _BWGOverlayPreparationStartTime;
          Joemer Ramos . resolved

          nit: Same as Adam's comment to rename BWG to Gemini

          Tarek Makkouk

          Done

          Line 164, Patchset 14:- (void)didCloseBWGPromo {
          Adam Arcaro . resolved

          Please rename all of these from BWG -> Gemini

          Tarek Makkouk

          Done

          Line 179, Patchset 14: }
          Adam Arcaro . resolved

          If `notifyPromoShown` is called, we should assume that the promo was actually show and therefore shouldn't need to check this. We can just call `[self logPromoShown]`

          Tarek Makkouk

          Done

          File ios/chrome/browser/intelligence/bwg/ui/bwg_consent_mutator.h
          Line 27, Patchset 14:- (void)notifyPromoShown;
          Adam Arcaro . resolved

          For consistency with other functions, let's name this `didShowGeminiPromo`

          Tarek Makkouk

          Done

          File ios/chrome/browser/intelligence/bwg/ui/bwg_fre_wrapper_view_controller.mm
          Line 130, Patchset 14: [self.mutator notifyPromoShown];
          Adam Arcaro . resolved

          I think this is also called when the consent page is shown, right? (like in the case where the user has already seen the promo 3x)

          We can probably check `_currentChildViewController` here

          Tarek Makkouk

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Adam Arcaro
          • Joemer Ramos
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedReview-Enforcement
            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: I40c20e3973706a525b9a8760cc628483cb242e35
            Gerrit-Change-Number: 7251673
            Gerrit-PatchSet: 16
            Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
            Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
            Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
            Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
            Gerrit-Attention: Joemer Ramos <joeme...@google.com>
            Gerrit-Attention: Adam Arcaro <ada...@google.com>
            Gerrit-Comment-Date: Tue, 23 Dec 2025 20:32:55 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Joemer Ramos <joeme...@google.com>
            Comment-In-Reply-To: Adam Arcaro <ada...@google.com>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Joemer Ramos (Gerrit)

            unread,
            Dec 23, 2025, 3:35:27 PM (4 days ago) Dec 23
            to Tarek Makkouk, Joemer Ramos, Adam Arcaro, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
            Attention needed from Adam Arcaro and Tarek Makkouk

            Joemer Ramos voted and added 1 comment

            Votes added by Joemer Ramos

            Code-Review+1

            1 comment

            Patchset-level comments
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Adam Arcaro
            • Tarek Makkouk
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            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: I40c20e3973706a525b9a8760cc628483cb242e35
            Gerrit-Change-Number: 7251673
            Gerrit-PatchSet: 16
            Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
            Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
            Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
            Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
            Gerrit-Attention: Tarek Makkouk <tarekm...@google.com>
            Gerrit-Attention: Adam Arcaro <ada...@google.com>
            Gerrit-Comment-Date: Tue, 23 Dec 2025 20:35:18 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Adam Arcaro (Gerrit)

            unread,
            Dec 23, 2025, 6:06:06 PM (4 days ago) Dec 23
            to Tarek Makkouk, Joemer Ramos, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
            Attention needed from Tarek Makkouk

            Adam Arcaro voted and added 1 comment

            Votes added by Adam Arcaro

            Code-Review+1

            1 comment

            Patchset-level comments
            Adam Arcaro . resolved

            Thanks!

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Tarek Makkouk
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              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: I40c20e3973706a525b9a8760cc628483cb242e35
              Gerrit-Change-Number: 7251673
              Gerrit-PatchSet: 16
              Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
              Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
              Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
              Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
              Gerrit-Attention: Tarek Makkouk <tarekm...@google.com>
              Gerrit-Comment-Date: Tue, 23 Dec 2025 23:05:59 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy

              Joemer Ramos (Gerrit)

              unread,
              Dec 26, 2025, 9:18:26 AM (yesterday) Dec 26
              to Tarek Makkouk, Joemer Ramos, Adam Arcaro, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
              Attention needed from Adam Arcaro and Tarek Makkouk

              Joemer Ramos voted and added 1 comment

              Votes added by Joemer Ramos

              Code-Review+1

              1 comment

              Patchset-level comments
              Joemer Ramos . resolved

              lgtm

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Adam Arcaro
              • Tarek Makkouk
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement satisfiedCode-Owners
                • requirement is not satisfiedCode-Review
                • requirement satisfiedReview-Enforcement
                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: I40c20e3973706a525b9a8760cc628483cb242e35
                Gerrit-Change-Number: 7251673
                Gerrit-PatchSet: 17
                Gerrit-Owner: Tarek Makkouk <tarekm...@google.com>
                Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
                Gerrit-Reviewer: Joemer Ramos <joeme...@google.com>
                Gerrit-Reviewer: Tarek Makkouk <tarekm...@google.com>
                Gerrit-Attention: Adam Arcaro <ada...@google.com>
                Gerrit-Attention: Tarek Makkouk <tarekm...@google.com>
                Gerrit-Comment-Date: Fri, 26 Dec 2025 14:18:16 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy
                Reply all
                Reply to author
                Forward
                0 new messages