[projects] Support thread resumption via the controller [chromium/src : main]

3 views
Skip to first unread message

Chase Hartsell (Gerrit)

unread,
Feb 27, 2026, 5:51:14 PM (8 hours ago) Feb 27
to David Maunder, Ayman Almadhoun, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang
Attention needed from Ayman Almadhoun and David Maunder

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Ayman Almadhoun
  • David Maunder
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: I76acb2fb9c2b062f2164de64385cedabf442d06b
Gerrit-Change-Number: 7617700
Gerrit-PatchSet: 5
Gerrit-Owner: Chase Hartsell <cha...@chromium.org>
Gerrit-Reviewer: Ayman Almadhoun <ay...@chromium.org>
Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
Gerrit-Reviewer: David Maunder <dav...@chromium.org>
Gerrit-CC: Sophie Chang <sophi...@chromium.org>
Gerrit-Attention: David Maunder <dav...@chromium.org>
Gerrit-Attention: Ayman Almadhoun <ay...@chromium.org>
Gerrit-Comment-Date: Fri, 27 Feb 2026 22:51:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Maunder (Gerrit)

unread,
Feb 27, 2026, 7:40:10 PM (6 hours ago) Feb 27
to Chase Hartsell, Ayman Almadhoun, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang
Attention needed from Ayman Almadhoun and Chase Hartsell

David Maunder added 4 comments

File chrome/browser/ui/views/tabs/projects/projects_panel_controller.h
Line 107, Patchset 5 (Latest): std::map<const std::string, const base::Uuid> thread_server_id_to_task_id_;
David Maunder . unresolved

Are there any alternatives that avoid storing this mapping? Could this be handled at the API level or could we query the service directly when needed? This feels like additional complexity that may not be needed

File chrome/browser/ui/views/tabs/projects/projects_panel_controller.cc
Line 180, Patchset 5 (Latest): auto* tab_strip_model = browser_->GetTabStripModel();
David Maunder . unresolved

I suggest we check ProjectsPanelController Weakptr first in case the browser has been closed.

Line 187, Patchset 5 (Latest): existing_thread_tab_index = i;
David Maunder . unresolved

Could we just ActivateTab here and return instead of tracking the existing_thread_tab_index?

Line 194, Patchset 5 (Latest): tab_strip_model->ActivateTabAt(existing_thread_tab_index.value());
David Maunder . unresolved

