[BAM] Support toolbar button trigger in ReadAnythingEntryPointController [chromium/src : main]

0 views
Skip to first unread message

Darryl James (Gerrit)

unread,
6:44 PM (2 hours ago) 6:44 PM
to Caroline Rising, chromium...@chromium.org, jatapiaro+wat...@google.com, lwinston+watc...@google.com, trewin...@google.com
Attention needed from Caroline Rising

Darryl James added 2 comments

File chrome/browser/ui/views/side_panel/side_panel_interactive_uitest.cc
Line 299, Patchset 1 (Latest): if (layout_manager && layout_manager->is_animating()) {
views::test::WaitForAnimatingLayoutManager(layout_manager);
}
Darryl James . resolved

This is to ensure no animations are running before the test actually starts 👍

Line 539, Patchset 1 (Latest): SidePanelUI* const side_panel_ui =
browser()->browser_window_features()->side_panel_ui();
side_panel_ui->SetNoDelaysForTesting(true);
Darryl James . resolved

This is to help reduce test timeouts (I was experiencing this quite a bit locally).

Open in Gerrit

Related details

Attention is currently required from:
  • Caroline Rising
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: If4f52f49bcda3aa8682662d8ee5724bd3a7665f4
Gerrit-Change-Number: 8128866
Gerrit-PatchSet: 1
Gerrit-Owner: Darryl James <dlj...@chromium.org>
Gerrit-Reviewer: Caroline Rising <cori...@chromium.org>
Gerrit-Attention: Caroline Rising <cori...@chromium.org>
Gerrit-Comment-Date: Wed, 22 Jul 2026 22:43:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kristi Saney (Gerrit)

unread,
6:58 PM (2 hours ago) 6:58 PM
to Darryl James, Chromium LUCI CQ, Caroline Rising, chromium...@chromium.org, jatapiaro+wat...@google.com, lwinston+watc...@google.com, trewin...@google.com
Attention needed from Caroline Rising and Darryl James

Kristi Saney added 1 comment

File chrome/browser/ui/read_anything/read_anything_entry_point_controller.cc
Line 258, Patchset 1 (Latest): if (side_panel_trigger >=
static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
SidePanelOpenTrigger::kMinValue) &&
side_panel_trigger <=
static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
SidePanelOpenTrigger::kMaxValue)) {
mapped_trigger = SidePanelToReadAnythingOpenTrigger(
static_cast<SidePanelOpenTrigger>(side_panel_trigger));
}
Kristi Saney . unresolved

why is this extra check needed? shouldn't this always be true?

Open in Gerrit

Related details

