Skip to content

test(ui-react): status-indicator visual interaction test waits on time instead of state #3829

Closed

Description

@schlessera

Context

status-indicator.visual.tsx › "hover, focus, click, Enter, Space and tap expose the same summary; activation opens details at the heading" failed once in a hosted browser shard (browser (3)). The PR it ran on (#3824) touches no ui-react file. All the other tests in the file passed.

Seen in CI run 42774965202 on head 459c4eba1.

Acceptance criteria

  • Identify the timing assumption that fails (focus, hover delay or details animation) from the run's trace and screenshots, and make the test wait on the observable state rather than on elapsed time.
  • Run the test repeatedly on the pinned browser image with no failure.

Verification

The pinned browser runner, per docs/process/testing.md.

Readiness correction (2026-11-15)

Readiness review (2026-11-15): the implementation already exists on main in commit 99ac389. No duplicate code change or PR was created.

Recovered the original run's browser (3) failed-job log and downloaded its browser-proof-3 artifact (artifact 13743589167). The log identifies the exact failing assertion at status-indicator.visual.tsx:65: hover waits for the 300ms delay: expected <div ...> to be null, immediately after await userEvent.hover(control) and await pause(150). The failure screenshot shows the summary tooltip visible beside the trigger, with no details dialog. This confirms the failure occurs in the early-hover negative assertion, before focus or details activation. The old sleep starts after the hover command returns; the component's timer starts on pointer entry, so a delayed round trip can outlast the assertion's intended window.

The downloaded artifact contains the failure screenshot but no Playwright trace archive. Current source already observes pointer arrival and tooltip insertion and polls for summary state, matching the earlier comment's fix and mutation/stress receipts. The remaining explicit requirement to identify timing from the original trace cannot be satisfied from this artifact.

Resume: supply the original trace from run 42774965202, or decide that its assertion log plus failure screenshot are sufficient evidence, then verify/close the existing fix. Marking needs: repro and removing agent-ready until that evidence requirement is resolved. Removing the milestone under the run's flake policy; this remaining historical verification does not block release work. Claim released.

Activity

  1. added this to the 0.45.0 milestone on Nov 10, 2026
  2. added
    type: test
    area: ui-react
    priority: p3
    agent-ready
    on Nov 10, 2026
  3. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    Test-health push #3855, batch e3855-ui-kit-05.

    Not reproduced. I ran bun scripts/test-health.ts measure packages/ui-kit/tests/visual/status-indicator.visual.tsx --runs 5 --stress on the pinned browser image at 0129244ad, which is 10 runs with every CPU busy. All 10 passed. Without the trace from run 42774965202 the cause is not proven, so this stays open.

    Likely cause, fixed on the batch branch. At that commit the test hovers, sleeps 150 ms, and expects no tooltip yet (packages/ui-kit/tests/visual/status-indicator.visual.tsx:63-65). The 300 ms timer starts on pointer-enter (packages/ui-kit/src/chrome/StatusIndicator.tsx:152, from the handler at :196), before userEvent.hover returns. If the hover round trip takes more than 150 ms on a loaded shard, the timer fires before the sleep ends and the null check fails.

    The test now records the pointer's arrival in the capture phase, before React's handler starts the timer. It records the tooltip's insertion with a MutationObserver and asserts that at least 300 ms passed between the two. A slow runner can only make that gap longer.

    Receipts:

    • The new assertion fails when the delay is mutated to 150 ms and passes once it is restored (test-health mutate, killed). The old shape could also let a 250 ms delay through.
    • 10 stressed runs after the change, with no failure.

    Refs only: the first acceptance criterion asks for the failure to be identified from the run's own trace and screenshots, and that has not been done.

  4. self-assigned this
    on Nov 15, 2026
  5. schlessera commented on Nov 15, 2026

    @schlessera
    OwnerAuthor

    Claimed for implementation. Claim token: claim-a0e0ecb6. Branch: test/3829-status-indicator-evidence.

    Existing timing fix is on main; checking original failure evidence. Collision scan pending.

  6. added
    needs: repro
    on Nov 15, 2026
  7. removed this from the 0.45.0 milestone on Nov 15, 2026
  8. removed
    agent-ready
    on Nov 15, 2026
  9. schlessera commented on Nov 15, 2026

    @schlessera
    OwnerAuthor

    Readiness review (2026-11-15): the implementation already exists on main in commit 99ac389. No duplicate code change or PR was created.

    Recovered the original run's browser (3) failed-job log and downloaded its browser-proof-3 artifact (artifact 13743589167). The log identifies the exact failing assertion at status-indicator.visual.tsx:65: hover waits for the 300ms delay: expected <div ...> to be null, immediately after await userEvent.hover(control) and await pause(150). The failure screenshot shows the summary tooltip visible beside the trigger, with no details dialog. This confirms the failure occurs in the early-hover negative assertion, before focus or details activation. The old sleep starts after the hover command returns; the component's timer starts on pointer entry, so a delayed round trip can outlast the assertion's intended window.

    The downloaded artifact contains the failure screenshot but no Playwright trace archive. Current source already observes pointer arrival and tooltip insertion and polls for summary state, matching the earlier comment's fix and mutation/stress receipts. The remaining explicit requirement to identify timing from the original trace cannot be satisfied from this artifact.

    Resume: supply the original trace from run 42774965202, or decide that its assertion log plus failure screenshot are sufficient evidence, then verify/close the existing fix. Marking needs: repro and removing agent-ready until that evidence requirement is resolved. Removing the milestone under the run's flake policy; this remaining historical verification does not block release work. Claim released.

  10. removed their assignment
    on Nov 15, 2026
  11. schlessera commented on Nov 16, 2026

    @schlessera
    OwnerAuthor

    Maintainer decision (2026-11-16): the recovered evidence is sufficient. The browser (3) job log from run 42774965202 names the failing assertion (status-indicator.visual.tsx:65, the early-hover negative check after userEvent.hover + pause(150)). The failure screenshot shows the summary tooltip already visible, which confirms the cause: the component's timer starts on pointer entry, before the sleep does. The trace archive the issue asked for is not required. The fix (99ac389c2) is on main, where packages/ui-kit/tests/visual/status-indicator.visual.tsx now polls tooltip and dialog state instead of timing the positive waits. The remaining fixed pause(400) calls are negative checks that must outlast the delay.

  12. removed
    needs: repro
    on Nov 16, 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

    area: ui-reactpriority: p3type: test

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions