Skip to content

fix: Input simulation no longer hangs when Editor updates stall#1306

Merged
hatayama merged 5 commits into
v3-betafrom
feature/fix-simulate-timeout
Jun 10, 2026
Merged

fix: Input simulation no longer hangs when Editor updates stall#1306
hatayama merged 5 commits into
v3-betafrom
feature/fix-simulate-timeout

Conversation

@hatayama

Copy link
Copy Markdown
Owner

Summary

  • Input simulation commands now return a timeout instead of hanging when Unity Editor or Input System updates stop advancing.
  • Frame-based waits are separated from wall-clock timeouts so cleanup and recovery remain predictable.

User Impact

  • Keyboard and mouse simulation commands no longer leave the CLI waiting forever when Unity stops producing the update they need.
  • Timeout cleanup is queued safely on the Unity main thread, reducing stuck input state after interrupted simulations.
  • Debug-break and input-simulation guidance now points users toward paused-frame verification for gameplay checks.

Changes

  • Removed the old EditorDelay primitive and replaced frame-dependent waits with EditorFrameWaiter.
  • Reworked TimerDelay as a wall-clock timer and used it for timeout guards.
  • Hardened keyboard and mouse simulation timeout, cancellation, and cleanup paths.
  • Updated focused tests for frame waits, timeout cleanup, stale callback removal, and simulate input cancellation.

Verification

  • cli/dist/darwin-arm64/uloop compile --project-path "$(git rev-parse --show-toplevel)"
  • cli/dist/darwin-arm64/uloop run-tests --project-path "$(git rev-parse --show-toplevel)" --test-mode PlayMode --filter-type regex --filter-value "(ApplyOnNextConfiguredUpdate_CancellationBeforeInputUpdate_ShouldRemoveCallback|Press_Cancellation_Should_ClearPressOverlay|KeyUp_CancellationAfterRelease_Should_ClearHeldState|WaitForRuntimeFrames_WhenFrameGoalCannotComplete_ShouldReturnTimedOut)"
  • cli/dist/darwin-arm64/uloop run-tests --project-path "$(git rev-parse --show-toplevel)" --test-mode PlayMode --filter-type regex --filter-value "io.github.hatayama.UnityCliLoop.Tests.PlayMode.SimulateKeyboardTests"
  • cli/dist/darwin-arm64/uloop run-tests --project-path "$(git rev-parse --show-toplevel)" --test-mode PlayMode --filter-type regex --filter-value "io.github.hatayama.UnityCliLoop.Tests.PlayMode.SimulateMouseInputTests"
  • cli/dist/darwin-arm64/uloop run-tests --project-path "$(git rev-parse --show-toplevel)" --test-mode EditMode --filter-type exact --filter-value "io.github.hatayama.UnityCliLoop.Tests.Editor.EditorFrameWaiterTests"

hatayama added 3 commits June 10, 2026 20:19
Replace the old update-driven EditorDelay primitive with a focused EditorFrameWaiter for frame waits, and route timeout-sensitive waits through TimerDelay so tool calls can return even when Editor updates stall.

- Add timed-out input simulation outcomes with deferred main-thread cleanup.
- Use EditorFrameWaiter for frame-based editor waits and TimerDelay for wall-clock waits.
- Update focused editor and input simulation tests for the new wait contracts.
Ensure delayed main-thread actions fault the returned task when the action throws, and make input apply timeouts win only before an input update starts applying state.

Add regression coverage for delayed action exception propagation.
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

More reviews will be available in 8 minutes and 3 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

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.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 563f7820-281f-47f1-a1e9-3174f64edb37

📥 Commits

Reviewing files that changed from the base of the PR and between f17587a and e4e4097.

📒 Files selected for processing (7)
  • Assets/Tests/Editor/EditorFrameWaiterTests.cs
  • Assets/Tests/PlayMode/SimulateKeyboardTests.cs
  • Packages/src/Editor/FirstPartyTools/Common/InputSystem/InputSystemUpdateHelper.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseInput/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/Skill/SKILL.md
  • Packages/src/Editor/ToolContracts/EditorFrameWaiter.cs
  • Packages/src/Editor/ToolContracts/TimerDelay.cs
📝 Walkthrough

Walkthrough

Removes EditorDelay/EditorDelayManager and adds EditorFrameWaiter. Refactors TimerDelay and TaskExtensions. Input simulation now returns explicit wait outcomes (Completed/Paused/TimedOut) with per-frame vs wall-clock racing; keyboard/mouse flows and tests updated accordingly.

Changes