Attention is currently required from:
  • Caroline Rising
  • Darryl James
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: If4f52f49bcda3aa8682662d8ee5724bd3a7665f4
    Gerrit-Change-Number: 8128866
    Gerrit-PatchSet: 1
    Gerrit-Owner: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Caroline Rising <cori...@chromium.org>
    Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Kristi Saney <krist...@google.com>
    Gerrit-Attention: Caroline Rising <cori...@chromium.org>
    Gerrit-Attention: Darryl James <dlj...@chromium.org>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 22:58:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Darryl James (Gerrit)

    unread,
    7:03 PM (2 hours ago) 7:03 PM
    to Kristi Saney, Chromium LUCI CQ, Caroline Rising, chromium...@chromium.org, jatapiaro+wat...@google.com, lwinston+watc...@google.com, trewin...@google.com
    Attention needed from Caroline Rising and Kristi Saney

    Darryl James added 1 comment

    File chrome/browser/ui/read_anything/read_anything_entry_point_controller.cc
    Line 258, Patchset 1: if (side_panel_trigger >=

    static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
    SidePanelOpenTrigger::kMinValue) &&
    side_panel_trigger <=
    static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
    SidePanelOpenTrigger::kMaxValue)) {
    mapped_trigger = SidePanelToReadAnythingOpenTrigger(
    static_cast<SidePanelOpenTrigger>(side_panel_trigger));
    }
    Kristi Saney . unresolved

    why is this extra check needed? shouldn't this always be true?

    Darryl James

    Good point - it shouldn't be needed and now that I look closer maybe the top path is also not needed?
    Updating this or at least can be consolidated

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caroline Rising
    • Kristi Saney
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: If4f52f49bcda3aa8682662d8ee5724bd3a7665f4
    Gerrit-Change-Number: 8128866
    Gerrit-PatchSet: 2
    Gerrit-Owner: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Caroline Rising <cori...@chromium.org>
    Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Kristi Saney <krist...@google.com>
    Gerrit-Attention: Kristi Saney <krist...@google.com>
    Gerrit-Attention: Caroline Rising <cori...@chromium.org>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 23:03:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Kristi Saney <krist...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kristi Saney (Gerrit)

    unread,
    7:05 PM (2 hours ago) 7:05 PM
    to Darryl James, Chromium LUCI CQ, Caroline Rising, chromium...@chromium.org, jatapiaro+wat...@google.com, lwinston+watc...@google.com, trewin...@google.com
    Attention needed from Caroline Rising and Darryl James

    Kristi Saney added 1 comment

    File chrome/browser/ui/read_anything/read_anything_entry_point_controller.cc
    Line 258, Patchset 1: if (side_panel_trigger >=
    static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
    SidePanelOpenTrigger::kMinValue) &&
    side_panel_trigger <=
    static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
    SidePanelOpenTrigger::kMaxValue)) {
    mapped_trigger = SidePanelToReadAnythingOpenTrigger(
    static_cast<SidePanelOpenTrigger>(side_panel_trigger));
    }
    Kristi Saney . unresolved

    why is this extra check needed? shouldn't this always be true?

    Darryl James

    Good point - it shouldn't be needed and now that I look closer maybe the top path is also not needed?
    Updating this or at least can be consolidated

    Kristi Saney

    Nice. Can we still return early though if the trigger doesn't map to anything?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caroline Rising
    • Darryl James
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: If4f52f49bcda3aa8682662d8ee5724bd3a7665f4
    Gerrit-Change-Number: 8128866
    Gerrit-PatchSet: 2
    Gerrit-Owner: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Caroline Rising <cori...@chromium.org>
    Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Kristi Saney <krist...@google.com>
    Gerrit-Attention: Caroline Rising <cori...@chromium.org>
    Gerrit-Attention: Darryl James <dlj...@chromium.org>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 23:05:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Kristi Saney <krist...@google.com>
    Comment-In-Reply-To: Darryl James <dlj...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Darryl James (Gerrit)

    unread,
    7:07 PM (2 hours ago) 7:07 PM
    to Kristi Saney, Chromium LUCI CQ, Caroline Rising, chromium...@chromium.org, jatapiaro+wat...@google.com, lwinston+watc...@google.com, trewin...@google.com
    Attention needed from Caroline Rising and Kristi Saney

    Darryl James added 1 comment

    File chrome/browser/ui/read_anything/read_anything_entry_point_controller.cc
    Line 258, Patchset 1: if (side_panel_trigger >=
    static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
    SidePanelOpenTrigger::kMinValue) &&
    side_panel_trigger <=
    static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
    SidePanelOpenTrigger::kMaxValue)) {
    mapped_trigger = SidePanelToReadAnythingOpenTrigger(
    static_cast<SidePanelOpenTrigger>(side_panel_trigger));
    }
    Kristi Saney . unresolved

    why is this extra check needed? shouldn't this always be true?

    Darryl James

    Good point - it shouldn't be needed and now that I look closer maybe the top path is also not needed?
    Updating this or at least can be consolidated

    Kristi Saney

    Nice. Can we still return early though if the trigger doesn't map to anything?

    Darryl James

    Yes! Before that I am double checking the implemetation of `SidePanelToReadAnythingOpenTrigger` since it seems to be missing some values?

    Not clear if that is intentional yet - need to run the tests locally first 👍

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caroline Rising
    • Kristi Saney
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: If4f52f49bcda3aa8682662d8ee5724bd3a7665f4
    Gerrit-Change-Number: 8128866
    Gerrit-PatchSet: 2
    Gerrit-Owner: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Caroline Rising <cori...@chromium.org>
    Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Kristi Saney <krist...@google.com>
    Gerrit-Attention: Kristi Saney <krist...@google.com>
    Gerrit-Attention: Caroline Rising <cori...@chromium.org>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 23:06:58 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Darryl James (Gerrit)

    unread,
    7:13 PM (2 hours ago) 7:13 PM
    to Kristi Saney, Chromium LUCI CQ, Caroline Rising, chromium...@chromium.org, jatapiaro+wat...@google.com, lwinston+watc...@google.com, trewin...@google.com
    Attention needed from Caroline Rising and Kristi Saney

    Darryl James added 1 comment

    File chrome/browser/ui/read_anything/read_anything_entry_point_controller.cc
    Line 258, Patchset 1: if (side_panel_trigger >=
    static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
    SidePanelOpenTrigger::kMinValue) &&
    side_panel_trigger <=
    static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
    SidePanelOpenTrigger::kMaxValue)) {
    mapped_trigger = SidePanelToReadAnythingOpenTrigger(
    static_cast<SidePanelOpenTrigger>(side_panel_trigger));
    }
    Kristi Saney . unresolved

    why is this extra check needed? shouldn't this always be true?

    Darryl James

    Good point - it shouldn't be needed and now that I look closer maybe the top path is also not needed?
    Updating this or at least can be consolidated

    Kristi Saney

    Nice. Can we still return early though if the trigger doesn't map to anything?

    Darryl James

    Yes! Before that I am double checking the implemetation of `SidePanelToReadAnythingOpenTrigger` since it seems to be missing some values?

    Not clear if that is intentional yet - need to run the tests locally first 👍

    Darryl James

    Okay so I think as part of a separate CL we can update the logic in the `SidePanelToReadAnythingOpenTrigger` to return unknown for unhandled cases, and remove the std::optional<> return type. This way all of the values in the enum must be handled otherwise we get a compile error.

    I'll do that in a followup since that will likely affect other usages of the function, let me know if that is okay / not okay 🙏

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caroline Rising
    • Kristi Saney
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: If4f52f49bcda3aa8682662d8ee5724bd3a7665f4
    Gerrit-Change-Number: 8128866
    Gerrit-PatchSet: 3
    Gerrit-Owner: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Caroline Rising <cori...@chromium.org>
    Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Kristi Saney <krist...@google.com>
    Gerrit-Attention: Kristi Saney <krist...@google.com>
    Gerrit-Attention: Caroline Rising <cori...@chromium.org>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 23:13:08 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Darryl James (Gerrit)

    unread,
    7:16 PM (2 hours ago) 7:16 PM
    to Kristi Saney, Chromium LUCI CQ, Caroline Rising, chromium...@chromium.org, jatapiaro+wat...@google.com, lwinston+watc...@google.com, trewin...@google.com
    Attention needed from Caroline Rising and Kristi Saney

    Darryl James added 1 comment

    File chrome/browser/ui/read_anything/read_anything_entry_point_controller.cc
    Line 258, Patchset 1: if (side_panel_trigger >=
    static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
    SidePanelOpenTrigger::kMinValue) &&
    side_panel_trigger <=
    static_cast<std::underlying_type_t<SidePanelOpenTrigger>>(
    SidePanelOpenTrigger::kMaxValue)) {
    mapped_trigger = SidePanelToReadAnythingOpenTrigger(
    static_cast<SidePanelOpenTrigger>(side_panel_trigger));
    }
    Kristi Saney . resolved

    why is this extra check needed? shouldn't this always be true?

    Darryl James

    Good point - it shouldn't be needed and now that I look closer maybe the top path is also not needed?
    Updating this or at least can be consolidated

    Kristi Saney

    Nice. Can we still return early though if the trigger doesn't map to anything?

    Darryl James

    Yes! Before that I am double checking the implemetation of `SidePanelToReadAnythingOpenTrigger` since it seems to be missing some values?

    Not clear if that is intentional yet - need to run the tests locally first 👍

    Darryl James

    Okay so I think as part of a separate CL we can update the logic in the `SidePanelToReadAnythingOpenTrigger` to return unknown for unhandled cases, and remove the std::optional<> return type. This way all of the values in the enum must be handled otherwise we get a compile error.

    I'll do that in a followup since that will likely affect other usages of the function, let me know if that is okay / not okay 🙏

    Darryl James

    I'll go ahead and spin that up actually just in case, thanks for catching this!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caroline Rising
    • Kristi Saney
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: If4f52f49bcda3aa8682662d8ee5724bd3a7665f4
      Gerrit-Change-Number: 8128866
      Gerrit-PatchSet: 4
      Gerrit-Owner: Darryl James <dlj...@chromium.org>
      Gerrit-Reviewer: Caroline Rising <cori...@chromium.org>
      Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
      Gerrit-Reviewer: Kristi Saney <krist...@google.com>
      Gerrit-Attention: Kristi Saney <krist...@google.com>
      Gerrit-Attention: Caroline Rising <cori...@chromium.org>
      Gerrit-Comment-Date: Wed, 22 Jul 2026 23:16:26 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Caroline Rising (Gerrit)

      unread,
      8:07 PM (1 hour ago) 8:07 PM
      to Darryl James, Kristi Saney, Chromium LUCI CQ, chromium...@chromium.org, jatapiaro+wat...@google.com, lwinston+watc...@google.com, trewin...@google.com
      Attention needed from Darryl James and Kristi Saney

      Caroline Rising voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Darryl James
      • Kristi Saney
      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: If4f52f49bcda3aa8682662d8ee5724bd3a7665f4
        Gerrit-Change-Number: 8128866
        Gerrit-PatchSet: 4
        Gerrit-Owner: Darryl James <dlj...@chromium.org>
        Gerrit-Reviewer: Caroline Rising <cori...@chromium.org>
        Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
        Gerrit-Reviewer: Kristi Saney <krist...@google.com>
        Gerrit-Attention: Kristi Saney <krist...@google.com>
        Gerrit-Attention: Darryl James <dlj...@chromium.org>
        Gerrit-Comment-Date: Thu, 23 Jul 2026 00:07:29 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages