flaky: project-pr-review.spec.ts:1336 group row count races after collapse/expand (Desktop Smoke E2E (3))
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
`desktop/tests/e2e/project-pr-review.spec.ts:1336` fails intermittently in `Desktop Smoke E2E (3)`. This is a **flaky test, not a product regression** — the same commit passes on rerun with no code change.
## The assertion
```ts
await expect(toggle).toHaveAttribute("aria-expanded", "false");
await expect(rows).toHaveCount(0);
await toggle.click();
await expect(rows).toHaveCount(rowCount); // line 1336
```
Observed failure:
```
Locator: getByTestId('projects-issue-project-group').first()
.locator('[data-testid^="projects-issue-row-"]')
Expected: 30
Received: 56
14 × locator resolved to 56 elements
```
## Diagnosis
`rowCount` is captured from the **first** group before the collapse. After re-expanding, the assertion runs while the list is still settling, and the locator momentarily resolves against a wider set than the first group's final row set — 56 rather than 30. It stayed at 56 for all 14 polls, so this is not a slow render finishing late; the expanded DOM transiently contains rows the locator matches before the group boundaries re-establish. Waiting for the row list to settle before asserting the count should fix it. I have not proposed a specific wait, since the owner will know whether the right settle signal is the group container, a transition end, or a virtualization pass.
## Evidence it is a flake
- **Red:** https://github.com/block/buzz/actions/runs/32815112795/job/97701825609 — failed at `:1336` (1 failed, 4 flaky, 285 passed).
- **Green on a byte-identical tree:** https://github.com/block/buzz/actions/runs/32815112795/job/97707144997 — reran the failed jobs of the same run with no push and no code change; passed.
- **Same shard already failing on `main`:** https://github.com/block/buzz/actions/runs/32789530765 — `c5166f216` ("feat(desktop): simplify the message action rail (#6529)") failed `Desktop Smoke E2E (3)` + the `Desktop` aggregator on a different assertion, with `overscroll-boundary.spec.ts:34` and `onboarding-agent-defaults.spec.ts:908` reported flaky in both that run and the one above.
The `Desktop` check is the shard aggregator, so it goes red whenever any smoke shard does; it is not an independent failure.
## Context
Surfaced while landing #6742, whose diff is entirely `crates/buzz-sdk/src/broker/` — no `desktop/` files. The smoke suite serves a static `dist` via `python3 -m http.server` (`desktop/playwright.config.ts:193`) with `installMockBridge`, so no Rust binary runs in that job and a `buzz-sdk` change cannot reach it.
Last change to this spec was #6429 ("polish(desktop): finish Projects navigation and context chrome"), which is the likely place to look for the owner. Filed rather than left to silent reruns, since `overscroll-boundary` and `onboarding-agent-defaults` in the same shard suggest a cluster rather than one bad line.
Contributor guide
Research direction
Start at desktop/tests/e2e/project-pr-review.spec.ts:1336 and review the collapse/expand assertions around the first group’s rowCount. Check desktop/playwright.config.ts:193 and the test’s existing group or transition behavior to identify a reliable settle signal before asserting the expanded row count. Done means the test waits for the list to settle and passes consistently without changing product code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript
- Domain
- desktop, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100