EditorDelay to EditorFrameWaiter migration and timeout-aware input simulation

Layer / File(s) Summary
EditorFrameWaiter implementation and Timer refactoring
Packages/src/Editor/ToolContracts/EditorFrameWaiter.cs, Packages/src/Editor/ToolContracts/TimerDelay.cs, Packages/src/Editor/ToolContracts/TaskExtensions.cs
EditorFrameWaiter tracks pending frame waits by target frame count with cancellation and test helpers. TimerDelay uses wall-clock timers with SynchronizationContext and TimerDelayState. TaskExtensions provides Task-based Forget with exception logging.
Input simulation timeout infrastructure and outcome tracking
Packages/src/Editor/FirstPartyTools/Common/InputSystem/InputSystemUpdateHelper.cs
Adds InputSimulationWaitOutcome.TimedOut and makes ApplyOnNextConfiguredUpdate return Task<InputSimulationWaitOutcome>. Implements per-frame vs remaining-time race helper, subscription lifetime management, main-thread awaitable, and test timeout configuration.
Keyboard simulation timeout handling
Packages/src/Editor/FirstPartyTools/SimulateKeyboard/SimulateKeyboardUseCase.cs
ExecutePress/ExecuteKeyDown/ExecuteKeyUp now branch on InputSimulationWaitOutcome to handle Completed, Paused, and TimedOut, scheduling deterministic cleanup and introducing TimedOutKeyResult.
Mouse and mouse-UI input timeout handling
Packages/src/Editor/FirstPartyTools/SimulateMouseInput/SimulateMouseInputUseCase.cs, Packages/src/Editor/FirstPartyTools/SimulateMouseUi/SimulateMouseUiUseCase.cs
Click/LongPress/MoveDelta/Scroll/SmoothDelta await injection/observation outcomes, return standardized timeout results, schedule queued cleanup on timeouts, and use EditorFrameWaiter for per-frame pacing in UI flows.
Other use case updates
Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/DynamicCodeDomainReloadWaitSignal.cs, Packages/src/Editor/FirstPartyTools/Screenshot/EditorWindowCaptureUtility.cs, Packages/src/Editor/FirstPartyTools/Screenshot/ScreenshotUseCase.cs
Switched single/multi-frame waits from EditorDelay to EditorFrameWaiter while preserving capture/settle logic.
Startup and integration wiring
Packages/src/Editor/Application/ApplicationEditorStartup.cs, Packages/src/Editor/Application/SessionRecoveryService.cs
ApplicationEditorStartup initializes EditorFrameWaiter. SessionRecoveryService reconnection timeout changed from frame-based EditorDelay to millisecond-based TimerDelay.Wait.
Unit test fixtures and integration tests
Assets/Tests/Editor/EditorFrameWaiterTests.cs, Assets/Tests/PlayMode/SimulateKeyboardTests.cs, Assets/Tests/PlayMode/SimulateMouseInputTests.cs, Assets/Tests/Editor/StaticFacadeStateGuardTests.cs
Adds EditorFrameWaiterTests; PlayMode tests extended for cancellation and runtime-frame timeout outcomes; TearDown resets input-system timeouts; StaticFacadeStateGuardTests updated to include EditorFrameWaiter.
Manual test harness
Assets/Editor/EditorDelayManualTests.cs
Renamed to EditorFrameWaiterManualTests and updated to use EditorFrameWaiter.WaitFramesAsync across zero/single/multi/concurrent/stress/cancellable scenarios; reports PendingWaitCount and uses ClearAllForTests.
E2E testing documentation
Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md, Packages/src/Editor/FirstPartyTools/SimulateKeyboard/Skill/SKILL.md, Packages/src/Editor/FirstPartyTools/SimulateMouseInput/Skill/SKILL.md, Packages/src/Editor/FirstPartyTools/SimulateMouseUi/Skill/SKILL.md
Repositions Debug Break Inspection guidance as the standard paused-frame proof (UnityCliLoopDebug.Break + uloop-wait-for-debug-break) for exact-frame verification when simulated input drives state transitions.

Sequence Diagram(s)