Does this work for multi window as well (I'm not too familiar with the TabStrip model in Desktop but if this only works for single window we should track the work for opening the URL if it exists in a separate window).

Open in Gerrit

Related details

Attention is currently required from:
  • Ayman Almadhoun
  • Chase Hartsell
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: I76acb2fb9c2b062f2164de64385cedabf442d06b
    Gerrit-Change-Number: 7617700
    Gerrit-PatchSet: 5
    Gerrit-Owner: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: Ayman Almadhoun <ay...@chromium.org>
    Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: David Maunder <dav...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Ayman Almadhoun <ay...@chromium.org>
    Gerrit-Attention: Chase Hartsell <cha...@chromium.org>
    Gerrit-Comment-Date: Sat, 28 Feb 2026 00:40:04 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Chase Hartsell (Gerrit)

    unread,
    Feb 27, 2026, 7:49:16 PM (6 hours ago) Feb 27
    to David Maunder, Ayman Almadhoun, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang
    Attention needed from Ayman Almadhoun and David Maunder

    Chase Hartsell added 1 comment

    File chrome/browser/ui/views/tabs/projects/projects_panel_controller.h
    Line 107, Patchset 5 (Latest): std::map<const std::string, const base::Uuid> thread_server_id_to_task_id_;
    David Maunder . unresolved

    Are there any alternatives that avoid storing this mapping? Could this be handled at the API level or could we query the service directly when needed? This feels like additional complexity that may not be needed

    Chase Hartsell

    If we don't do this, we'd need to do one of the following:
    1) Pass down `ContextualTask` to the views instead of `Thread` so they can pipe task ID up in the on click callback.
    2) Call `ContextualTasksService::GetTasks` and iterate through all tasks to find the tasks with the matching ID within `OpenThread`.
    3) Add a method like `GetTaskForServerId` within `ContextualTasksService` to map `server_id` to task UUID (like here) or iterate through all tasks to find the task with this ID.
    4) Have our own custom struct that wraps `Thread` with the associated task UUID, and pass that down to the view instead.

    Personally, 1 doesn't feel right because the views don't actually need all the context of `ContextualTask`. 2 is less time efficient and requires another callback for when `GetTasks` returns. 3 is just moving the logic we have now or doing the same thing as 2 but within the service. 4 feels like the best option if we don't want to store a mapping, but I don't know if it's worth having a new type just for this view.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ayman Almadhoun
    • David Maunder
    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: I76acb2fb9c2b062f2164de64385cedabf442d06b
    Gerrit-Change-Number: 7617700
    Gerrit-PatchSet: 5
    Gerrit-Owner: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: Ayman Almadhoun <ay...@chromium.org>
    Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: David Maunder <dav...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: David Maunder <dav...@chromium.org>
    Gerrit-Attention: Ayman Almadhoun <ay...@chromium.org>
    Gerrit-Comment-Date: Sat, 28 Feb 2026 00:49:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: David Maunder <dav...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Chase Hartsell (Gerrit)

    unread,
    Feb 27, 2026, 7:51:00 PM (6 hours ago) Feb 27
    to David Maunder, Ayman Almadhoun, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang
    Attention needed from Ayman Almadhoun and David Maunder

    Chase Hartsell added 1 comment

    File chrome/browser/ui/views/tabs/projects/projects_panel_controller.cc
    Line 194, Patchset 5 (Latest): tab_strip_model->ActivateTabAt(existing_thread_tab_index.value());
    David Maunder . unresolved

    Does this work for multi window as well (I'm not too familiar with the TabStrip model in Desktop but if this only works for single window we should track the work for opening the URL if it exists in a separate window).

    Chase Hartsell

    I assumed from the PRD this was supposed to only check within the same window, since it doesn't specify cross-window behavior. I'll check with UX to see what the intended behavior should be.

    Gerrit-Comment-Date: Sat, 28 Feb 2026 00:50:54 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ayman Almadhoun (Gerrit)

    unread,
    Feb 27, 2026, 8:01:20 PM (6 hours ago) Feb 27
    to Chase Hartsell, David Maunder, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang
    Attention needed from Chase Hartsell and David Maunder

    Ayman Almadhoun voted and added 1 comment

    Votes added by Ayman Almadhoun

    Code-Review+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 5 (Latest):
    Ayman Almadhoun . resolved

    contextual_tasks files lgtm

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Chase Hartsell
    • David Maunder
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I76acb2fb9c2b062f2164de64385cedabf442d06b
    Gerrit-Change-Number: 7617700
    Gerrit-PatchSet: 5
    Gerrit-Owner: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: Ayman Almadhoun <ay...@chromium.org>
    Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: David Maunder <dav...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: David Maunder <dav...@chromium.org>
    Gerrit-Attention: Chase Hartsell <cha...@chromium.org>
    Gerrit-Comment-Date: Sat, 28 Feb 2026 01:01:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Maunder (Gerrit)

    unread,
    Feb 27, 2026, 10:40:41 PM (3 hours ago) Feb 27
    to Chase Hartsell, Ayman Almadhoun, Chromium LUCI CQ, chromium...@chromium.org, Sophie Chang
    Attention needed from Chase Hartsell

    David Maunder added 2 comments

    File chrome/browser/ui/views/tabs/projects/projects_panel_controller.h
    Line 107, Patchset 5 (Latest): std::map<const std::string, const base::Uuid> thread_server_id_to_task_id_;
    David Maunder . unresolved

    Are there any alternatives that avoid storing this mapping? Could this be handled at the API level or could we query the service directly when needed? This feels like additional complexity that may not be needed

    Chase Hartsell

    If we don't do this, we'd need to do one of the following:
    1) Pass down `ContextualTask` to the views instead of `Thread` so they can pipe task ID up in the on click callback.
    2) Call `ContextualTasksService::GetTasks` and iterate through all tasks to find the tasks with the matching ID within `OpenThread`.
    3) Add a method like `GetTaskForServerId` within `ContextualTasksService` to map `server_id` to task UUID (like here) or iterate through all tasks to find the task with this ID.
    4) Have our own custom struct that wraps `Thread` with the associated task UUID, and pass that down to the view instead.

    Personally, 1 doesn't feel right because the views don't actually need all the context of `ContextualTask`. 2 is less time efficient and requires another callback for when `GetTasks` returns. 3 is just moving the logic we have now or doing the same thing as 2 but within the service. 4 feels like the best option if we don't want to store a mapping, but I don't know if it's worth having a new type just for this view.

    David Maunder

    Ok. My preference is 3) for a simpler API and 4) is also not bad (maybe we can call it ThreadContext). Can you create a TODO for post MVP and link it in the code? We can reconsider then. Not worth slowing down this CL for.

    File chrome/browser/ui/views/tabs/projects/projects_panel_controller.cc
    Line 194, Patchset 5 (Latest): tab_strip_model->ActivateTabAt(existing_thread_tab_index.value());
    David Maunder . unresolved

    Does this work for multi window as well (I'm not too familiar with the TabStrip model in Desktop but if this only works for single window we should track the work for opening the URL if it exists in a separate window).

    Chase Hartsell

    I assumed from the PRD this was supposed to only check within the same window, since it doesn't specify cross-window behavior. I'll check with UX to see what the intended behavior should be.

    David Maunder

    Sounds good thanks. If UX wants it and the implementation is complex we can chat to them about punting to post-MVP.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Chase Hartsell
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I76acb2fb9c2b062f2164de64385cedabf442d06b
    Gerrit-Change-Number: 7617700
    Gerrit-PatchSet: 5
    Gerrit-Owner: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: Ayman Almadhoun <ay...@chromium.org>
    Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: David Maunder <dav...@chromium.org>
    Gerrit-CC: Sophie Chang <sophi...@chromium.org>
    Gerrit-Attention: Chase Hartsell <cha...@chromium.org>
    Gerrit-Comment-Date: Sat, 28 Feb 2026 03:40:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: David Maunder <dav...@chromium.org>
    Comment-In-Reply-To: Chase Hartsell <cha...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages