refactor: extract mouse UI request preparation - #1632
Conversation
Pin the public tool responses for negative drag speed, unsupported drag buttons, missing bypass targets, and invalid drop-target usage before moving command and validation responsibilities out of the use case.
Move schema normalization and enum conversion into a dedicated internal command type so subsequent validator extraction no longer depends on a nested private type. Preserve every copied value, default, and validation message.
Move play-mode, request-option, and active-drag checks into a dedicated validator while keeping public pause text on the use-case facade. Pass that text explicitly to preserve dependency direction and every wire-visible failure response.
|
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 selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR extracts mouse UI simulation command construction and request validation from ChangesSimulateMouseUi validation refactor
Estimated code review effort: 3 (Moderate) | ~25 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.
All reported issues were addressed across 6 files
You’re at about 94% 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.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Use the existing SimulateMouseUiTests classic assertion style in the four new response-contract characterizations. This keeps the fixture internally consistent without changing the behavior under test.
Summary
MouseUiSimulationCommandMouseUiSimulationValidatorSimulateMouseUiUseCasefrom 1,591 to 1,403 lines without changing runtime behaviorScope Notes
PausedActionDescriptioninto the validator, which keeps dependency direction from the use case to the validator.CreateFailureis temporarily owned by the validator, and the use case's defensive unknown-action branch calls it directly. Response-factory extraction remains a later R2-33 stage.MouseActionsupports bypass; that branch cannot be reached through the public schema today.Verification
dist/darwin-arm64/uloop compile(0 errors, 0 warnings)SimulateMouseUiTests(32 passed)SimulateMouseUiActionValidationTests(1 passed)PlayModeToolPreflightServiceTests(8 passed)StaticFacadeStateGuardTests(20 passed)OnionAssemblyDependencyTests(83 passed)git diff --check origin/v3-beta...HEAD