sequenceDiagram
  participant Simulate as SimulateUseCase
  participant Apply as ApplyOnNextConfiguredUpdate
  participant InputUpdate as InputSystemConfiguredUpdate
  participant Timeout as WallClockTimeout
  Simulate->>Apply: request apply(action) + start remaining-time timeout
  par wait for configured update
    Apply->>InputUpdate: subscribe callback
  and wall-clock racing
    Apply->>Timeout: race against remaining time
  end
  alt InputUpdate fires first
    InputUpdate->>Apply: callback runs -> Apply returns Completed
    Apply-->>Simulate: Completed
  else Timeout first
    Timeout->>Apply: timeout elapsed -> Apply returns TimedOut
    Apply-->>Simulate: TimedOut
  else cancellation
    Simulate->>Apply: cancellation token fires -> Apply returns Paused/Cancelled
    Apply-->>Simulate: Paused
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.48% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main objective: preventing input simulation from hanging by introducing timeout behavior when Editor updates stall.
Description check ✅ Passed The description is clearly related to the changeset, explaining the removal of EditorDelay, introduction of EditorFrameWaiter, reworking of TimerDelay, and improvements to simulation timeout/cancellation handling across multiple files.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix-simulate-timeout

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Packages/src/Editor/FirstPartyTools/SimulateKeyboard/Skill/SKILL.md (1)

17-17: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Workflow steps across three files contradict the updated Debug Break section headings.

The workflow steps in SimulateKeyboard, SimulateMouseInput, and SimulateMouseUi all describe Debug Break inspection as "an optional follow-up," but their Debug Break section headings were renamed to "(Standard for E2E)" and the body text positions paused-frame proof as the standard approach. This systematic inconsistency creates conflicting guidance about whether debug breaks are optional or standard practice for E2E verification.

📝 Suggested alignment pattern for all three files

For each workflow step, replace "If exact-frame proof would reduce uncertainty, treat Debug Break inspection as an optional follow-up" with language that positions it as standard for state-transition verification, such as:

