Skip to content

test(desktop): stabilize keyboard community reorder - #4652

Open
kiranmagic7 wants to merge 3 commits into
block:mainfrom
kiranmagic7:fix/community-rail-keyboard-reorder-flake
Open

test(desktop): stabilize keyboard community reorder#4652
kiranmagic7 wants to merge 3 commits into
block:mainfrom
kiranmagic7:fix/community-rail-keyboard-reorder-flake

Conversation

@kiranmagic7

@kiranmagic7 kiranmagic7 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Wait one browser timer tick after the keyboard drag is picked up and before sending ArrowUp.

@dnd-kit's KeyboardSensor calls handleStart() synchronously, then installs its document keydown listener inside setTimeout. Pick-up state is already visible during that gap, so waiting for aria-pressed cannot prove that the listener is ready. Crossing the macrotask boundary directly closes the race. Product behavior is unchanged.

Related issue

Fixes #4530. The source-derived mechanism and independent evidence are documented in #6007; that issue also tracks three separate flakes outside this PR.

Testing

  • On current upstream/main (d8281b9c9), the isolated test failed 18/30 runs with retries disabled.

  • With this patch, the isolated test passed 60/60 runs with retries disabled:

    CI=1 pnpm --dir desktop exec playwright test tests/e2e/community-rail.spec.ts \
      --project=smoke \
      --grep 'keyboard reorder' \
      --repeat-each=60 \
      --workers=1 \
      --retries=0 \
      --reporter=list
  • just ci

  • Screenshots are not applicable; this is a test-only change.

Signed-off-by: kiranmagic7 <262980978+kiranmagic7@users.noreply.github.com>
@kiranmagic7
kiranmagic7 requested a review from a team as a code owner August 4, 2026 03:13
@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Re-checked the current head 09bb0cbbe82f98958b14723c24cf20cf816aa4d1: the branch is still mergeable, and DCO, Semgrep, and zizmor are green. The Buzz CI and Desktop Release Candidate runs are still waiting on fork-workflow approval with zero jobs, so there is no failing hosted log for me to fix.

Review focus is the one-file Playwright synchronization in desktop/tests/e2e/community-rail.spec.ts; the PR body has the 20/20 repro and verification against #4530.

…keyboard-reorder-flake

Signed-off-by: kiranmagic7 <262980978+kiranmagic7@users.noreply.github.com>
Signed-off-by: kiranmagic7 <262980978+kiranmagic7@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(desktop): keyboard community reorder flakes before retry

1 participant