[soft navs] Start separating soft navs and soft lcp updates [chromium/src : main]

0 views
Skip to first unread message

Johannes Henkel (Gerrit)

unread,
Feb 19, 2026, 11:50:59 AM (23 hours ago) Feb 19
to Scott Haseley, Michal Mocny, Annie Sullivan, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org
Attention needed from Annie Sullivan, Michal Mocny and Scott Haseley

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Annie Sullivan
  • Michal Mocny
  • Scott Haseley
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: I8f77eb6f393508372774b4b8511f4422b1aa8032
Gerrit-Change-Number: 7593113
Gerrit-PatchSet: 1
Gerrit-Owner: Johannes Henkel <joha...@chromium.org>
Gerrit-Reviewer: Annie Sullivan <sull...@chromium.org>
Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Annie Sullivan <sull...@chromium.org>
Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
Gerrit-Comment-Date: Thu, 19 Feb 2026 16:50:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Michal Mocny (Gerrit)

unread,
Feb 19, 2026, 12:08:03 PM (22 hours ago) Feb 19
to Johannes Henkel, Scott Haseley, Annie Sullivan, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org
Attention needed from Annie Sullivan, Johannes Henkel and Scott Haseley

Michal Mocny voted and added 5 comments

Votes added by Michal Mocny

Code-Review+1

5 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Michal Mocny . resolved

I like the direction a lot!

Commit Message
Line 15, Patchset 1 (Latest):Consequently, updating the soft lcp takes place in
Michal Mocny . unresolved

Nit: some formatting changes needed in this commit message

