Repository navigation
chore: Pass a cancellation token through mouse press cleanup helpers - #2930
Conversation
FinishHeldButton and ReleaseHeldButtonAfterPause were added as async methods without the standard ct parameter, which fails the async cancellation-token guard in StaticFacadeStateGuardTests. The callers still pass CancellationToken.None because the release runs in a finally block and must complete even when the command itself was cancelled.
|
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: hatayama/unity-cli-loop/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughClick and long-press cleanup now starts the button release with ChangesMouse button release
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to Mouse-button cleanup remains able to release the button after command cancellation. No issue requiring a pre-merge fix is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
Summary
FinishHeldButtonandReleaseHeldButtonAfterPauseinMouseInputPressActionExecutorwere added (fix: simulate-mouse-input always releases the mouse button when a pause point interrupts a press #2856) as async methods without the standardCancellationToken ctparameter, soStaticFacadeStateGuardTests.RefactorTargets_WhenDeclaringAsyncMethods_RequireCancellationTokenCtfails in the nightly EditMode run.ctand use it for their awaits. The callers still passCancellationToken.None: the release runs in afinallyblock and must complete even when the command itself was cancelled, which is the same behavior as before.No behavior change.
Verification
StaticFacadeStateGuardTests,MouseInputSimulationResponseFactoryTests,SimulateMouseInputDryRunTests,SimulateMouseInputResponseWarningTests— 32/32 passed (the guard test failed before this change).SimulateMouseInputTests,SimulateMouseInputMonitorRemovalTests,MouseInputSimulationResponseFactoryTests— 17/17 passed.