[contextual_tasks] Auto-suggested chip dismissal per thread+URL [chromium/src : main]

0 views
Skip to first unread message

Shakti Sahu (Gerrit)

unread,
Feb 6, 2026, 12:27:30 AM (yesterday) Feb 6
to Min Qin, AyeAye, chromium...@chromium.org, Sophie Chang
Attention needed from Min Qin

Shakti Sahu added 4 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Shakti Sahu . resolved

Tested manually. Haven't updated tests but need a review first.

File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
Line 946, Patchset 1 (Latest):void ContextualTasksComposeboxHandler::UpdateSuggestedTabContext(
Shakti Sahu . resolved

FYI. This was moved from `ComposeboxHandler` to this subclass. The logic seems more convenient here. `ContextualTasksComposeboxHandler` will do the dismissed URL tracking and filtering of suggested URLs (which is the active tab URL) when requested by outside world.

File chrome/browser/contextual_tasks/contextual_tasks_side_panel_coordinator.cc
Line 1080, Patchset 1 (Parent): !web_ui_interface->IsActiveTabContextSuggestionShowing()) {
Shakti Sahu . resolved

This makes the earlier check for `auto_tab_context_suggestion_enabled` earlier redundant.

File chrome/browser/contextual_tasks/contextual_tasks_ui.cc
Line 691, Patchset 1 (Parent):void ContextualTasksUI::DisableActiveTabContextSuggestion() {
Shakti Sahu . resolved

This is now directly done at `ContextualTasksComposeboxHandler`.

Open in Gerrit

Related details

Attention is currently required from:
  • Min Qin
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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
Gerrit-Change-Number: 7549398
Gerrit-PatchSet: 1
Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
Gerrit-Reviewer: Min Qin <qin...@chromium.org>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Comment-Date: Fri, 06 Feb 2026 05:27:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Shakti Sahu (Gerrit)

unread,
Feb 6, 2026, 12:29:53 AM (yesterday) Feb 6
to Min Qin, AyeAye, chromium...@chromium.org, Sophie Chang
Attention needed from Min Qin

Shakti Sahu added 1 comment

File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
Line 930, Patchset 1 (Latest): // TODO(shaktisahu): Pass the URL of the chip from the UI. This requires URL
Shakti Sahu . resolved

This one is a bit weird. When I tried to plumb the URL through JS, a whole lot of plumbing across various callsites was needed and was making things messier there. That's why I decided to take this alternative. Is this correct enough?

Open in Gerrit

Related details

Attention is currently required from:
  • Min Qin
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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
Gerrit-Change-Number: 7549398
Gerrit-PatchSet: 1
Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
Gerrit-Reviewer: Min Qin <qin...@chromium.org>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Comment-Date: Fri, 06 Feb 2026 05:29:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Min Qin (Gerrit)

unread,
Feb 6, 2026, 11:55:30 AM (yesterday) Feb 6
to Shakti Sahu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Sophie Chang
Attention needed from Shakti Sahu

Min Qin added 2 comments

File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
Line 827, Patchset 4: blocklisted_suggestions_.erase(tab->GetContents()->GetLastCommittedURL());
Min Qin . unresolved

this can be moved to outside the if block

Line 929, Patchset 4: if (from_automatic_chip) {
Min Qin . unresolved

should this matter? if user delete another URL context, we should also stop suggesting it right?

Open in Gerrit

Related details

Attention is currently required from:
  • Shakti Sahu
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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
    Gerrit-Change-Number: 7549398
    Gerrit-PatchSet: 4
    Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 16:55:21 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Shakti Sahu (Gerrit)

    unread,
    Feb 6, 2026, 1:37:12 PM (23 hours ago) Feb 6
    to Chromium LUCI CQ, Min Qin, AyeAye, chromium...@chromium.org, Sophie Chang
    Attention needed from Min Qin

    Shakti Sahu added 2 comments

    File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
    Line 827, Patchset 4: blocklisted_suggestions_.erase(tab->GetContents()->GetLastCommittedURL());
    Min Qin . unresolved

    this can be moved to outside the if block

    Shakti Sahu

    Removed the `blocklisted_suggestions_.erase` from the other block around line 814. We want to remove it from blocklist only if it was explicitly added and not auto-added.

    Line 929, Patchset 4: if (from_automatic_chip) {
    Min Qin . unresolved

    should this matter? if user delete another URL context, we should also stop suggesting it right?

    Shakti Sahu

    Yes, but there is a caveat below. I am assuming that the current URL in active tab is the one that the user has dismissed via auto chip. I couldn't get it plumbed all the way through.
    So, I am just adding to blocklist when auto chip is dismissed.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Min Qin
    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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
    Gerrit-Change-Number: 7549398
    Gerrit-PatchSet: 6
    Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Min Qin <qin...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 18:37:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Min Qin <qin...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Min Qin (Gerrit)

    unread,
    Feb 6, 2026, 2:13:00 PM (23 hours ago) Feb 6
    to Shakti Sahu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Sophie Chang
    Attention needed from Shakti Sahu

    Min Qin added 1 comment

    File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
    Line 929, Patchset 4: if (from_automatic_chip) {
    Min Qin . unresolved

    should this matter? if user delete another URL context, we should also stop suggesting it right?

    Shakti Sahu

    Yes, but there is a caveat below. I am assuming that the current URL in active tab is the one that the user has dismissed via auto chip. I couldn't get it plumbed all the way through.
    So, I am just adding to blocklist when auto chip is dismissed.

    Min Qin
    so if you check the current code, I guess you can get the URL from the file info even it it is not auto chip?
    std::optional<SessionID> associated_tab_id;
    auto* contextual_session_handle = GetContextualSessionHandle();
    if (contextual_session_handle) {
    const contextual_search::FileInfo* file_info =
    contextual_session_handle->GetController()->GetFileInfo(file_token);
    if (file_info && file_info->tab_session_id.has_value()) {
    associated_tab_id = file_info->tab_session_id.value();
    }
    }
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Shakti Sahu
    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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
    Gerrit-Change-Number: 7549398
    Gerrit-PatchSet: 7
    Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 19:12:51 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Shakti Sahu <shakt...@chromium.org>
    Comment-In-Reply-To: Min Qin <qin...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Shakti Sahu (Gerrit)

    unread,
    Feb 6, 2026, 2:17:13 PM (22 hours ago) Feb 6
    to Chromium LUCI CQ, Min Qin, AyeAye, chromium...@chromium.org, Sophie Chang
    Attention needed from Min Qin

    Shakti Sahu added 1 comment

    File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
    Line 929, Patchset 4: if (from_automatic_chip) {
    Min Qin . unresolved

    should this matter? if user delete another URL context, we should also stop suggesting it right?

    Shakti Sahu

    Yes, but there is a caveat below. I am assuming that the current URL in active tab is the one that the user has dismissed via auto chip. I couldn't get it plumbed all the way through.
    So, I am just adding to blocklist when auto chip is dismissed.

    Min Qin
    so if you check the current code, I guess you can get the URL from the file info even it it is not auto chip?
    std::optional<SessionID> associated_tab_id;
    auto* contextual_session_handle = GetContextualSessionHandle();
    if (contextual_session_handle) {
    const contextual_search::FileInfo* file_info =
    contextual_session_handle->GetController()->GetFileInfo(file_token);
    if (file_info && file_info->tab_session_id.has_value()) {
    associated_tab_id = file_info->tab_session_id.value();
    }
    }
    Shakti Sahu

    I also thought so, but I think the auto chip aren't even added to the `contextual_session_handle` because they have `delay_upload=true`. So there wont be a `file_info` I think.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Min Qin
    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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
    Gerrit-Change-Number: 7549398
    Gerrit-PatchSet: 7
    Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Min Qin <qin...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 19:17:04 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Min Qin (Gerrit)

    unread,
    Feb 6, 2026, 2:19:03 PM (22 hours ago) Feb 6
    to Shakti Sahu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Sophie Chang
    Attention needed from Shakti Sahu

    Min Qin added 1 comment

    File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
    Line 929, Patchset 4: if (from_automatic_chip) {
    Min Qin . unresolved

    should this matter? if user delete another URL context, we should also stop suggesting it right?

    Shakti Sahu

    Yes, but there is a caveat below. I am assuming that the current URL in active tab is the one that the user has dismissed via auto chip. I couldn't get it plumbed all the way through.
    So, I am just adding to blocklist when auto chip is dismissed.

    Min Qin
    so if you check the current code, I guess you can get the URL from the file info even it it is not auto chip?
    std::optional<SessionID> associated_tab_id;
    auto* contextual_session_handle = GetContextualSessionHandle();
    if (contextual_session_handle) {
    const contextual_search::FileInfo* file_info =
    contextual_session_handle->GetController()->GetFileInfo(file_token);
    if (file_info && file_info->tab_session_id.has_value()) {
    associated_tab_id = file_info->tab_session_id.value();
    }
    }
    Shakti Sahu

    I also thought so, but I think the auto chip aren't even added to the `contextual_session_handle` because they have `delay_upload=true`. So there wont be a `file_info` I think.

    Min Qin

    Yes, for autochip, we can just use active tab to get the URL, but for non-auto chip, we get it from file_info and also add it to blacklist here?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Shakti Sahu
    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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
    Gerrit-Change-Number: 7549398
    Gerrit-PatchSet: 7
    Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 19:18:53 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Shakti Sahu (Gerrit)

    unread,
    Feb 6, 2026, 6:12:17 PM (19 hours ago) Feb 6
    to Chromium LUCI CQ, Min Qin, AyeAye, chromium...@chromium.org, Sophie Chang
    Attention needed from Min Qin

    Shakti Sahu added 1 comment

    File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
    Line 929, Patchset 4: if (from_automatic_chip) {
    Min Qin . unresolved

    should this matter? if user delete another URL context, we should also stop suggesting it right?

    Shakti Sahu

    Yes, but there is a caveat below. I am assuming that the current URL in active tab is the one that the user has dismissed via auto chip. I couldn't get it plumbed all the way through.
    So, I am just adding to blocklist when auto chip is dismissed.

    Min Qin
    so if you check the current code, I guess you can get the URL from the file info even it it is not auto chip?
    std::optional<SessionID> associated_tab_id;
    auto* contextual_session_handle = GetContextualSessionHandle();
    if (contextual_session_handle) {
    const contextual_search::FileInfo* file_info =
    contextual_session_handle->GetController()->GetFileInfo(file_token);
    if (file_info && file_info->tab_session_id.has_value()) {
    associated_tab_id = file_info->tab_session_id.value();
    }
    }
    Shakti Sahu

    I also thought so, but I think the auto chip aren't even added to the `contextual_session_handle` because they have `delay_upload=true`. So there wont be a `file_info` I think.

    Min Qin

    Yes, for autochip, we can just use active tab to get the URL, but for non-auto chip, we get it from file_info and also add it to blacklist here?

    Shakti Sahu

    But the URL may have changed in that tab though (since it was an explictly added tab). Is that still okay?
    For the auto-chip case, it's very unlikely to have changed since it constantly observes navigations on the active tab.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Min Qin
    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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
    Gerrit-Change-Number: 7549398
    Gerrit-PatchSet: 7
    Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Min Qin <qin...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Feb 2026 23:12:08 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Min Qin (Gerrit)

    unread,
    Feb 6, 2026, 8:40:24 PM (16 hours ago) Feb 6
    to Shakti Sahu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Sophie Chang
    Attention needed from Shakti Sahu

    Min Qin added 1 comment

    File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
    Line 929, Patchset 4: if (from_automatic_chip) {
    Min Qin . unresolved

    should this matter? if user delete another URL context, we should also stop suggesting it right?

    Shakti Sahu

    Yes, but there is a caveat below. I am assuming that the current URL in active tab is the one that the user has dismissed via auto chip. I couldn't get it plumbed all the way through.
    So, I am just adding to blocklist when auto chip is dismissed.

    Min Qin
    so if you check the current code, I guess you can get the URL from the file info even it it is not auto chip?
    std::optional<SessionID> associated_tab_id;
    auto* contextual_session_handle = GetContextualSessionHandle();
    if (contextual_session_handle) {
    const contextual_search::FileInfo* file_info =
    contextual_session_handle->GetController()->GetFileInfo(file_token);
    if (file_info && file_info->tab_session_id.has_value()) {
    associated_tab_id = file_info->tab_session_id.value();
    }
    }
    Shakti Sahu

    I also thought so, but I think the auto chip aren't even added to the `contextual_session_handle` because they have `delay_upload=true`. So there wont be a `file_info` I think.

    Min Qin

    Yes, for autochip, we can just use active tab to get the URL, but for non-auto chip, we get it from file_info and also add it to blacklist here?

    Shakti Sahu

    But the URL may have changed in that tab though (since it was an explictly added tab). Is that still okay?
    For the auto-chip case, it's very unlikely to have changed since it constantly observes navigations on the active tab.

    Attention is currently required from:
    • Shakti Sahu
    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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
    Gerrit-Change-Number: 7549398
    Gerrit-PatchSet: 8
    Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Comment-Date: Sat, 07 Feb 2026 01:40:16 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Shakti Sahu (Gerrit)

    unread,
    Feb 6, 2026, 8:59:17 PM (16 hours ago) Feb 6
    to Chromium LUCI CQ, Min Qin, AyeAye, chromium...@chromium.org, Sophie Chang
    Attention needed from Min Qin

    Shakti Sahu voted and added 1 comment

    Votes added by Shakti Sahu

    Commit-Queue+1

    1 comment

    File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
    Shakti Sahu

    Oh, I see. Thanks for catching this. Updated the CL.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Min Qin
    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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
    Gerrit-Change-Number: 7549398
    Gerrit-PatchSet: 8
    Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Min Qin <qin...@chromium.org>
    Gerrit-Comment-Date: Sat, 07 Feb 2026 01:59:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Min Qin (Gerrit)

    unread,
    Feb 6, 2026, 11:44:15 PM (13 hours ago) Feb 6
    to Shakti Sahu, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Sophie Chang
    Attention needed from Shakti Sahu

    Min Qin voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Shakti Sahu
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • 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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
      Gerrit-Change-Number: 7549398
      Gerrit-PatchSet: 9
      Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
      Gerrit-Reviewer: Min Qin <qin...@chromium.org>
      Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
      Gerrit-CC: Sophie Chang <sophi...@chromium.org>
      Gerrit-Attention: Shakti Sahu <shakt...@chromium.org>
      Gerrit-Comment-Date: Sat, 07 Feb 2026 04:44:02 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Shakti Sahu (Gerrit)

      unread,
      10:43 AM (2 hours ago) 10:43 AM
      to Min Qin, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Sophie Chang

      Shakti Sahu voted and added 2 comments

      Votes added by Shakti Sahu

      Commit-Queue+2

      2 comments

      File chrome/browser/contextual_tasks/contextual_tasks_composebox_handler.cc
      Line 827, Patchset 4: blocklisted_suggestions_.erase(tab->GetContents()->GetLastCommittedURL());
      Min Qin . resolved

      this can be moved to outside the if block

      Shakti Sahu

      Removed the `blocklisted_suggestions_.erase` from the other block around line 814. We want to remove it from blocklist only if it was explicitly added and not auto-added.

      Shakti Sahu

      Done

      Line 929, Patchset 4: if (from_automatic_chip) {
      Min Qin . resolved

      should this matter? if user delete another URL context, we should also stop suggesting it right?

      Shakti Sahu

      Yes, but there is a caveat below. I am assuming that the current URL in active tab is the one that the user has dismissed via auto chip. I couldn't get it plumbed all the way through.
      So, I am just adding to blocklist when auto chip is dismissed.

      Min Qin
      so if you check the current code, I guess you can get the URL from the file info even it it is not auto chip?
      std::optional<SessionID> associated_tab_id;
      auto* contextual_session_handle = GetContextualSessionHandle();
      if (contextual_session_handle) {
      const contextual_search::FileInfo* file_info =
      contextual_session_handle->GetController()->GetFileInfo(file_token);
      if (file_info && file_info->tab_session_id.has_value()) {
      associated_tab_id = file_info->tab_session_id.value();
      }
      }
      Shakti Sahu

      I also thought so, but I think the auto chip aren't even added to the `contextual_session_handle` because they have `delay_upload=true`. So there wont be a `file_info` I think.

      Min Qin

      Yes, for autochip, we can just use active tab to get the URL, but for non-auto chip, we get it from file_info and also add it to blacklist here?

      Shakti Sahu

      But the URL may have changed in that tab though (since it was an explictly added tab). Is that still okay?
      For the auto-chip case, it's very unlikely to have changed since it constantly observes navigations on the active tab.

      Min Qin

      the fileinfo.tab_url should contain the tab URL uploaded? https://source.chromium.org/chromium/chromium/src/+/main:components/contextual_search/contextual_search_types.h;l=101

      Shakti Sahu

      Oh, I see. Thanks for catching this. Updated the CL.

      Shakti Sahu

      Done

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
        Gerrit-Change-Number: 7549398
        Gerrit-PatchSet: 9
        Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
        Gerrit-Reviewer: Min Qin <qin...@chromium.org>
        Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
        Gerrit-CC: Sophie Chang <sophi...@chromium.org>
        Gerrit-Comment-Date: Sat, 07 Feb 2026 15:42:55 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Shakti Sahu (Gerrit)

        unread,
        10:55 AM (2 hours ago) 10:55 AM
        to Sophie Chang, Min Qin, Chromium LUCI CQ, AyeAye, chromium...@chromium.org
        Attention needed from Sophie Chang

        Shakti Sahu added 1 comment

        Patchset-level comments
        File-level comment, Patchset 9 (Latest):
        Shakti Sahu . resolved

        sophiechang@ - For overall lgtm on chrome/browser/ui/webui/cr_components/composebox/composebox_handler.*

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Sophie Chang
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: I7ab6e0ea2e4704197bb9f7c21867d751af741197
        Gerrit-Change-Number: 7549398
        Gerrit-PatchSet: 9
        Gerrit-Owner: Shakti Sahu <shakt...@chromium.org>
        Gerrit-Reviewer: Min Qin <qin...@chromium.org>
        Gerrit-Reviewer: Shakti Sahu <shakt...@chromium.org>
        Gerrit-Reviewer: Sophie Chang <sophi...@chromium.org>
        Gerrit-Attention: Sophie Chang <sophi...@chromium.org>
        Gerrit-Comment-Date: Sat, 07 Feb 2026 15:55:03 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages