Extract view from ConsoleInsights [devtools/devtools-frontend : main]

0 views
Skip to first unread message

Piotr Paulski (Gerrit)

unread,
Nov 4, 2025, 8:19:08 AM (2 days ago) Nov 4
to Alex Rudenko, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Alex Rudenko

Piotr Paulski added 1 comment

Patchset-level comments
File-level comment, Patchset 10 (Latest):
Piotr Paulski . resolved

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Rudenko
Submit Requirements:
  • 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: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: I6299e0895089b64bfd3d90f485e2d7edff962bf3
Gerrit-Change-Number: 7106268
Gerrit-PatchSet: 10
Gerrit-Owner: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Piotr Paulski <piotrp...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
Gerrit-Comment-Date: Tue, 04 Nov 2025 13:19:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Rudenko (Gerrit)

unread,
Nov 4, 2025, 10:13:54 AM (2 days ago) Nov 4
to Piotr Paulski, Wolfgang Beyer, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Piotr Paulski and Wolfgang Beyer

Alex Rudenko added 8 comments

Patchset-level comments
Alex Rudenko . resolved

@wo...@chromium.org could you please review as well?

File front_end/panels/explain/components/ConsoleInsight.ts
Line 277, Patchset 10 (Latest): .data=${
Alex Rudenko . unresolved

nit: .data is deprecated and I think we should use attributes

Line 326, Patchset 10 (Latest): const directCitationUrls = state.directCitationUrls;
Alex Rudenko . unresolved

this calculation block sounds like it might belong to the presentation logic rather than the view? let's accept relatedUrls on the view input?

Line 366, Patchset 10 (Latest): const noLogging = Root.Runtime.hostConfig.aidaAvailability?.enterprisePolicyValue ===
Alex Rudenko . unresolved

this logic should be in the present, let's add a noLogging view input param

Line 461, Patchset 10 (Latest): Host.userMetrics.actionTaken(Host.UserMetrics.Action.InsightsOptInTeaserSettingsLinkClicked);
Alex Rudenko . unresolved

let's move this to the presenter

Line 493, Patchset 10 (Latest): const noLogging = Root.Runtime.hostConfig.aidaAvailability?.enterprisePolicyValue ===
Alex Rudenko . unresolved

Also, here the noLogging calculation is duplicated

Line 555, Patchset 10 (Latest): }}
Alex Rudenko . unresolved

I think this should be in the presenter, not the view.

