Skip to content

Test UI flake: ReportNewPage-36692.test.tsx waits two ticks across a cold pinyin-pro import, so Save and Close fail on a busy shard #37161

Backlog

Description

@objectstack-fleet

triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

Filing gate: ① a reproducible defect (a recurring CI flake with named failing runs) · Source: fleet (filing request 7148164712 from repo:objectstack#3; outside area:workflow, so seat 3 does not claim it).

What happens

ui/packages/app-shell/src/views/ReportNewPage-36692.test.tsx waits on flush(), which is one setTimeout(0) tick (~146), called twice around Save and Close. ReportNewPage's save path awaits loadHanRomanizer() (ui/packages/app-shell/src/views/ReportNewPage.tsx ~109), which is a cold dynamic import('pinyin-pro') the first time. On a busy Test UI shard that import outlasts the ticks, so the Save and Close cases assert before the save has run.

reach: seen failing on two independent PRs today.

Each hit costs a shard re-run and can send a PR author chasing a failure their diff did not cause. It is a PR-CI flake, not a merge-queue one, so it is not p0 under the queue-flake rule.

Expected

The two cases are deterministic: they do not depend on how long the cold import takes.

Fix

One of:

  • Preload loadHanRomanizer() at module top, as sibling tests do (CreateItemDialog.notDerived-13389.test.tsx ~33).
  • Or wait on the observable result (waitFor on the saveAndPublish mock call, or on the landed route) instead of fixed ticks.

Acceptance

  • The file passes repeatedly under load, for example --repeat or a loop of 20 runs with a parallel shard. Without the fix, a delayed pinyin-pro mock makes it fail; with the fix, it passes.

Related: #36653 (closed), the same cold-dictionary race in romanizeHan.test.ts.

Dedupe: "ReportNewPage-36692", "pinyin-pro flake" and "loadHanRomanizer" (open and closed). The only hits are #36692 (the feature card) and #36653 (another file). No card exists on this test.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:ui
    on Nov 25, 2026
  2. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: first touch 2026-11-25T00:09Z

    • Grade line: area:fleet · Bug · p2 (a recurring PR-CI flake, two independent PRs today; not a queue flake, so not p0) · every PR whose Test UI shard runs this file · measured (two failing jobs) · size XS.
    • Not a sweep row: it recurs daily, so it gets its own card.
    • Route: area:fleet p2 → repo:objectstack#2.
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:fleetbugdomain:uipm:queuepriority:p2tests

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions