Skip to content

refactor: extract mouse UI response construction - #1633

Merged
hatayama merged 2 commits into
v3-betafrom
refactor/hatayama/extract-mouse-ui-response-factory
Jul 8, 2026
Merged

hatayama merged 2 commits into
v3-betafrom
refactor/hatayama/extract-mouse-ui-response-factory

Conversation

@hatayama

@hatayama hatayama commented Jul 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • extract the six existing mouse UI response helpers into MouseUiSimulationResponseFactory
  • move the temporarily validator-owned failure response into the same stateless factory
  • add synchronous EditMode characterization coverage for every current message branch and response field
  • reduce SimulateMouseUiUseCase from 1,403 to 1,305 lines and MouseUiSimulationValidator from 127 to 115 lines

Scope Notes

  • The characterization commit makes five private use-case helpers internal; this is their required final visibility because the use case remains a direct caller after extraction. CreateFailure was already internal on the validator.
  • A normalized comparison of the six old method bodies and the new factory body is clean after accounting for the five private to internal changes and blank lines. Conditions, messages, field assignments, nullability, and timeout constants are unchanged.
  • Existing inline response construction remains with command conversion, target resolution, and action execution. Moving those blocks would require inventing new parameter APIs and is reserved for their later R2-33 extraction stages.
  • R2-40's unreachable bypass validation branch remains unchanged for its separate TDD cleanup.
  • Response DTOs and IPC wire shapes are unchanged, so no protocol version bump is required.

Verification

  • dist/darwin-arm64/uloop compile (0 errors, 0 warnings)
  • EditMode MouseUiSimulationResponseFactoryTests before and after the move (12 passed)
  • PlayMode SimulateMouseUiTests (32 passed)
  • EditMode SimulateMouseUiActionValidationTests (1 passed)
  • EditMode PlayModeToolPreflightServiceTests (8 passed)
  • EditMode StaticFacadeStateGuardTests (20 passed)
  • EditMode OnionAssemblyDependencyTests (83 passed)
  • normalized old/new factory body comparison (no differences)
  • old owner references and factory-to-owner reverse references (0)
  • git diff --check origin/v3-beta...HEAD

Review in cubic

hatayama added 2 commits July 9, 2026 04:18
Expose the existing response helpers at their final internal visibility and pin all current success, failure, timeout, bypass, hit, and no-hit response branches with synchronous EditMode tests before moving the implementation.
Move the six existing response-construction helpers into a stateless factory and switch the use case, validator, and characterization tests to direct calls. Preserve all response fields, messages, nullability, and timeout constants without retaining compatibility wrappers.
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@hatayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 28 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9c8fa3b2-7e33-40a4-b891-6be95cf2dacd

📥 Commits

Reviewing files that changed from the base of the PR and between ee17f00 and adfb3d3.

⛔ Files ignored due to path filters (2)
  • Assets/Tests/Editor/MouseUiSimulationResponseFactoryTests.cs.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiSimulationResponseFactory.cs.meta is excluded by none and included by none
📒 Files selected for processing (4)
  • Assets/Tests/Editor/MouseUiSimulationResponseFactoryTests.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiSimulationResponseFactory.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiSimulationValidator.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/SimulateMouseUiUseCase.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/hatayama/extract-mouse-ui-response-factory

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

You’re at about 95% 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.

Re-trigger cubic

@hatayama
hatayama merged commit ac53001 into v3-beta Jul 8, 2026
10 checks passed
@hatayama
hatayama deleted the refactor/hatayama/extract-mouse-ui-response-factory branch July 8, 2026 19:33
RyanXie123 pushed a commit to RyanXie123/unity-cli-loop that referenced this pull request Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant