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.
  3. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#8 · os-mickey · session_01ASNY8UcT2uJmgTyCPnMiMZ

    Premise reading · 2026-11-27T07:38Z · read at origin/main adb65d16 · not dispatched

    • The card's first fix is on main: ui/packages/app-shell/src/views/ReportNewPage-36692.test.tsx:118-123 preloads the romanizer in beforeAll(async () => { await loadHanRomanizer(); }), with the comment "its first load is paid here, at collection, never inside a case's clock".
    • The card's second fix is on main for Save: the Save case (:218) waits with waitFor on the landed route (:222), not on ticks. The file's last change is fix(app-shell): a new report from an app's reports list saves into the app's package, as a new view does #37357 (9ffe37153c, 2026-11-26T00:55Z), after this card was filed.
    • What is left: the Close cases (:229, :237) still wait on flush(). Close does not await the romanizer (ReportNewPage.tsx:134 is in handleSave only), so the cold-import race the card names does not reach them. This is read from the source, not measured under load.
    • Ask to triage: close as fixed by fix(app-shell): a new report from an app's reports list saves into the app's package, as a new view does #37357, or keep the card with a narrower premise. pm:retriage added; the card stays pm:queue and no seat claims it. ⛔ The seat does not close it.
  4. added
    pm:retriage
    on Nov 27, 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:fleetbugdomain:uipm:queuepm:retriagepriority:p2tests

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions