Support Tool: Migrate url-generator to Lit [chromium/src : main]

0 views
Skip to first unread message

Rebekah Potter (Gerrit)

unread,
Jan 13, 2026, 7:04:07 PM (yesterday) Jan 13
to Demetrios Papadopoulos, Irem Uguz, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Demetrios Papadopoulos and Irem Uguz

Rebekah Potter voted and added 1 comment

Votes added by Rebekah Potter

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Rebekah Potter . resolved

dpapad@ for Lit migration context, iremuguz@ as code OWNER.

Open in Gerrit

Related details

Attention is currently required from:
  • Demetrios Papadopoulos
  • Irem Uguz
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: I7fada58e7c04cfd965709830294009c2a5a1da09
Gerrit-Change-Number: 7455362
Gerrit-PatchSet: 4
Gerrit-Owner: Rebekah Potter <rbpo...@chromium.org>
Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Reviewer: Irem Uguz <irem...@google.com>
Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
Gerrit-Attention: Demetrios Papadopoulos <dpa...@chromium.org>
Gerrit-Attention: Irem Uguz <irem...@google.com>
Gerrit-Comment-Date: Wed, 14 Jan 2026 00:03:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Demetrios Papadopoulos (Gerrit)

unread,
Jan 13, 2026, 7:53:29 PM (yesterday) Jan 13
to Rebekah Potter, Irem Uguz, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Irem Uguz and Rebekah Potter

Demetrios Papadopoulos voted and added 7 comments

Votes added by Demetrios Papadopoulos

Code-Review+1

7 comments

Patchset-level comments
Demetrios Papadopoulos . resolved

LGTM with a couple nits and some minor questions.

File chrome/browser/resources/support_tool/url_generator.ts
Line 88, Patchset 4 (Latest): private hasDataCollectorSelected(): boolean {
return this.dataCollectors_.some(collector => collector.isIncluded);
}
Demetrios Papadopoulos . unresolved

Nit: Can probably inline this at line 85 directly now that is just a single line anyway?

Line 122, Patchset 4 (Latest): protected onCopyUrlClick_() {
this.browserProxy_.generateCustomizedUrl(this.caseId_, this.dataCollectors_)
.then(this.onUrlGenerationResult_.bind(this));
}

protected onCopyTokenClick_() {
this.browserProxy_.generateSupportToken(this.dataCollectors_)
.then(this.onTokenGenerationResult_.bind(this));
}
Demetrios Papadopoulos . unresolved

Optional: Use async/await?

Line 142, Patchset 4 (Latest): this.dataCollectors_ = this.dataCollectors_.map(
item => ({...item, isIncluded: this.selectAll_}));
Demetrios Papadopoulos . unresolved

Optional: Not sure if we have a preferred approach between the "immutable data pattern" or "mutate in-place and call `requestUpdate()`" approaches. Alternatively this could be as follows

```suggestion
for (const collector of this.dataCollectors_) {
collector.isIncluded = this.selectAll_;
}
this.requestUpdate();
```
Line 144, Patchset 4 (Latest): this.onDataCollectorItemChange_();
Demetrios Papadopoulos . unresolved

Having to call this manually is a bit against Lit reactive properties main philosophy of "reacting" to other state changes? Does this better belong as an "observer" in `willUpdate()` (possibly **not** guarded by any `changedProperties.has(...)` check to allow updating even when in-place updates happen) ?

Line 151, Patchset 4 (Latest): this.onDataCollectorItemChange_();
Demetrios Papadopoulos . unresolved

Same question here about whether calling this manually is aligned with Lit's philosophy.

File chrome/test/data/webui/support_tool/support_tool_test.ts
Line 348, Patchset 4 (Latest): const copyLinkButton = urlGenerator.shadowRoot.getElementById(
'copyURLButton')! as CrButtonElement;
Demetrios Papadopoulos . unresolved

Let's change to `querySelector<TypeGoesHere>(...)` instead (here and elsewhere)?

Open in Gerrit

Related details

