Skip to content

chore: simplify mouse UI target resolution results - #1645

Merged
hatayama merged 1 commit into
v3-betafrom
refactor/hatayama/replace-mouse-ui-target-out-parameters
Jul 9, 2026
Merged

hatayama merged 1 commit into
v3-betafrom
refactor/hatayama/replace-mouse-ui-target-out-parameters

Conversation

@hatayama

@hatayama hatayama commented Jul 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Simplify mouse UI hierarchy target resolution by returning named results instead of boolean and out parameter chains.
  • Preserve every target, optional no-target, and failure response outcome.

User Impact

  • No user-visible behavior changes are intended.
  • Bypass target lookup, explicit drop targets, duplicate-path diagnostics, missing-path diagnostics, and no-drop-handler failures remain unchanged.

Changes

  • Replace TryResolveGameObjectPath with ResolveGameObjectPath, returning (Target, FailureResponse).
  • Replace TryResolveDropTargetPath with ResolveDropTargetPath using the same tuple contract; (null, null) continues to represent a successful optional no-path result.
  • Adapt bypass press, drag target, one-shot drag, and DragEnd callers to check FailureResponse != null.
  • Update the six existing characterization tests to the new API while keeping all target and exact response assertions.

Verification

  • Red: the six converted tests produced six expected missing-method compile errors before production adaptation.
  • Confirmed the old boolean was redundant on every return path: success iff FailureResponse is null.
  • Confirmed old method names and out/ref usage are zero across both resolver APIs, all callers, and their tests.
  • Unity compile: 0 errors, 0 warnings.
  • Focused Mouse UI EditMode fixtures: 30/30 passed.
  • Related preflight, assembly, source guard, and registry fixtures: 152/152 passed.
  • SimulateMouseUiTests PlayMode suite: 32/32 passed before and after the refactor.
  • git diff --check: passed.

Compatibility

  • Lookup matching, duplicate counts, exact failure messages/fields, drop-handler lookup, failure ordering, raw-target semantics, schema, and wire responses are unchanged.
  • No public API or protocol declaration changed.

Review in cubic

Return target and failure values as named tuples so resolver outcomes remain
explicit without redundant boolean state or out-parameter call chains.
@coderabbitai

coderabbitai Bot commented Jul 9, 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: 8 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: ca258ec1-52b4-435f-828e-09d919c3ac73

📥 Commits

Reviewing files that changed from the base of the PR and between b164e25 and 465642b.

📒 Files selected for processing (5)
  • Assets/Tests/Editor/MouseUiPointerTargetResolverTests.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiDragTargetResolver.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiIncrementalDragExecutor.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiOneShotDragExecutor.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiPointerTargetResolver.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/hatayama/replace-mouse-ui-target-out-parameters

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.

@hatayama
hatayama merged commit 5eed29b into v3-beta Jul 9, 2026
10 checks passed
@hatayama
hatayama deleted the refactor/hatayama/replace-mouse-ui-target-out-parameters branch July 9, 2026 00:08
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