For state transitions driven by simulated input, use Debug Break inspection as standard frame proof per the section below; supplement with logs, screenshots, and durable state
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Packages/src/Editor/FirstPartyTools/SimulateKeyboard/Skill/SKILL.md` at line
17, Update the workflow step sentence in the three files SimulateKeyboard,
SimulateMouseInput, and SimulateMouseUi to match the renamed Debug Break section
"(Standard for E2E)"; specifically replace the line "If exact-frame proof would
reduce uncertainty, treat Debug Break inspection as an optional follow-up" with
wording that treats Debug Break as the standard for state-transition
verification (e.g., "For state transitions driven by simulated input, use Debug
Break inspection as standard frame proof per the section below; supplement with
logs, screenshots, and durable state"); ensure this change appears in the
workflow steps that reference the Debug Break section to keep the guidance
consistent with the "(Standard for E2E)" heading.
🧹 Nitpick comments (3)
Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md (1)

3-3: 💤 Low value

Consider shortening the frontmatter description.

The description field spans multiple sentences with detailed implementation guidance. YAML frontmatter descriptions are typically concise summaries. Consider moving the detailed guidance ("Whenever you verify behavior...") to the main body and keeping only the core directive in the description.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Packages/src/Editor/CliOnlyTools`~/PausePoint/Skill/SKILL.md at line 3, The
frontmatter description is too long and contains implementation guidance;
shorten the YAML `description` in
Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md to a concise summary
(e.g., "Standard paused-frame proof for Unity PlayMode/E2E gameplay
verification.") and move the detailed guidance text starting with "Whenever you
verify behavior..." into the main document body as a separate paragraph or
section; update only the `description` field in the frontmatter and place the
longer verification steps and examples in the markdown content below.
Packages/src/Editor/ToolContracts/EditorFrameWaiter.cs (1)

156-159: ⚡ Quick win

Redundant null validation combines Debug.Assert and throw.

Lines 156-159 validate completionSource and removeRequest with both Debug.Assert and throw, duplicating the null check. Based on learnings, Debug.Assert alone is sufficient for programmer preconditions in this internal class, as the fail-fast policy expects assertions to halt during development.

♻️ Proposed simplification
 public EditorFrameWaitRequest(
     TaskCompletionSource<bool> completionSource,
     int targetFrameCount,
     Action<EditorFrameWaitRequest> removeRequest)
 {
     Debug.Assert(completionSource != null, "completionSource must not be null");
     Debug.Assert(removeRequest != null, "removeRequest must not be null");

-    _completionSource = completionSource ?? throw new ArgumentNullException(nameof(completionSource));
+    _completionSource = completionSource;
     _targetFrameCount = targetFrameCount;
-    _removeRequest = removeRequest ?? throw new ArgumentNullException(nameof(removeRequest));
+    _removeRequest = removeRequest;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Packages/src/Editor/ToolContracts/EditorFrameWaiter.cs` around lines 156 -
159, The constructor in EditorFrameWaiter redundantly validates completionSource
and removeRequest with both Debug.Assert and null-coalescing throws; replace the
null-coalescing throw checks with simple assignments and keep the Debug.Assert
preconditions only. In the EditorFrameWaiter constructor, assert
Debug.Assert(completionSource != null) and Debug.Assert(removeRequest != null),
then assign _completionSource = completionSource and _removeRequest =
removeRequest (leave _targetFrameCount assignment unchanged) so the class uses
assertions as the fail-fast policy for these internal preconditions.

Source: Learnings

Packages/src/Editor/ToolContracts/TimerDelay.cs (1)

54-62: ⚡ Quick win

Redundant null validation combines Debug.Assert and throw.

Lines 58-61 validate synchronizationContext with both Debug.Assert and throw. Based on learnings, Debug.Assert alone suffices for programmer preconditions, though this specific case validates a runtime state (whether the method was called from the correct thread), so the exception may be appropriate. However, the duplication is still redundant.

♻️ Proposed simplification (if treating as precondition)
 SynchronizationContext synchronizationContext = SynchronizationContext.Current;
 Debug.Assert(
     synchronizationContext != null,
     "WaitThenExecuteOnMainThread must start from Unity's main-thread synchronization context.");
-if (synchronizationContext == null)
-{
-    throw new InvalidOperationException(
-        "WaitThenExecuteOnMainThread must start from Unity's main-thread synchronization context.");
-}

Note: Keep the throw if this is considered runtime validation rather than a programmer precondition.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Packages/src/Editor/ToolContracts/TimerDelay.cs` around lines 54 - 62, The
code redundantly checks SynchronizationContext with both Debug.Assert and an
exception in WaitThenExecuteOnMainThread; choose one validation: if this is a
programmer precondition remove the throw/InvalidOperationException and keep only
Debug.Assert(synchronizationContext != null, "..."); if this is runtime
validation remove the Debug.Assert and keep the throw(new
InvalidOperationException("WaitThenExecuteOnMainThread must start from Unity's
main-thread synchronization context.")); update the remaining message to match
the chosen behavior and remove the duplicate null check block.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Packages/src/Editor/ToolContracts/TimerDelay.cs`:
- Around line 47-66: WaitThenExecuteOnMainThread captures
SynchronizationContext.Current but then calls action() after awaiting
Wait(milliseconds, ct) without marshaling back, so the callback can run off the
main thread; fix by invoking the captured SynchronizationContext to execute the
action on the main thread (e.g., use synchronizationContext.Post or Send to
dispatch action) after the await completes, preserving the null checks already
present and ensuring the action runs on the captured SynchronizationContext
rather than directly calling action().

---

Outside diff comments:
In `@Packages/src/Editor/FirstPartyTools/SimulateKeyboard/Skill/SKILL.md`:
- Line 17: Update the workflow step sentence in the three files
SimulateKeyboard, SimulateMouseInput, and SimulateMouseUi to match the renamed
Debug Break section "(Standard for E2E)"; specifically replace the line "If
exact-frame proof would reduce uncertainty, treat Debug Break inspection as an
optional follow-up" with wording that treats Debug Break as the standard for
state-transition verification (e.g., "For state transitions driven by simulated
input, use Debug Break inspection as standard frame proof per the section below;
supplement with logs, screenshots, and durable state"); ensure this change
appears in the workflow steps that reference the Debug Break section to keep the
guidance consistent with the "(Standard for E2E)" heading.

---

Nitpick comments:
In `@Packages/src/Editor/CliOnlyTools`~/PausePoint/Skill/SKILL.md:
- Line 3: The frontmatter description is too long and contains implementation
guidance; shorten the YAML `description` in
Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md to a concise summary
(e.g., "Standard paused-frame proof for Unity PlayMode/E2E gameplay
verification.") and move the detailed guidance text starting with "Whenever you
verify behavior..." into the main document body as a separate paragraph or
section; update only the `description` field in the frontmatter and place the
longer verification steps and examples in the markdown content below.

In `@Packages/src/Editor/ToolContracts/EditorFrameWaiter.cs`:
- Around line 156-159: The constructor in EditorFrameWaiter redundantly
validates completionSource and removeRequest with both Debug.Assert and
null-coalescing throws; replace the null-coalescing throw checks with simple
assignments and keep the Debug.Assert preconditions only. In the
EditorFrameWaiter constructor, assert Debug.Assert(completionSource != null) and
Debug.Assert(removeRequest != null), then assign _completionSource =
completionSource and _removeRequest = removeRequest (leave _targetFrameCount
assignment unchanged) so the class uses assertions as the fail-fast policy for
these internal preconditions.

In `@Packages/src/Editor/ToolContracts/TimerDelay.cs`:
- Around line 54-62: The code redundantly checks SynchronizationContext with
both Debug.Assert and an exception in WaitThenExecuteOnMainThread; choose one
validation: if this is a programmer precondition remove the
throw/InvalidOperationException and keep only
Debug.Assert(synchronizationContext != null, "..."); if this is runtime
validation remove the Debug.Assert and keep the throw(new
InvalidOperationException("WaitThenExecuteOnMainThread must start from Unity's
main-thread synchronization context.")); update the remaining message to match
the chosen behavior and remove the duplicate null check block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ad7354b1-da40-4ff4-a1c8-5cafb3567fcf

📥 Commits

Reviewing files that changed from the base of the PR and between 6392124 and 659f407.

⛔ Files ignored due to path filters (4)
  • Assets/Tests/Editor/EditorFrameWaiterTests.cs.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/Common/InputSystem/UnityCLILoop.FirstPartyTools.Common.InputSystem.Editor.asmdef is excluded by none and included by none
  • Packages/src/Editor/ToolContracts/EditorDelay.cs.meta is excluded by none and included by none
  • Packages/src/Editor/ToolContracts/EditorFrameWaiter.cs.meta is excluded by none and included by none
📒 Files selected for processing (24)
  • Assets/Editor/EditorDelayManualTests.cs
  • Assets/Tests/Editor/EditorDelayTests.cs
  • Assets/Tests/Editor/EditorFrameWaiterTests.cs
  • Assets/Tests/Editor/StaticFacadeStateGuardTests.cs
  • Assets/Tests/PlayMode/SimulateKeyboardTests.cs
  • Assets/Tests/PlayMode/SimulateMouseInputTests.cs
  • Packages/src/Editor/Application/ApplicationEditorStartup.cs
  • Packages/src/Editor/Application/SessionRecoveryService.cs
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/Common/InputSystem/InputSystemUpdateHelper.cs
  • Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/DynamicCodeDomainReloadWaitSignal.cs
  • Packages/src/Editor/FirstPartyTools/Screenshot/EditorWindowCaptureUtility.cs
  • Packages/src/Editor/FirstPartyTools/Screenshot/ScreenshotUseCase.cs
  • Packages/src/Editor/FirstPartyTools/SimulateKeyboard/SimulateKeyboardUseCase.cs
  • Packages/src/Editor/FirstPartyTools/SimulateKeyboard/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/SimulateMouseInput/SimulateMouseInputUseCase.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseInput/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/SimulateMouseUiUseCase.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/Skill/SKILL.md
  • Packages/src/Editor/ToolContracts/EditorDelay.cs
  • Packages/src/Editor/ToolContracts/EditorDelayManager.cs
  • Packages/src/Editor/ToolContracts/EditorFrameWaiter.cs
  • Packages/src/Editor/ToolContracts/TaskExtensions.cs
  • Packages/src/Editor/ToolContracts/TimerDelay.cs
💤 Files with no reviewable changes (3)
  • Assets/Tests/Editor/EditorDelayTests.cs
  • Packages/src/Editor/ToolContracts/EditorDelayManager.cs
  • Packages/src/Editor/ToolContracts/EditorDelay.cs

Comment thread Packages/src/Editor/ToolContracts/TimerDelay.cs

@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.

6 issues found across 28 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread Packages/src/Editor/FirstPartyTools/SimulateMouseUi/Skill/SKILL.md
Comment thread Packages/src/Editor/ToolContracts/EditorFrameWaiter.cs Outdated
Comment thread Packages/src/Editor/ToolContracts/TimerDelay.cs
hatayama added 2 commits June 10, 2026 23:09
Add regression coverage showing that WaitThenExecuteOnMainThread resumes its delayed action on the SynchronizationContext captured before the timer wait. This documents the intended behavior behind the PR review discussion without changing production code.
Ensure Editor frame waits do not run continuations inline from Editor update, defer zero-duration TimerDelay main-thread actions until an Editor update, and surface Input System apply failures through the awaited task so timeout paths do not wait on orphaned completions. Also align mouse skill workflow text with the Debug Break E2E guidance.
@hatayama
hatayama merged commit 7498397 into v3-beta Jun 10, 2026
8 checks passed
@hatayama
hatayama deleted the feature/fix-simulate-timeout branch June 10, 2026 14:24
@github-actions github-actions Bot mentioned this pull request Jun 10, 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