Skip to content

fix: Simulating UI input now fails clearly when PlayMode is paused#1519

Merged
hatayama merged 1 commit into
v3-betafrom
refactor/c3-simulate-mouse-ui-paused-preflight
Jul 5, 2026
Merged

fix: Simulating UI input now fails clearly when PlayMode is paused#1519
hatayama merged 1 commit into
v3-betafrom
refactor/c3-simulate-mouse-ui-paused-preflight

Conversation

@hatayama

@hatayama hatayama commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • simulate-mouse-ui now rejects requests while PlayMode is paused, matching the other input-simulation tools

User Impact

  • Before: UI clicks fired while PlayMode was paused executed the immediate event, but follow-up frame updates and coroutines stayed frozen, leaving the scene inconsistent with no warning
  • After: the tool fails fast with "PlayMode is paused. Resume PlayMode before simulating UI input." — the same guidance the sibling input tools give

Changes

  • SimulateMouseUiUseCase preflight now uses the shared RequireActiveAndNotPaused check with its own paused-action description
  • Added a test pinning the exact wire-visible paused message

Verification

  • dist/darwin-arm64/uloop compile: 0 errors / 0 warnings
  • dist/darwin-arm64/uloop run-tests (regex ".(PlayModeToolPreflight|SimulateMouseUi)."): 10 passed / 0 failed

Review in cubic

UI events dispatched while paused run synchronously but follow-up
Update ticks and coroutines stay frozen, leaving the scene
inconsistent. Align the tool with its four siblings by using the
shared RequireActiveAndNotPaused preflight and pin the composed
paused message in tests.
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1424272e-c0a3-4bb4-868f-09beeeee9497

📥 Commits

Reviewing files that changed from the base of the PR and between f38e107 and 9cc3a77.

📒 Files selected for processing (2)
  • Assets/Tests/Editor/PlayModeToolPreflightServiceTests.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/SimulateMouseUiUseCase.cs

📝 Walkthrough

Walkthrough

Adds a PausedActionDescription constant to SimulateMouseUiUseCase and updates its start validation to call RequireActiveAndNotPaused instead of RequireActive, enforcing that the play mode tool is not paused. A corresponding unit test verifies the resulting formatted wire message.

Changes

Pause enforcement for mouse UI simulation

Layer / File(s) Summary
Add paused description and enforce pause validation
Packages/src/Editor/FirstPartyTools/SimulateMouseUi/SimulateMouseUiUseCase.cs
Adds PausedActionDescription constant ("simulating UI input") and switches ValidateSimulationStart to use RequireActiveAndNotPaused instead of RequireActive.
Test paused wire message
Assets/Tests/Editor/PlayModeToolPreflightServiceTests.cs
Adds a test asserting FormatPausedMessage returns the expected byte-identical wire message with the UI-input suffix.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly summarizes the main change: PlayMode-paused UI simulation now fails clearly.
Description check ✅ Passed The description matches the code changes and verification, including the paused-state behavior and test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/c3-simulate-mouse-ui-paused-preflight

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 2 files

Re-trigger cubic

@hatayama
hatayama merged commit 5b903ed into v3-beta Jul 5, 2026
10 checks passed
@hatayama
hatayama deleted the refactor/c3-simulate-mouse-ui-paused-preflight branch July 5, 2026 12:41
@github-actions github-actions Bot mentioned this pull request Jul 11, 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