Attention is currently required from:
  • Irem Uguz
  • Rebekah Potter
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: I7fada58e7c04cfd965709830294009c2a5a1da09
    Gerrit-Change-Number: 7455362
    Gerrit-PatchSet: 4
    Gerrit-Owner: Rebekah Potter <rbpo...@chromium.org>
    Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
    Gerrit-Reviewer: Irem Uguz <irem...@google.com>
    Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
    Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
    Gerrit-Attention: Irem Uguz <irem...@google.com>
    Gerrit-Comment-Date: Wed, 14 Jan 2026 00:53:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Rebekah Potter (Gerrit)

    unread,
    3:40 PM (8 hours ago) 3:40 PM
    to Demetrios Papadopoulos, Irem Uguz, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Irem Uguz

    Rebekah Potter voted and added 6 comments

    Votes added by Rebekah Potter

    Commit-Queue+1

    6 comments

    File chrome/browser/resources/support_tool/url_generator.ts
    Line 88, Patchset 4: private hasDataCollectorSelected(): boolean {
    return this.dataCollectors_.some(collector => collector.isIncluded);
    }
    Demetrios Papadopoulos . resolved

    Nit: Can probably inline this at line 85 directly now that is just a single line anyway?

    Rebekah Potter

    Done

    Line 122, Patchset 4: protected onCopyUrlClick_() {

    this.browserProxy_.generateCustomizedUrl(this.caseId_, this.dataCollectors_)
    .then(this.onUrlGenerationResult_.bind(this));
    }

    protected onCopyTokenClick_() {
    this.browserProxy_.generateSupportToken(this.dataCollectors_)
    .then(this.onTokenGenerationResult_.bind(this));
    }
    Demetrios Papadopoulos . resolved

    Optional: Use async/await?

    Rebekah Potter

    Done

    Line 142, Patchset 4: this.dataCollectors_ = this.dataCollectors_.map(

    item => ({...item, isIncluded: this.selectAll_}));
    Demetrios Papadopoulos . resolved

    Optional: Not sure if we have a preferred approach between the "immutable data pattern" or "mutate in-place and call `requestUpdate()`" approaches. Alternatively this could be as follows

    ```suggestion
    for (const collector of this.dataCollectors_) {
    collector.isIncluded = this.selectAll_;
    }
    this.requestUpdate();
    ```
    Rebekah Potter

    Done. I think it should be consistent and we do modify in place elsewhere in this file.

    I've removed the requestUpdate() call since this is only called from within willUpdate().

    Line 144, Patchset 4: this.onDataCollectorItemChange_();
    Demetrios Papadopoulos . resolved

    Having to call this manually is a bit against Lit reactive properties main philosophy of "reacting" to other state changes? Does this better belong as an "observer" in `willUpdate()` (possibly **not** guarded by any `changedProperties.has(...)` check to allow updating even when in-place updates happen) ?

    Rebekah Potter

    Done

    Line 151, Patchset 4: this.onDataCollectorItemChange_();
    Demetrios Papadopoulos . resolved

    Same question here about whether calling this manually is aligned with Lit's philosophy.

    Rebekah Potter

    Done

    File chrome/test/data/webui/support_tool/support_tool_test.ts
    Line 348, Patchset 4: const copyLinkButton = urlGenerator.shadowRoot.getElementById(
    'copyURLButton')! as CrButtonElement;
    Demetrios Papadopoulos . resolved

    Let's change to `querySelector<TypeGoesHere>(...)` instead (here and elsewhere)?

    Rebekah Potter

    it's not conditionally rendered, so I added it to the interface instead. Same for caseIdInput below.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Irem Uguz
    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: I7fada58e7c04cfd965709830294009c2a5a1da09
      Gerrit-Change-Number: 7455362
      Gerrit-PatchSet: 6
      Gerrit-Owner: Rebekah Potter <rbpo...@chromium.org>
      Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
      Gerrit-Reviewer: Irem Uguz <irem...@google.com>
      Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
      Gerrit-Attention: Irem Uguz <irem...@google.com>
      Gerrit-Comment-Date: Wed, 14 Jan 2026 20:40:04 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Demetrios Papadopoulos <dpa...@chromium.org>
      satisfied_requirement
      open
      diffy

      Demetrios Papadopoulos (Gerrit)

      unread,
      4:49 PM (6 hours ago) 4:49 PM
      to Rebekah Potter, Irem Uguz, Chromium LUCI CQ, chromium...@chromium.org
      Attention needed from Irem Uguz and Rebekah Potter

      Demetrios Papadopoulos voted and added 1 comment

      Votes added by Demetrios Papadopoulos

      Code-Review+1

      1 comment

      File chrome/browser/resources/support_tool/url_generator.ts
      Line 143, Patchset 6 (Latest): }
      Demetrios Papadopoulos . unresolved

      `this.requestUpdate()` call missing?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Irem Uguz
      • Rebekah Potter
      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: I7fada58e7c04cfd965709830294009c2a5a1da09
        Gerrit-Change-Number: 7455362
        Gerrit-PatchSet: 6
        Gerrit-Owner: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
        Gerrit-Reviewer: Irem Uguz <irem...@google.com>
        Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Attention: Irem Uguz <irem...@google.com>
        Gerrit-Comment-Date: Wed, 14 Jan 2026 21:49:22 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Rebekah Potter (Gerrit)

        unread,
        7:35 PM (4 hours ago) 7:35 PM
        to Demetrios Papadopoulos, Irem Uguz, Chromium LUCI CQ, chromium...@chromium.org
        Attention needed from Demetrios Papadopoulos and Irem Uguz

        Rebekah Potter added 1 comment

        File chrome/browser/resources/support_tool/url_generator.ts
        Demetrios Papadopoulos . unresolved

        `this.requestUpdate()` call missing?

        Rebekah Potter

        This is only called from within willUpdate(), so I think this should be unnecessary (the element is already about to render); WDYT?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Demetrios Papadopoulos
        • Irem Uguz
        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: I7fada58e7c04cfd965709830294009c2a5a1da09
        Gerrit-Change-Number: 7455362
        Gerrit-PatchSet: 6
        Gerrit-Owner: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
        Gerrit-Reviewer: Irem Uguz <irem...@google.com>
        Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Attention: Demetrios Papadopoulos <dpa...@chromium.org>
        Gerrit-Attention: Irem Uguz <irem...@google.com>
        Gerrit-Comment-Date: Thu, 15 Jan 2026 00:35:29 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Demetrios Papadopoulos <dpa...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Demetrios Papadopoulos (Gerrit)

        unread,
        7:39 PM (4 hours ago) 7:39 PM
        to Rebekah Potter, Irem Uguz, Chromium LUCI CQ, chromium...@chromium.org
        Attention needed from Irem Uguz and Rebekah Potter

        Demetrios Papadopoulos added 1 comment

        File chrome/browser/resources/support_tool/url_generator.ts
        Demetrios Papadopoulos . unresolved

        `this.requestUpdate()` call missing?

        Rebekah Potter

        This is only called from within willUpdate(), so I think this should be unnecessary (the element is already about to render); WDYT?

        Demetrios Papadopoulos

        Ah I see, didn't realize that, and since it was named 'on...' I assumed was an event listener.
        Optional: Maybe inline this in `willUpdate()` since it is not called anywhere else? This would reduce some of the indirection that led to my confusion.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Irem Uguz
        • Rebekah Potter
        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: I7fada58e7c04cfd965709830294009c2a5a1da09
        Gerrit-Change-Number: 7455362
        Gerrit-PatchSet: 6
        Gerrit-Owner: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Reviewer: Demetrios Papadopoulos <dpa...@chromium.org>
        Gerrit-Reviewer: Irem Uguz <irem...@google.com>
        Gerrit-Reviewer: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Attention: Rebekah Potter <rbpo...@chromium.org>
        Gerrit-Attention: Irem Uguz <irem...@google.com>
        Gerrit-Comment-Date: Thu, 15 Jan 2026 00:38:56 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Demetrios Papadopoulos <dpa...@chromium.org>
        Comment-In-Reply-To: Rebekah Potter <rbpo...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages