refactor: extract mouse UI overlay support - #1635
Conversation
Expose the final extraction seams and lock down immediate cleanup behavior with synchronous EditMode tests. Animation and frame-wait behavior remains covered by the existing PlayMode suite to avoid unsafe editor-thread coordination tests.
Move the structured start and completion log construction into a cohesive helper while preserving every event name, message, context field, and correlation identifier.
Move frame waiting, overlay animation, and main-thread cleanup scheduling into cohesive helpers while preserving timing, cancellation, and cleanup behavior. Remove the one-line overlay wrapper and local animation constant aliases so callers use the owning APIs directly.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR extracts overlay animation, editor-frame waiting, main-thread cleanup scheduling, and activity logging from SimulateMouseUiUseCase into four new dedicated helper classes, updates the use case to delegate to them across click, long-press, and drag flows, removes the old inline implementations, and adds tests for the new cleanup scheduler. ChangesSimulateMouseUi Helper Extraction
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
No issues found across 11 files
You’re at about 96% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Summary
MouseUiSimulationActivityLoggerMouseUiEditorFrameWaiterandMouseUiOverlayAnimatorMouseUiMainThreadCleanupSchedulerSimulateMouseUiUseCasefor the next planned splitBehavioral Preservation
ConfigureAwait(false), main-thread switching, animation timing, cleanup posting, and state mutation orderSimulateMouseUiTestsPlayMode suite passed both before and after the moveEnsureOverlayExistswrapper and now callOverlayCanvasFactory.EnsureExists()directlySimulateMouseUiAnimationConstantsdirectly from the animatorValidation
SimulateMouseUiTestsPlayMode: 32 passedMouseUiMainThreadCleanupSchedulerTests: 2 passedMouseUiPointerTargetResolverTests: 10 passedMouseUiSimulationResponseFactoryTests: 12 passedSimulateMouseUiActionValidationTests: 1 passedPlayModeToolPreflightServiceTests: 8 passedStaticFacadeStateGuardTests: 20 passedOnionAssemblyDependencyTests: 83 passedCompatibility