Line 1134, Patchset 10 (Latest): if (this.#referenceDetailsRef.value) {
Alex Rudenko . unresolved

can we do it without a ref by passing a value to onToggleReferenceDetails?

Open in Gerrit

Related details

Attention is currently required from:
  • Piotr Paulski
  • Wolfgang Beyer
Submit Requirements:
  • 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: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: I6299e0895089b64bfd3d90f485e2d7edff962bf3
Gerrit-Change-Number: 7106268
Gerrit-PatchSet: 10
Gerrit-Owner: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Wolfgang Beyer <wo...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Wolfgang Beyer <wo...@chromium.org>
Gerrit-Attention: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Comment-Date: Tue, 04 Nov 2025 15:13:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Rudenko (Gerrit)

unread,
Nov 4, 2025, 10:14:23 AM (2 days ago) Nov 4
to Piotr Paulski, Wolfgang Beyer, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Piotr Paulski and Wolfgang Beyer

Alex Rudenko added 1 comment

File front_end/panels/explain/components/ConsoleInsightHeader.ts
Line 68, Patchset 5:export class ConsoleInsightHeader extends UI.Widget.Widget {
Alex Rudenko . unresolved

this presenter does not integrate with any models and has very little logic. I think this should be a view. Is there a reason to extract it?

Piotr Paulski

Only temporarily. When I rewrite all parts of ConsoleInsight to widgets, I will replace this and similar smaller components back to functions in the large view.

Alex Rudenko

This sounds like extra steps with limited benefits. Could we just turn the ConsoleInsight into a widget directly?

Piotr Paulski

There are a lot of additional fixes needed to convert all the animations to not use imperative DOM manipulations and a few race conditions that show up after conversion to widget due to change from sync to async rendering. I felt I need to split it into several steps to make sure it is reviewable.
This first one actually solves couple of issues with component initialization order (by moving `#render` from the constructor) and unblocks this step-by-step rewrite. I updated CL description to point that out.

Alex Rudenko

I am not sure it justifies the presenter. Why cannot it be a helper function producing a lit-html template? The presenter only adds unnecessary property passing and widget instantiations in my opinion.

Alex Rudenko

Let me know if it's ready for review, I can do a full review.

Piotr Paulski

I came to the same conclusion overnight - I don't need the widget to convert part of the existing `#render` method to a function outside of the component. Just pass the inputs as parameter instead of relying on having access to `this.#something`. I'll let you know when I convert this CL.

Alex Rudenko

Thanks! Mostly looks good to me, left a few suggestions.

Gerrit-Comment-Date: Tue, 04 Nov 2025 15:14:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Piotr Paulski <piotrp...@chromium.org>
Comment-In-Reply-To: Alex Rudenko <alexr...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Wolfgang Beyer (Gerrit)

unread,
Nov 5, 2025, 4:13:46 AM (yesterday) Nov 5
to Piotr Paulski, Alex Rudenko, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Piotr Paulski

Wolfgang Beyer added 1 comment

Patchset-level comments
Wolfgang Beyer . resolved

I have nothing to add. Alex' suggestions of moving some logic to the presenter SGTM.

Open in Gerrit

Related details

Attention is currently required from:
  • Piotr Paulski
Submit Requirements:
  • 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: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: I6299e0895089b64bfd3d90f485e2d7edff962bf3
Gerrit-Change-Number: 7106268
Gerrit-PatchSet: 10
Gerrit-Owner: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Wolfgang Beyer <wo...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Comment-Date: Wed, 05 Nov 2025 09:13:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Piotr Paulski (Gerrit)

unread,
Nov 5, 2025, 11:28:42 AM (20 hours ago) Nov 5
to Wolfgang Beyer, Alex Rudenko, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Alex Rudenko

Piotr Paulski added 7 comments

File front_end/panels/explain/components/ConsoleInsight.ts
Line 277, Patchset 10: .data=${
Alex Rudenko . resolved

nit: .data is deprecated and I think we should use attributes

Piotr Paulski

Done

Line 326, Patchset 10: const directCitationUrls = state.directCitationUrls;
Alex Rudenko . resolved

this calculation block sounds like it might belong to the presentation logic rather than the view? let's accept relatedUrls on the view input?

Piotr Paulski

Done

Line 366, Patchset 10: const noLogging = Root.Runtime.hostConfig.aidaAvailability?.enterprisePolicyValue ===
Alex Rudenko . resolved

this logic should be in the present, let's add a noLogging view input param

Piotr Paulski

Done

Line 461, Patchset 10: Host.userMetrics.actionTaken(Host.UserMetrics.Action.InsightsOptInTeaserSettingsLinkClicked);
Alex Rudenko . resolved

let's move this to the presenter

Piotr Paulski

Done

Line 493, Patchset 10: const noLogging = Root.Runtime.hostConfig.aidaAvailability?.enterprisePolicyValue ===
Alex Rudenko . resolved

Also, here the noLogging calculation is duplicated

Piotr Paulski

Done

Line 555, Patchset 10: }}
Alex Rudenko . resolved

I think this should be in the presenter, not the view.

Piotr Paulski

Done

File front_end/panels/explain/components/ConsoleInsightHeader.ts
Line 68, Patchset 5:export class ConsoleInsightHeader extends UI.Widget.Widget {
Alex Rudenko . resolved

this presenter does not integrate with any models and has very little logic. I think this should be a view. Is there a reason to extract it?

Piotr Paulski

Only temporarily. When I rewrite all parts of ConsoleInsight to widgets, I will replace this and similar smaller components back to functions in the large view.

Alex Rudenko

This sounds like extra steps with limited benefits. Could we just turn the ConsoleInsight into a widget directly?

Piotr Paulski

There are a lot of additional fixes needed to convert all the animations to not use imperative DOM manipulations and a few race conditions that show up after conversion to widget due to change from sync to async rendering. I felt I need to split it into several steps to make sure it is reviewable.
This first one actually solves couple of issues with component initialization order (by moving `#render` from the constructor) and unblocks this step-by-step rewrite. I updated CL description to point that out.

Alex Rudenko

I am not sure it justifies the presenter. Why cannot it be a helper function producing a lit-html template? The presenter only adds unnecessary property passing and widget instantiations in my opinion.

Alex Rudenko

Let me know if it's ready for review, I can do a full review.

Piotr Paulski

I came to the same conclusion overnight - I don't need the widget to convert part of the existing `#render` method to a function outside of the component. Just pass the inputs as parameter instead of relying on having access to `this.#something`. I'll let you know when I convert this CL.

Alex Rudenko

Thanks! Mostly looks good to me, left a few suggestions.

Piotr Paulski

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Rudenko
Submit Requirements:
  • 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: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: I6299e0895089b64bfd3d90f485e2d7edff962bf3
Gerrit-Change-Number: 7106268
Gerrit-PatchSet: 12
Gerrit-Owner: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Wolfgang Beyer <wo...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
Gerrit-Comment-Date: Wed, 05 Nov 2025 16:28:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Piotr Paulski (Gerrit)

unread,
Nov 5, 2025, 11:37:09 AM (20 hours ago) Nov 5
to Wolfgang Beyer, Alex Rudenko, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Alex Rudenko

Piotr Paulski voted and added 1 comment

Votes added by Piotr Paulski

Auto-Submit+1
Commit-Queue+1

1 comment

File front_end/panels/explain/components/ConsoleInsight.ts
Line 1134, Patchset 10: if (this.#referenceDetailsRef.value) {
Alex Rudenko . unresolved

can we do it without a ref by passing a value to onToggleReferenceDetails?

Piotr Paulski

Prefer to fix this in a separate CL: at render time the value is not known, details could be toggled multiple times between renders. I need to rewrite whole opening animation to get this straight.

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Rudenko
Submit Requirements:
  • 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: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: I6299e0895089b64bfd3d90f485e2d7edff962bf3
Gerrit-Change-Number: 7106268
Gerrit-PatchSet: 12
Gerrit-Owner: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Wolfgang Beyer <wo...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
Gerrit-Comment-Date: Wed, 05 Nov 2025 16:37:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Alex Rudenko <alexr...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Rudenko (Gerrit)

unread,
Nov 5, 2025, 11:38:34 AM (20 hours ago) Nov 5
to Piotr Paulski, Wolfgang Beyer, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Piotr Paulski

Alex Rudenko voted and added 1 comment

Votes added by Alex Rudenko

Code-Review+1

1 comment

File front_end/panels/explain/components/ConsoleInsight.ts
Line 1134, Patchset 10: if (this.#referenceDetailsRef.value) {
Alex Rudenko . resolved

can we do it without a ref by passing a value to onToggleReferenceDetails?

Piotr Paulski

Prefer to fix this in a separate CL: at render time the value is not known, details could be toggled multiple times between renders. I need to rewrite whole opening animation to get this straight.

Alex Rudenko

Acknowledged

Open in Gerrit

Related details

Attention is currently required from:
  • Piotr Paulski
Submit Requirements:
  • 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: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: I6299e0895089b64bfd3d90f485e2d7edff962bf3
Gerrit-Change-Number: 7106268
Gerrit-PatchSet: 12
Gerrit-Owner: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Wolfgang Beyer <wo...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Comment-Date: Wed, 05 Nov 2025 16:38:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Wolfgang Beyer (Gerrit)

unread,
3:58 AM (4 hours ago) 3:58 AM
to Piotr Paulski, Alex Rudenko, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Piotr Paulski

Wolfgang Beyer voted and added 1 comment

Votes added by Wolfgang Beyer

Code-Review+1
Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 13 (Latest):
Wolfgang Beyer . resolved

LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • Piotr Paulski
Submit Requirements:
  • 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: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: I6299e0895089b64bfd3d90f485e2d7edff962bf3
Gerrit-Change-Number: 7106268
Gerrit-PatchSet: 13
Gerrit-Owner: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Wolfgang Beyer <wo...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Comment-Date: Thu, 06 Nov 2025 08:58:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Devtools-frontend LUCI CQ (Gerrit)

unread,
4:00 AM (4 hours ago) 4:00 AM
to Piotr Paulski, Wolfgang Beyer, Alex Rudenko, devtools-rev...@chromium.org

Devtools-frontend LUCI CQ submitted the change

Change information

Commit message:
Extract view from ConsoleInsights

In preparation to applying UI Engineering vision to console insights,
replace all view-like methods with functions outside the component.
Next steps will be to deal with imperative DOM manipulations,
clean up state manipulation, then finally convert to Widget.

Bug: 407751694
Change-Id: I6299e0895089b64bfd3d90f485e2d7edff962bf3
BYPASS_LARGE_CHANGE_WARNING: Simple code move mostly.
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7106268
Auto-Submit: Piotr Paulski <piotrp...@chromium.org>
Reviewed-by: Wolfgang Beyer <wo...@chromium.org>
Reviewed-by: Alex Rudenko <alexr...@chromium.org>
Commit-Queue: Wolfgang Beyer <wo...@chromium.org>
Files:
  • M front_end/panels/explain/components/ConsoleInsight.ts
Change size: L
Delta: 1 file changed, 498 insertions(+), 449 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Alex Rudenko, +1 by Wolfgang Beyer
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: I6299e0895089b64bfd3d90f485e2d7edff962bf3
Gerrit-Change-Number: 7106268
Gerrit-PatchSet: 14
Gerrit-Owner: Piotr Paulski <piotrp...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages