Repository navigation
refactor: extract mouse UI one-shot drag execution - #1637
Conversation
Move drag initiation, interpolation, and finalization into a stateless helper so one-shot and incremental drag orchestration share the same pointer event lifecycle without depending on the use case.
Move complete drag orchestration into a stateless executor, passing the shared cleanup scheduler explicitly while preserving pointer event timing, captured cleanup state, and timeout behavior.
|
Warning Review limit reached
Next review available in: 1 minute Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
✨ Finishing Touches🧪 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.
1 issue found across 5 files
You’re at about 98% 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.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiOneShotDragExecutor.cs">
<violation number="1" location="Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiOneShotDragExecutor.cs:28">
P2: `ExecuteDragOneShot` duplicates the drag-target resolution, `IDragHandler` lookup, and no-handler expand/dissipate fallback sequence that already exists in `SimulateMouseUiUseCase.ExecuteDragStart`. Both paths convert coordinates, branch on `BypassRaycast`, resolve `TargetPath`, call `ExecuteEvents.GetEventHandler<IDragHandler>`, and play identical overlay animations with the same failure messages. Extracting a shared helper (e.g., for target resolution + no-handler response) would keep future changes to bypass logic, error wording, or overlay timing in a single place.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Summary
MouseUiDragEventExecutorMouseUiOneShotDragExecutorSimulateMouseUiUseCasefrom 690 lines to 434 lines while leaving incremental drag state orchestration for the final stageBehavioral Preservation
ConfigureAwait(false), and overlay state updatespointerData,target, andexplicitDropTargetvalues and the same deferred scheduler timingMouseDragStateownership and all incremental drag orchestration unchangedPlanned Adaptations
internal static; their private raycast helper remains privateExecuteDragOneShotis now aninternal staticentry and receivesMouseUiMainThreadCleanupSchedulerexplicitlyValidation
SimulateMouseUiTestsPlayMode: 32 passed at baseline and after both commitsTest Scope
Compatibility