Repository navigation
test: yield to the main queue while the Files tree catches up after its menu closes - #14660
Conversation
…ts menu closes reloadWaitsForContextMenuToClose waited for the deferred reload by spinning RunLoop.main. The reload is queued with DispatchQueue.main.async, and this @mainactor Swift Testing test runs inside a main-queue block, where a nested run loop cannot drain the main queue, so the wait always timed out with 3 rows. Wait through AppKitTestEventPump, which yields to the main queue. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe context-menu reload test now waits asynchronously for the outline to reach one row after the menu closes. Its failure message reports the observed row count. ChangesFile Explorer Reload Test
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Other Merge Risk: ⚪ Minimal · up to This change only updates test synchronization, waiting for the expected row count with a timeout. No merge-blocking risk is identified; it appears ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 23 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (23 passed)
Full details: Description checkExplanation The description clearly explains the failure, root cause, and test-only fix, but it omits the required Testing section and verification results. It also omits the Demo Video section and checklist status.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merge receipt for |
bd2d34e test: expect split zoom to survive closing one tab of a zoomed pane (manaflow-ai#14664) f8857c5 fix(scripts): append, not prepend, the cargo fallback PATH in build-cmux-cua.sh (manaflow-ai#14665) 56a3e4c fix: make the event-stream reconnect decision a value, not a static namespace (manaflow-ai#14661) 06e064d ci: pin cla.yml and claude.yml to a GitHub-hosted runner (manaflow-ai#14668) 2509187 ci: restore the git object seed before checkout in E2E and iOS macOS jobs (manaflow-ai#14669) 402d0ad docs: move team-internal fleet and session rules out of CLAUDE.md (manaflow-ai#14595) 3bfe0b6 pull_request_template: drop the commented @codex review trigger block (manaflow-ai#14599) 4f0ac55 fix(control): honor color/icon keys and validate hex in workspace.group.set_color/set_icon (manaflow-ai#13877) 805a699 ci(rescue): mint the read token with only the permissions the App has (manaflow-ai#14627) 7e662c0 Tell the user why a file upload failed (manaflow-ai#11476) f04320e test: yield to the main queue while the Files tree catches up after its menu closes (manaflow-ai#14660) a5f705b A mirrored tmux window with one pane shows two tab bars (manaflow-ai#11248) 74917a9 iOS: remove unshipped push reconnect banner # Conflicts: # .github/workflows/ci-owned-pool-rescue.yml # .github/workflows/cla.yml # .github/workflows/claude.yml # .github/workflows/test-e2e.yml # .github/workflows/test-ios.yml
FileExplorerContextMenuReloadTests/reloadWaitsForContextMenuToClose(added by #14451) fails on main:outlineView.numberOfRows → 3where 1 was expected after the context menu closes. It failed on app-host shard 5 of #13981 (run 36151855238).The product code is correct:
contextMenuDidClose()queues the catch-up reload withDispatchQueue.main.async. The test waited for it by spinningRunLoop.main.run(until:). This@MainActorSwift Testing test runs inside a main-queue block, and a nested run loop cannot drain the main queue from there, so the queued reload never ran before the 2 s deadline.The test now waits through
AppKitTestEventPump().waitUntil, the shared hosted-view helper that yields to the main queue between checks. No product change.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes the flaky
FileExplorerContextMenuReloadTeststest by waiting for the deferred Files tree reload withAppKitTestEventPump().waitUntil, which yields to the main queue, instead of spinningRunLoop.main(which can't drain the main queue from inside a main-queue block). No product change.Written for commit cc88f34. Summary will update on new commits.
Summary by CodeRabbit