File components/page_load_metrics/browser/page_load_tracker.cc
Line 1119, Patchset 1 (Latest): if (new_soft_navigation_metrics.count <= soft_navigation_metrics_->count) {
Michal Mocny . resolved

And just confirming-- this only happens today because we still send the WHOLE soft-nav message in order to update the LCP candidate, but we will re-architect the mojo pipe to basically be 1:1 with new updates for either of these?

Line 1122, Patchset 1 (Latest): // Notify the observers - including and in particular, this will
Michal Mocny . unresolved

Nit: comments can span 80 char line width to reduce number of lines and make it a bit easier to read.

(I've found that git cl format will not merge comment lines if they all fit, but if you make one of the lines go beyond 80, then it will re-format perfectly)

Line 1132, Patchset 1 (Latest): // reset the CLS, INP, and LCP calculators, and remember the
// new soft navigation.
Michal Mocny . unresolved

Nit: "remember the new soft navigation" --> do we only use this in order to remember new_soft_navigation_metrics.count later?

I notice that above `observer->OnSoftNavigationUpdated` passes only the new soft-nav not the old one, so presumably the observers have their own copy?

Anyway, no concerns for this patch, I just wonder if we only need a simple "key" like count that helps us know that soft-nav actually changed vs LCP-update-only, and if all of that goes away after architecture change?

Open in Gerrit

Related details

Attention is currently required from:
  • Annie Sullivan
  • Johannes Henkel
  • Scott Haseley
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: I8f77eb6f393508372774b4b8511f4422b1aa8032
Gerrit-Change-Number: 7593113
Gerrit-PatchSet: 1
Gerrit-Owner: Johannes Henkel <joha...@chromium.org>
Gerrit-Reviewer: Annie Sullivan <sull...@chromium.org>
Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Annie Sullivan <sull...@chromium.org>
Gerrit-Comment-Date: Thu, 19 Feb 2026 17:07:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Scott Haseley (Gerrit)

unread,
Feb 19, 2026, 1:12:34 PM (21 hours ago) Feb 19
to Johannes Henkel, Michal Mocny, Annie Sullivan, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org
Attention needed from Annie Sullivan and Johannes Henkel

Scott Haseley added 3 comments

File components/page_load_metrics/browser/page_load_metrics_update_dispatcher.cc
Line 551, Patchset 1 (Latest): soft_navigation_contentful_paint_candidate_.Text().Reset(
Scott Haseley . unresolved

I'm curious why this class doesn't have a `Reset()` method that just clears everything (or `.Clear()`). Might be worth cleaning up at some point...

File components/page_load_metrics/browser/page_load_tracker.cc
Line 1122, Patchset 1 (Latest): // Notify the observers - including and in particular, this will
Michal Mocny . unresolved

Nit: comments can span 80 char line width to reduce number of lines and make it a bit easier to read.

(I've found that git cl format will not merge comment lines if they all fit, but if you make one of the lines go beyond 80, then it will re-format perfectly)

Scott Haseley

Neat trick! I obsessively `gq` in vim.

Line 1131, Patchset 1 (Latest): // Now that the previous soft navigation is digested by the observers,
Scott Haseley . unresolved

ultra nit: consumed? I'm getting some bad imagery with digested 😄

Open in Gerrit

Related details

Attention is currently required from:
  • Annie Sullivan
  • Johannes Henkel
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: I8f77eb6f393508372774b4b8511f4422b1aa8032
Gerrit-Change-Number: 7593113
Gerrit-PatchSet: 1
Gerrit-Owner: Johannes Henkel <joha...@chromium.org>
Gerrit-Reviewer: Annie Sullivan <sull...@chromium.org>
Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
Gerrit-Attention: Annie Sullivan <sull...@chromium.org>
Gerrit-Comment-Date: Thu, 19 Feb 2026 18:12:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Scott Haseley (Gerrit)

unread,
Feb 19, 2026, 1:12:40 PM (21 hours ago) Feb 19
to Johannes Henkel, Michal Mocny, Annie Sullivan, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org
Attention needed from Annie Sullivan and Johannes Henkel

Scott Haseley voted Code-Review+1

Code-Review+1
Gerrit-Comment-Date: Thu, 19 Feb 2026 18:12:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Michal Mocny (Gerrit)

unread,
Feb 19, 2026, 1:29:16 PM (21 hours ago) Feb 19
to Johannes Henkel, Scott Haseley, Annie Sullivan, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org
Attention needed from Annie Sullivan and Johannes Henkel

Michal Mocny added 1 comment

File components/page_load_metrics/browser/page_load_tracker.cc
Line 1131, Patchset 1 (Latest): // Now that the previous soft navigation is digested by the observers,
Scott Haseley . unresolved

ultra nit: consumed? I'm getting some bad imagery with digested 😄

Michal Mocny

Actually laughed out loud!

Gerrit-Comment-Date: Thu, 19 Feb 2026 18:29:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Johannes Henkel (Gerrit)

unread,
Feb 19, 2026, 2:16:35 PM (20 hours ago) Feb 19
to Scott Haseley, Michal Mocny, Annie Sullivan, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org
Attention needed from Annie Sullivan

Johannes Henkel added 7 comments

Patchset-level comments
File-level comment, Patchset 4:
Johannes Henkel . resolved

Thanks a lot. Will try to get this one submitted.

Commit Message
Line 15, Patchset 1:Consequently, updating the soft lcp takes place in
Michal Mocny . resolved

Nit: some formatting changes needed in this commit message

Johannes Henkel

Done

File components/page_load_metrics/browser/page_load_metrics_update_dispatcher.cc
Line 551, Patchset 1: soft_navigation_contentful_paint_candidate_.Text().Reset(
Scott Haseley . resolved

I'm curious why this class doesn't have a `Reset()` method that just clears everything (or `.Clear()`). Might be worth cleaning up at some point...

Johannes Henkel

Yeah, good point. I'll attempt a follow-up.

File components/page_load_metrics/browser/page_load_tracker.cc
Line 1119, Patchset 1: if (new_soft_navigation_metrics.count <= soft_navigation_metrics_->count) {
Michal Mocny . resolved

And just confirming-- this only happens today because we still send the WHOLE soft-nav message in order to update the LCP candidate, but we will re-architect the mojo pipe to basically be 1:1 with new updates for either of these?

Johannes Henkel

Yeah.

Line 1122, Patchset 1: // Notify the observers - including and in particular, this will
Michal Mocny . resolved

Nit: comments can span 80 char line width to reduce number of lines and make it a bit easier to read.

(I've found that git cl format will not merge comment lines if they all fit, but if you make one of the lines go beyond 80, then it will re-format perfectly)

Johannes Henkel

Yup, thank you, done!

I'm in Emacs, so it's META-q for me. :-)

Line 1131, Patchset 1: // Now that the previous soft navigation is digested by the observers,
Scott Haseley . resolved

ultra nit: consumed? I'm getting some bad imagery with digested 😄

Michal Mocny

Actually laughed out loud!

Johannes Henkel

consumed it is :-)

Line 1132, Patchset 1: // reset the CLS, INP, and LCP calculators, and remember the
// new soft navigation.
Michal Mocny . resolved

Nit: "remember the new soft navigation" --> do we only use this in order to remember new_soft_navigation_metrics.count later?

I notice that above `observer->OnSoftNavigationUpdated` passes only the new soft-nav not the old one, so presumably the observers have their own copy?

Anyway, no concerns for this patch, I just wonder if we only need a simple "key" like count that helps us know that soft-nav actually changed vs LCP-update-only, and if all of that goes away after architecture change?

Johannes Henkel

The observers have access to the previous soft navigation via the PageLoadMetricsObserverDelegate interface, which the PageLoadTracker implements (this is documented in the comment I added). So, they don't need to keep their own copy (they can if they really want to).

This is also why at the end of OnSoftNavigationChanged, the PageLoadTracker updates its copy of the soft nav, so that next time the notification is sent to the observers, the delegate knows the previous one.

Open in Gerrit

Related details

Attention is currently required from:
  • Annie Sullivan
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: I8f77eb6f393508372774b4b8511f4422b1aa8032
    Gerrit-Change-Number: 7593113
    Gerrit-PatchSet: 4
    Gerrit-Owner: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Annie Sullivan <sull...@chromium.org>
    Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Annie Sullivan <sull...@chromium.org>
    Gerrit-Comment-Date: Thu, 19 Feb 2026 19:16:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
    Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
    satisfied_requirement
    open
    diffy

    Johannes Henkel (Gerrit)

    unread,
    Feb 19, 2026, 2:17:14 PM (20 hours ago) Feb 19
    to Annie Sullivan, Scott Haseley, Michal Mocny, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org

    Johannes Henkel voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention set is empty
    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: I8f77eb6f393508372774b4b8511f4422b1aa8032
    Gerrit-Change-Number: 7593113
    Gerrit-PatchSet: 6
    Gerrit-Owner: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Annie Sullivan <sull...@chromium.org>
    Gerrit-Comment-Date: Thu, 19 Feb 2026 19:17:08 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Feb 19, 2026, 4:04:29 PM (18 hours ago) Feb 19
    to Johannes Henkel, Annie Sullivan, Scott Haseley, Michal Mocny, AyeAye, chromium...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org

    Chromium LUCI CQ submitted the change with unreviewed changes

    Unreviewed changes

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

    ```
    The name of the file: components/page_load_metrics/browser/page_load_tracker.cc
    Insertions: 7, Deletions: 9.

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

    Change information

    Commit message:
    [soft navs] Start separating soft navs and soft lcp updates

    This is another modest refactoring. In
    PageLoadTracker::OnSoftNavigationChanged, we no longer access the lcp
    data that's attached to the SoftNavigationMetrics mojom. Instead, we
    only process the new SoftNavigation record itself. The new comments
    explain how the method works.


    Consequently, updating the soft lcp takes place in
    PageLoadMetricsUpdateDispatcher::UpdateMetrics, and to keep the logic
    the same as before, the soft lcp is always updated just after a new soft
    navigation has been recognized. Note that the UpdateSoftNavigation call
    in PageLoadMetricsUpdateDispatcher::UpdateMetrics triggers
    PageLoadTracker::OnSoftNavigationChanged (which is a no-op if no new
    soft navigation arrived).
    Bug: 7589741
    Change-Id: I8f77eb6f393508372774b4b8511f4422b1aa8032
    Commit-Queue: Johannes Henkel <joha...@chromium.org>
    Reviewed-by: Michal Mocny <mmo...@chromium.org>
    Reviewed-by: Scott Haseley <shas...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1587369}
    Files:
    • M components/page_load_metrics/browser/page_load_metrics_update_dispatcher.cc
    • M components/page_load_metrics/browser/page_load_metrics_update_dispatcher.h
    • M components/page_load_metrics/browser/page_load_tracker.cc
    Change size: M
    Delta: 3 files changed, 34 insertions(+), 22 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Michal Mocny, +1 by Scott Haseley
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8f77eb6f393508372774b4b8511f4422b1aa8032
    Gerrit-Change-Number: 7593113
    Gerrit-PatchSet: 7
    Gerrit-Owner: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Annie Sullivan <sull...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages