Skip to content

Web Browser Tests intermittently time out in reply deletion keyboard flow #43828

Closed

Description

@hyoban

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

Source commit f7ee0bee66463979d738cd5f72a731e25f7dbe6f, the merge-queue candidate for #43826 on main at 2f20c7d958001704198dcd027ea40a39bf9e4dff (2026-10-10).

Cloud or Self Hosted

Self Hosted (Source) — GitHub Actions browser component tests; no deployed application is involved.

Steps to reproduce

  1. Run the Web Browser Tests job with Chromium on depot-ubuntu-24.04-4, using the repository's normal dependency setup and Playwright Chromium installation.
  2. From web/, run vp test run --project browser --silent=passed-only.
  3. Observe the test keeps reply deletion pending through refetch and restores focus to the input after the reply disappears in app/components/workflow/comment/reply-deletion.browser.spec.tsx.

This is an observed intermittent failure, not a deterministic local reproduction. The merge-queue job failed, while the preceding PR job passed. The queue candidate and PR head a1de3b7ea924797f760296cc0a2170a723efc34b have the exact same Git tree: e80dfd62b984a6462039f515adc8b7da0284b8a2.

✔️ Expected Behavior

The keyboard flow opens reply actions, selects Delete, and opens its confirmation dialog. The test can then verify pending deletion/refetch behavior and focus restoration reliably.

❌ Actual Behavior

The browser suite finished with 166 passed / 1 failed. The failed test never found the confirmation button and timed out at line 156:

TimeoutError: locator.click: Timeout 14685ms exceeded.
Call log:
  - waiting for locator('[data-vitest="true"]').contentFrame()
      .getByTestId('__vitest_0__').getByRole('alertdialog')
      .getByRole('button', { name: 'common.operation.delete', exact: true })

This propagated to the required Web Tests check and failed the merge-queue run. All coverage upload steps succeeded; the failing browser job does not upload coverage.

Trace evidence and suspected cause

The test sends await userEvent.keyboard('{ArrowDown}{End}{Enter}') at line 152, without waiting for focus between keys. The trace shows the menu opening after ArrowDown and closing after Enter, with no deletion confirmation dialog in those snapshots. This suggests a race between menu focus updates and the following key events; the precise focus transition causing it has not been proven.

The neighboring keyboard-cancellation test waits for the edit item and then the delete item to receive focus before pressing Enter, and passed in this run. A targeted fix to investigate is splitting the key sequence, awaiting those focus states, and asserting that the confirmation dialog is visible before clicking. Merely increasing the click timeout would not address an action that never opened the dialog.

Artifacts

Download browser failure artifacts. The relevant trace is:

traces/browser--chromium--keeps-reply-deletion-pending-through-refetch-and-restores-focus-to-the-input-after-the-reply-disappears-0-0.trace.zip

Activity

  1. added
    🐞 bug
    on Oct 10, 2026
  2. added
    review: top
    on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    project#difyreview: top🐞 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions