[composebox] Enable pasting images in composebox [chromium/src : main]

1 view
Skip to first unread message

Nihar Majmudar (Gerrit)

unread,
Oct 30, 2025, 8:38:15 PM (6 days ago) Oct 30
to WENHU CHENG, Ananya Seelam, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, dewitt...@chromium.org, oshima...@chromium.org
Attention needed from Ananya Seelam and WENHU CHENG

Nihar Majmudar added 4 comments

Patchset-level comments
File-level comment, Patchset 1:
Nihar Majmudar . resolved

Hey Wenhu left some initial comments. In general I think you should be delegating most of the file handling flow to the process that exists. Looks like you are creating a lot of logic here yourself. Also please add tests to [composebox_test.ts](https://source.chromium.org/chromium/chromium/src/+/main:chrome/test/data/webui/new_tab_page/composebox/composebox_test.ts?q=composebox_test.ts) for this

File ui/webui/resources/cr_components/composebox/composebox.ts
Line 559, Patchset 1: if (!fileToProcess.name) {
const type = fileToProcess.type.split('/')[1] || 'bin';
Object.defineProperty(fileToProcess, 'name', {
value: `Pasted_File_${Date.now()}.${type}`,
});
}
Nihar Majmudar . unresolved

Why are we doing this?

File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
Line 418, Patchset 1: get currentFileCount(): number {
return this.files_.size;
}

get maxFileCount(): number {
return this.maxFileCount_;
}
Nihar Majmudar . unresolved

You don't use these anywhere, can get rid of this (also have access to these variable in this scope)

Line 434, Patchset 1: private validateFile_(file: File, showErrorUI: boolean): boolean {
if (file.size === 0 || file.size > this.maxFileSize_) {
const fileIsEmpty = file.size === 0;
if (showErrorUI) {
this.fire('on-file-validation-error', {
errorMessage: fileIsEmpty ?
this.i18n('composeboxFileUploadInvalidEmptySize') :
this.i18n('composeboxFileUploadInvalidTooLarge'),
});
}
this.recordFileValidationMetric_(
fileIsEmpty ? ComposeboxFileValidationError.FILE_EMPTY :
ComposeboxFileValidationError.FILE_SIZE_TOO_LARGE);
return false;
}

const isImage = file.type.startsWith('image/');
const allowedImageTypes = this.imageFileTypes_.split(',');
const allowedAttachmentTypes = this.attachmentFileTypes_.split(',');

let isValidType = false;

if (isImage) {
isValidType = allowedImageTypes.some(type => {
const trimmedType = type.trim();
if (trimmedType.endsWith('/*')) {
return file.type.startsWith(trimmedType.slice(0, -1));
} else {
return file.type === trimmedType;
}
});
} else {
isValidType = allowedAttachmentTypes.some(type => {
const trimmedType = type.trim();
if (trimmedType.startsWith('.')) {
return file.name.endsWith(trimmedType);
} else if (trimmedType.endsWith('/*')) {
return file.type.startsWith(trimmedType.slice(0, -1));
} else {
return file.type === trimmedType;
}
});
}

if (!isValidType) {
if (showErrorUI) {
this.fire('on-file-validation-error', {
errorMessage: this.i18n('composeboxFileUploadInvalidType'),
});
}
this.recordFileValidationMetric_(ComposeboxFileValidationError.INVALID_TYPE);
return false;
}
Nihar Majmudar . unresolved

Can't this all be handled by `addFileContext`? You might need to check if the max file count is already reached (but it looks like you already handle that in `composebox.ts`, but you shouldn't be handling validating the file and such

Open in Gerrit

Related details

Attention is currently required from:
  • Ananya Seelam
  • WENHU CHENG
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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
Gerrit-Change-Number: 7102276
Gerrit-PatchSet: 1
Gerrit-Owner: WENHU CHENG <wen...@google.com>
Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
Gerrit-CC: James Leung <james...@google.com>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-CC: Peter Williamson <pet...@chromium.org>
Gerrit-Attention: Ananya Seelam <ananya...@google.com>
Gerrit-Attention: WENHU CHENG <wen...@google.com>
Gerrit-Comment-Date: Fri, 31 Oct 2025 00:38:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Ananya Seelam (Gerrit)

unread,
Oct 31, 2025, 9:59:33 AM (5 days ago) Oct 31
to WENHU CHENG, Nihar Majmudar, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, dewitt...@chromium.org, oshima...@chromium.org
Attention needed from WENHU CHENG

Ananya Seelam added 2 comments

File ui/webui/resources/cr_components/composebox/composebox.ts
Line 568, Patchset 2 (Latest): // Pasting multiple files is not supported. Do nothing.
Ananya Seelam . unresolved

In realbox next, you should be able to upload multiple files at once so this case should not be skipped.

File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
Line 491, Patchset 2 (Latest): private fireAddFileContextEvent_(filesToUpload: File[], isImage: boolean) {
Ananya Seelam . unresolved

Can you modify the `addFileContext_` method in this file and remove this method? That way we can reduce code duplication. Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • WENHU CHENG
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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
Gerrit-Change-Number: 7102276
Gerrit-PatchSet: 2
Gerrit-Owner: WENHU CHENG <wen...@google.com>
Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
Gerrit-CC: James Leung <james...@google.com>
Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
Gerrit-CC: Peter Williamson <pet...@chromium.org>
Gerrit-Attention: WENHU CHENG <wen...@google.com>
Gerrit-Comment-Date: Fri, 31 Oct 2025 13:59:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

WENHU CHENG (Gerrit)

unread,
Oct 31, 2025, 7:46:56 PM (5 days ago) Oct 31
to Nihar Majmudar, Ananya Seelam, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, dewitt...@chromium.org, oshima...@chromium.org
Attention needed from Ananya Seelam and Nihar Majmudar

WENHU CHENG added 5 comments

File ui/webui/resources/cr_components/composebox/composebox.ts
Line 559, Patchset 1: if (!fileToProcess.name) {
const type = fileToProcess.type.split('/')[1] || 'bin';
Object.defineProperty(fileToProcess, 'name', {
value: `Pasted_File_${Date.now()}.${type}`,
});
}
Nihar Majmudar . resolved

Why are we doing this?

WENHU CHENG

deleted now , but do we need to handle the egde case if users uploads a nameless file?

Line 568, Patchset 2: // Pasting multiple files is not supported. Do nothing.
Ananya Seelam . resolved

In realbox next, you should be able to upload multiple files at once so this case should not be skipped.

WENHU CHENG

Got it! now the maximum number of pasted files is controlled by maxFileCount_

File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
Line 418, Patchset 1: get currentFileCount(): number {
return this.files_.size;
}

get maxFileCount(): number {
return this.maxFileCount_;
}
Nihar Majmudar . resolved

You don't use these anywhere, can get rid of this (also have access to these variable in this scope)

WENHU CHENG

Done

Nihar Majmudar . resolved

Can't this all be handled by `addFileContext`? You might need to check if the max file count is already reached (but it looks like you already handle that in `composebox.ts`, but you shouldn't be handling validating the file and such

WENHU CHENG

Done

Line 491, Patchset 2: private fireAddFileContextEvent_(filesToUpload: File[], isImage: boolean) {
Ananya Seelam . resolved

Can you modify the `addFileContext_` method in this file and remove this method? That way we can reduce code duplication. Thanks!

WENHU CHENG

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Ananya Seelam
  • Nihar Majmudar
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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
    Gerrit-Change-Number: 7102276
    Gerrit-PatchSet: 3
    Gerrit-Owner: WENHU CHENG <wen...@google.com>
    Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
    Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
    Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
    Gerrit-CC: James Leung <james...@google.com>
    Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
    Gerrit-CC: Peter Williamson <pet...@chromium.org>
    Gerrit-Attention: Nihar Majmudar <nih...@google.com>
    Gerrit-Attention: Ananya Seelam <ananya...@google.com>
    Gerrit-Comment-Date: Fri, 31 Oct 2025 23:46:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Nihar Majmudar <nih...@google.com>
    Comment-In-Reply-To: Ananya Seelam <ananya...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nihar Majmudar (Gerrit)

    unread,
    Nov 2, 2025, 7:31:17 PM (3 days ago) Nov 2
    to WENHU CHENG, Ananya Seelam, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, dewitt...@chromium.org, oshima...@chromium.org
    Attention needed from Ananya Seelam and WENHU CHENG

    Nihar Majmudar added 5 comments

    Patchset-level comments
    File ui/webui/resources/cr_components/composebox/composebox.ts
    Line 547, Patchset 4 (Latest): event.preventDefault();
    event.stopPropagation();
    Nihar Majmudar . unresolved

    Is this needed?

    File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
    Line 62, Patchset 4 (Latest): INVALID_TYPE = 4,
    Nihar Majmudar . unresolved

    Is this used anywhere?

    Line 361, Patchset 4 (Latest): protected processFiles_(files: FileList|File[]|null, isImage: boolean = false) {
    Nihar Majmudar . unresolved

    You shouldn't be changing this data type, FileList is presumably already a wrapper for a `File[]`. Instead make the data you pass in a FileList.

    Line 421, Patchset 4 (Latest): addPastedFiles(files: File[]): void {
    const isImage = files.some(f => f.type.startsWith('image/'));
    this.processFiles_(files, isImage);
    }
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ananya Seelam
    • WENHU CHENG
    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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
      Gerrit-Change-Number: 7102276
      Gerrit-PatchSet: 4
      Gerrit-Owner: WENHU CHENG <wen...@google.com>
      Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
      Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
      Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
      Gerrit-CC: James Leung <james...@google.com>
      Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
      Gerrit-CC: Peter Williamson <pet...@chromium.org>
      Gerrit-Attention: Ananya Seelam <ananya...@google.com>
      Gerrit-Attention: WENHU CHENG <wen...@google.com>
      Gerrit-Comment-Date: Mon, 03 Nov 2025 00:31:11 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      WENHU CHENG (Gerrit)

      unread,
      Nov 3, 2025, 7:12:58 PM (2 days ago) Nov 3
      to Nihar Majmudar, Ananya Seelam, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
      Attention needed from Ananya Seelam and Nihar Majmudar

      WENHU CHENG added 5 comments

      Patchset-level comments
      File-level comment, Patchset 4:
      Nihar Majmudar . resolved
      WENHU CHENG

      Done

      File ui/webui/resources/cr_components/composebox/composebox.ts
      Line 547, Patchset 4: event.preventDefault();
      event.stopPropagation();
      Nihar Majmudar . resolved

      Is this needed?

      WENHU CHENG

      delete the event.stopPropagation();, but event.preventDefault() is still needed to prevent the name of the file is automatically pasted in the composebox?

      File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
      Line 62, Patchset 4: INVALID_TYPE = 4,
      Nihar Majmudar . resolved

      Is this used anywhere?

      WENHU CHENG

      it was used when i try to handle the error by my own code, but now it is no longer needed because i would just use the existing function to handle it.

      Line 361, Patchset 4: protected processFiles_(files: FileList|File[]|null, isImage: boolean = false) {
      Nihar Majmudar . resolved

      You shouldn't be changing this data type, FileList is presumably already a wrapper for a `File[]`. Instead make the data you pass in a FileList.

      WENHU CHENG

      Done

      Line 421, Patchset 4: addPastedFiles(files: File[]): void {

      const isImage = files.some(f => f.type.startsWith('image/'));
      this.processFiles_(files, isImage);
      }
      Nihar Majmudar . resolved
      WENHU CHENG

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ananya Seelam
      • Nihar Majmudar
      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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
        Gerrit-Change-Number: 7102276
        Gerrit-PatchSet: 5
        Gerrit-Owner: WENHU CHENG <wen...@google.com>
        Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
        Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
        Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
        Gerrit-CC: James Leung <james...@google.com>
        Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
        Gerrit-CC: Peter Williamson <pet...@chromium.org>
        Gerrit-Attention: Nihar Majmudar <nih...@google.com>
        Gerrit-Attention: Ananya Seelam <ananya...@google.com>
        Gerrit-Comment-Date: Tue, 04 Nov 2025 00:12:49 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Nihar Majmudar <nih...@google.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Nihar Majmudar (Gerrit)

        unread,
        Nov 4, 2025, 11:04:44 AM (yesterday) Nov 4
        to WENHU CHENG, Ananya Seelam, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
        Attention needed from Ananya Seelam and WENHU CHENG

        Nihar Majmudar added 7 comments

        Patchset-level comments
        File-level comment, Patchset 5 (Latest):
        Nihar Majmudar . resolved

        Looking good! Some small comments

        Commit Message
        Line 11, Patchset 5 (Latest):
        Nihar Majmudar . unresolved

        Can you add a note in the CL that this `isImage` bug will be fixed in a subsequent CL

        File chrome/test/data/webui/new_tab_page/composebox/composebox_test.ts
        Line 1981, Patchset 5 (Latest): const errorEvent = await errorEventPromise;
        img: assertEquals(
        Nihar Majmudar . unresolved

        Please run `git cl format --js`. The `img:` here seems out of place and same for the `H:` below.

        Line 2009, Patchset 5 (Latest):Note: // Assert.
        Nihar Majmudar . unresolved

        Should this be in the comment?

        File ui/webui/resources/cr_components/composebox/composebox.ts
        Line 558, Patchset 5 (Latest): const dataTransfer = new DataTransfer();
        for (const file of pastedFiles) {
        dataTransfer.items.add(file);
        }
        const fileList: FileList = dataTransfer.files;
        Nihar Majmudar . unresolved

        Can't this all be done in the for loop above, that way we don't have to loop through all the files twice. Then you can just check if the size of the fileList is > 0, you can call `addFiles`

        Line 564, Patchset 5 (Latest): if (pastedFiles.length > 0) {
        Nihar Majmudar . unresolved

        Isn't this already implicitly true from the check above `(pastedFiles.length === 0)`

        File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
        Line 227, Patchset 5 (Latest): const isImage =
        !!files && Array.from(files).some(f => f.type.startsWith('image/'));
        Nihar Majmudar . unresolved

        Add TODO with bug number here to fix this.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ananya Seelam
        • WENHU CHENG
        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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
          Gerrit-Change-Number: 7102276
          Gerrit-PatchSet: 5
          Gerrit-Owner: WENHU CHENG <wen...@google.com>
          Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
          Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
          Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
          Gerrit-CC: James Leung <james...@google.com>
          Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
          Gerrit-CC: Peter Williamson <pet...@chromium.org>
          Gerrit-Attention: Ananya Seelam <ananya...@google.com>
          Gerrit-Attention: WENHU CHENG <wen...@google.com>
          Gerrit-Comment-Date: Tue, 04 Nov 2025 16:04:38 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Dhruv Kathpalia (Gerrit)

          unread,
          Nov 4, 2025, 1:21:27 PM (yesterday) Nov 4
          to WENHU CHENG, Nihar Majmudar, Ananya Seelam, James Leung, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
          Attention needed from Ananya Seelam and WENHU CHENG

          Dhruv Kathpalia added 1 comment

          File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
          Line 369, Patchset 6 (Latest): if (!files || files.length === 0) {
          return;
          }
          const incomingFileCount = files.length;
          if ((this.files_.size + incomingFileCount) > this.maxFileCount_) {
          this.recordFileValidationMetric_(
          ComposeboxFileValidationError.TOO_MANY_FILES);
          return;
          }
          Dhruv Kathpalia . unresolved

          @nih...@google.com Should we change the File validation error metric here in the case of 0 files? I have filed a bug for it right now to add a separate metric category for no files. b:457494452

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ananya Seelam
          • WENHU CHENG
          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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
          Gerrit-Change-Number: 7102276
          Gerrit-PatchSet: 6
          Gerrit-Owner: WENHU CHENG <wen...@google.com>
          Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
          Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
          Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
          Gerrit-CC: James Leung <james...@google.com>
          Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
          Gerrit-CC: Peter Williamson <pet...@chromium.org>
          Gerrit-Attention: Ananya Seelam <ananya...@google.com>
          Gerrit-Attention: WENHU CHENG <wen...@google.com>
          Gerrit-Comment-Date: Tue, 04 Nov 2025 18:21:18 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          WENHU CHENG (Gerrit)

          unread,
          Nov 4, 2025, 3:12:37 PM (yesterday) Nov 4
          to Nihar Majmudar, Ananya Seelam, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
          Attention needed from Ananya Seelam, Dhruv Kathpalia and Nihar Majmudar

          WENHU CHENG added 7 comments

          Commit Message
          Line 11, Patchset 5:
          Nihar Majmudar . resolved

          Can you add a note in the CL that this `isImage` bug will be fixed in a subsequent CL

          WENHU CHENG

          Done

          File chrome/test/data/webui/new_tab_page/composebox/composebox_test.ts
          Line 1981, Patchset 5: const errorEvent = await errorEventPromise;
          img: assertEquals(
          Nihar Majmudar . resolved

          Please run `git cl format --js`. The `img:` here seems out of place and same for the `H:` below.

          WENHU CHENG

          Done

          Line 2009, Patchset 5:Note: // Assert.
          Nihar Majmudar . resolved

          Should this be in the comment?

          WENHU CHENG

          Done

          File ui/webui/resources/cr_components/composebox/composebox.ts
          Line 558, Patchset 5: const dataTransfer = new DataTransfer();

          for (const file of pastedFiles) {
          dataTransfer.items.add(file);
          }
          const fileList: FileList = dataTransfer.files;
          Nihar Majmudar . resolved

          Can't this all be done in the for loop above, that way we don't have to loop through all the files twice. Then you can just check if the size of the fileList is > 0, you can call `addFiles`

          WENHU CHENG

          Really good advice! Thank you !

          Line 564, Patchset 5: if (pastedFiles.length > 0) {
          Nihar Majmudar . resolved

          Isn't this already implicitly true from the check above `(pastedFiles.length === 0)`

          WENHU CHENG

          Done

          File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
          Line 227, Patchset 5: const isImage =

          !!files && Array.from(files).some(f => f.type.startsWith('image/'));
          Nihar Majmudar . resolved

          Add TODO with bug number here to fix this.

          WENHU CHENG

          Done

          Line 369, Patchset 6: if (!files || files.length === 0) {

          return;
          }
          const incomingFileCount = files.length;
          if ((this.files_.size + incomingFileCount) > this.maxFileCount_) {
          this.recordFileValidationMetric_(
          ComposeboxFileValidationError.TOO_MANY_FILES);
          return;
          }
          Dhruv Kathpalia . resolved

          @nih...@google.com Should we change the File validation error metric here in the case of 0 files? I have filed a bug for it right now to add a separate metric category for no files. b:457494452

          WENHU CHENG

          Dhruv will update this in his CL

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ananya Seelam
          • Dhruv Kathpalia
          • Nihar Majmudar
          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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
            Gerrit-Change-Number: 7102276
            Gerrit-PatchSet: 7
            Gerrit-Owner: WENHU CHENG <wen...@google.com>
            Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
            Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
            Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
            Gerrit-CC: James Leung <james...@google.com>
            Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
            Gerrit-CC: Peter Williamson <pet...@chromium.org>
            Gerrit-Attention: Nihar Majmudar <nih...@google.com>
            Gerrit-Attention: Ananya Seelam <ananya...@google.com>
            Gerrit-Attention: Dhruv Kathpalia <dhruvka...@google.com>
            Gerrit-Comment-Date: Tue, 04 Nov 2025 20:12:27 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Nihar Majmudar <nih...@google.com>
            Comment-In-Reply-To: Dhruv Kathpalia <dhruvka...@google.com>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Nihar Majmudar (Gerrit)

            unread,
            Nov 4, 2025, 4:35:30 PM (23 hours ago) Nov 4
            to WENHU CHENG, Chromium LUCI CQ, Ananya Seelam, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
            Attention needed from Ananya Seelam, Dhruv Kathpalia and WENHU CHENG

            Nihar Majmudar voted and added 7 comments

            Votes added by Nihar Majmudar

            Code-Review+1

            7 comments

            Patchset-level comments
            File-level comment, Patchset 8 (Latest):
            Nihar Majmudar . resolved

            LGTM

            File chrome/test/data/webui/new_tab_page/composebox/composebox_test.ts
            Line 524, Patchset 8 (Latest): loadTimeData.overrideValues({composeboxFileMaxCount: 5});
            Nihar Majmudar . unresolved

            Why is this needed here, you're not changing the test at all?

            Line 1953, Patchset 8 (Latest): 1 /* ComposeboxFileValidationError.TOO_MANY_FILES */));
            Nihar Majmudar . unresolved

            nit: can we use the enum here or no?

            File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
            Line 226, Patchset 8 (Latest): addFiles(files: FileList |null) {
            Nihar Majmudar . unresolved

            remove space

            Line 227, Patchset 8 (Latest): // TODO: crbug.com/457182498 - Update isImage logic to handle mixed file types
            Nihar Majmudar . unresolved

            nit: TODO(crbug.com/457182498): Update isImage logic to handle mixed file types.

            Line 370, Patchset 8 (Latest): if (!files || files.length === 0) {
            return;
            }
            Nihar Majmudar . unresolved

            nit: format this correctly.

            Line 373, Patchset 8 (Latest): const incomingFileCount = files.length;
            Nihar Majmudar . unresolved

            nit: variable not needed since it's only used, can just use files.length below.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Ananya Seelam
            • Dhruv Kathpalia
            • WENHU CHENG
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement is not 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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
            Gerrit-Change-Number: 7102276
            Gerrit-PatchSet: 8
            Gerrit-Owner: WENHU CHENG <wen...@google.com>
            Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
            Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
            Gerrit-Reviewer: WENHU CHENG <wen...@google.com>
            Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
            Gerrit-CC: James Leung <james...@google.com>
            Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
            Gerrit-CC: Peter Williamson <pet...@chromium.org>
            Gerrit-Attention: Ananya Seelam <ananya...@google.com>
            Gerrit-Attention: WENHU CHENG <wen...@google.com>
            Gerrit-Attention: Dhruv Kathpalia <dhruvka...@google.com>
            Gerrit-Comment-Date: Tue, 04 Nov 2025 21:35:24 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            WENHU CHENG (Gerrit)

            unread,
            Nov 4, 2025, 7:29:39 PM (20 hours ago) Nov 4
            to Nihar Majmudar, Chromium LUCI CQ, Ananya Seelam, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
            Attention needed from Ananya Seelam and Nihar Majmudar

            WENHU CHENG added 6 comments

            File chrome/test/data/webui/new_tab_page/composebox/composebox_test.ts
            Line 524, Patchset 8: loadTimeData.overrideValues({composeboxFileMaxCount: 5});
            Nihar Majmudar . resolved

            Why is this needed here, you're not changing the test at all?

            WENHU CHENG

            yeah i confirmed with Dhruv and Hanna, it turns out the original function of processed_files was flawed and I made it correct with my cl(which checking the incoming files too, originally it just checked the files that are already there), so we need to set composeboxFileMaxCount bigger than 5 here or it will fail the test.

            Line 1953, Patchset 8: 1 /* ComposeboxFileValidationError.TOO_MANY_FILES */));
            Nihar Majmudar . resolved

            nit: can we use the enum here or no?

            WENHU CHENG
            const enum ComposeboxFileValidationError {
            NONE = 0,
            TOO_MANY_FILES = 1,
            FILE_EMPTY = 2,
            FILE_SIZE_TOO_LARGE = 3,
            MAX_VALUE = FILE_SIZE_TOO_LARGE,
            }from ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
            File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
            Line 226, Patchset 8: addFiles(files: FileList |null) {
            Nihar Majmudar . resolved

            remove space

            WENHU CHENG

            Done

            Line 227, Patchset 8: // TODO: crbug.com/457182498 - Update isImage logic to handle mixed file types
            Nihar Majmudar . resolved

            nit: TODO(crbug.com/457182498): Update isImage logic to handle mixed file types.

            WENHU CHENG

            Done

            Line 370, Patchset 8: if (!files || files.length === 0) {
            return;
            }
            Nihar Majmudar . resolved

            nit: format this correctly.

            WENHU CHENG

            Done

            Line 373, Patchset 8: const incomingFileCount = files.length;
            Nihar Majmudar . resolved

            nit: variable not needed since it's only used, can just use files.length below.

            WENHU CHENG

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Ananya Seelam
            • Nihar Majmudar
            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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
              Gerrit-Change-Number: 7102276
              Gerrit-PatchSet: 9
              Gerrit-Owner: WENHU CHENG <wen...@google.com>
              Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
              Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
              Gerrit-Reviewer: WENHU CHENG <wen...@google.com>
              Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
              Gerrit-CC: James Leung <james...@google.com>
              Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
              Gerrit-CC: Peter Williamson <pet...@chromium.org>
              Gerrit-Attention: Nihar Majmudar <nih...@google.com>
              Gerrit-Attention: Ananya Seelam <ananya...@google.com>
              Gerrit-Comment-Date: Wed, 05 Nov 2025 00:29:29 +0000
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Ananya Seelam (Gerrit)

              unread,
              Nov 4, 2025, 8:12:43 PM (19 hours ago) Nov 4
              to WENHU CHENG, Nihar Majmudar, Chromium LUCI CQ, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
              Attention needed from Nihar Majmudar and WENHU CHENG

              Ananya Seelam voted and added 2 comments

              Votes added by Ananya Seelam

              Code-Review+1

              2 comments

              Patchset-level comments
              File-level comment, Patchset 9 (Latest):
              Ananya Seelam . resolved

              lgtm!

              File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
              Line 227, Patchset 9 (Latest): // TODO(crbug.com/457182498):update isImage logic to handle mixed file types
              Ananya Seelam . unresolved

              nit: add period to end of comments.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Nihar Majmudar
              • WENHU CHENG
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement satisfiedCode-Owners
                • requirement is not 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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
                Gerrit-Change-Number: 7102276
                Gerrit-PatchSet: 9
                Gerrit-Owner: WENHU CHENG <wen...@google.com>
                Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
                Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
                Gerrit-Reviewer: WENHU CHENG <wen...@google.com>
                Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
                Gerrit-CC: James Leung <james...@google.com>
                Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
                Gerrit-CC: Peter Williamson <pet...@chromium.org>
                Gerrit-Attention: Nihar Majmudar <nih...@google.com>
                Gerrit-Attention: WENHU CHENG <wen...@google.com>
                Gerrit-Comment-Date: Wed, 05 Nov 2025 01:12:35 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                WENHU CHENG (Gerrit)

                unread,
                2:26 AM (13 hours ago) 2:26 AM
                to Ananya Seelam, Nihar Majmudar, Chromium LUCI CQ, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
                Attention needed from Ananya Seelam and Nihar Majmudar

                WENHU CHENG added 1 comment

                File ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
                Line 227, Patchset 9: // TODO(crbug.com/457182498):update isImage logic to handle mixed file types
                Ananya Seelam . resolved

                nit: add period to end of comments.

                WENHU CHENG

                Done

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Ananya Seelam
                • Nihar Majmudar
                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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
                  Gerrit-Change-Number: 7102276
                  Gerrit-PatchSet: 10
                  Gerrit-Owner: WENHU CHENG <wen...@google.com>
                  Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
                  Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
                  Gerrit-Reviewer: WENHU CHENG <wen...@google.com>
                  Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
                  Gerrit-CC: James Leung <james...@google.com>
                  Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
                  Gerrit-CC: Peter Williamson <pet...@chromium.org>
                  Gerrit-Attention: Ananya Seelam <ananya...@google.com>
                  Gerrit-Attention: Nihar Majmudar <nih...@google.com>
                  Gerrit-Comment-Date: Wed, 05 Nov 2025 07:26:21 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Ananya Seelam <ananya...@google.com>
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Ananya Seelam (Gerrit)

                  unread,
                  10:03 AM (5 hours ago) 10:03 AM
                  to WENHU CHENG, Nihar Majmudar, Chromium LUCI CQ, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
                  Attention needed from Nihar Majmudar and WENHU CHENG

                  Ananya Seelam voted and added 1 comment

                  Votes added by Ananya Seelam

                  Code-Review+1

                  1 comment

                  Patchset-level comments
                  Ananya Seelam . resolved

                  lgtm!

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Nihar Majmudar
                  • WENHU CHENG
                  Submit Requirements:
                    • requirement satisfiedCode-Coverage
                    • requirement satisfiedCode-Owners
                    • requirement is not 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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
                    Gerrit-Change-Number: 7102276
                    Gerrit-PatchSet: 10
                    Gerrit-Owner: WENHU CHENG <wen...@google.com>
                    Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
                    Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
                    Gerrit-Reviewer: WENHU CHENG <wen...@google.com>
                    Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
                    Gerrit-CC: James Leung <james...@google.com>
                    Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
                    Gerrit-CC: Peter Williamson <pet...@chromium.org>
                    Gerrit-Attention: Nihar Majmudar <nih...@google.com>
                    Gerrit-Attention: WENHU CHENG <wen...@google.com>
                    Gerrit-Comment-Date: Wed, 05 Nov 2025 15:01:37 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: Yes
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy

                    Nihar Majmudar (Gerrit)

                    unread,
                    10:45 AM (5 hours ago) 10:45 AM
                    to WENHU CHENG, Ananya Seelam, Chromium LUCI CQ, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
                    Attention needed from WENHU CHENG

                    Nihar Majmudar voted and added 1 comment

                    Votes added by Nihar Majmudar

                    Code-Review+1

                    1 comment

                    Patchset-level comments
                    Nihar Majmudar . resolved

                    LGTM, thanks Wenhu!

                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • WENHU CHENG
                    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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
                      Gerrit-Change-Number: 7102276
                      Gerrit-PatchSet: 10
                      Gerrit-Owner: WENHU CHENG <wen...@google.com>
                      Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
                      Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
                      Gerrit-Reviewer: WENHU CHENG <wen...@google.com>
                      Gerrit-CC: Dhruv Kathpalia <dhruvka...@google.com>
                      Gerrit-CC: James Leung <james...@google.com>
                      Gerrit-CC: Moe Ahmadi <mah...@chromium.org>
                      Gerrit-CC: Peter Williamson <pet...@chromium.org>
                      Gerrit-Attention: WENHU CHENG <wen...@google.com>
                      Gerrit-Comment-Date: Wed, 05 Nov 2025 15:45:21 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: Yes
                      satisfied_requirement
                      open
                      diffy

                      Nihar Majmudar (Gerrit)

                      unread,
                      10:45 AM (5 hours ago) 10:45 AM
                      to WENHU CHENG, Ananya Seelam, Chromium LUCI CQ, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org
                      Attention needed from WENHU CHENG

                      Nihar Majmudar voted Commit-Queue+2

                      Commit-Queue+2
                      Gerrit-Comment-Date: Wed, 05 Nov 2025 15:45:33 +0000
                      Gerrit-HasComments: No
                      Gerrit-Has-Labels: Yes
                      satisfied_requirement
                      open
                      diffy

                      Chromium LUCI CQ (Gerrit)

                      unread,
                      12:11 PM (3 hours ago) 12:11 PM
                      to WENHU CHENG, Nihar Majmudar, Ananya Seelam, James Leung, Dhruv Kathpalia, AyeAye, chromium...@chromium.org, Peter Williamson, omnibox-...@chromium.org, niharm...@google.com, ananyasee...@google.com, dewitt...@chromium.org, oshima...@chromium.org

                      Chromium LUCI CQ submitted the change

                      Change information

                      Commit message:
                      [composebox] Enable pasting images in composebox

                      Pasting files (e.g., images, PDFs) into the composebox with Ctrl-V did
                      not work. This CL enables this feature.

                      A relevant CL to fix the bug about `processFiles` isImage parameter https://buganizer.corp.google.com/issues/457182498 will be uploaded subsequently

                      Screencasts:

                      Image paste -
                      https://screencast.googleplex.com/cast/NjQwNDM3MzI4MTI0MzEzNnw5ODY4NDFiMC1iZg
                      PDF paste -
                      https://screencast.googleplex.com/cast/NTM4NDg5OTgyODY0NTg4OHxmMzUxMDI5MS00NQ
                      Bug: 446643075
                      Change-Id: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
                      Commit-Queue: Nihar Majmudar <nih...@google.com>
                      Reviewed-by: Nihar Majmudar <nih...@google.com>
                      Reviewed-by: Ananya Seelam <ananya...@google.com>
                      Cr-Commit-Position: refs/heads/main@{#1540689}
                      Files:
                      • M chrome/test/data/webui/new_tab_page/composebox/composebox_test.ts
                      • M ui/webui/resources/cr_components/composebox/composebox.html.ts
                      • M ui/webui/resources/cr_components/composebox/composebox.ts
                      • M ui/webui/resources/cr_components/composebox/contextual_entrypoint_and_carousel.ts
                      Change size: M
                      Delta: 4 files changed, 169 insertions(+), 6 deletions(-)
                      Branch: refs/heads/main
                      Submit Requirements:
                      • requirement satisfiedCode-Review: +1 by Nihar Majmudar, +1 by Ananya Seelam
                      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: I558eefe62fff09d64d9f88dc4d07a1803a6b2ec9
                      Gerrit-Change-Number: 7102276
                      Gerrit-PatchSet: 11
                      Gerrit-Owner: WENHU CHENG <wen...@google.com>
                      Gerrit-Reviewer: Ananya Seelam <ananya...@google.com>
                      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                      Gerrit-Reviewer: Nihar Majmudar <nih...@google.com>
                      Gerrit-Reviewer: WENHU CHENG <wen...@google.com>
                      open
                      diffy
                      satisfied_requirement
                      Reply all
                      Reply to author
                      Forward
                      0 new messages