fix: pause-point disconnect no longer leaves Play Mode stuck; quiet-save before CLI Play#1756
Conversation
…k paused (#1754) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
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 ignored due to path filters (3)
📒 Files selected for processing (21)
📝 WalkthroughWalkthroughThe PR adds shared quiet saving for dirty Unity scenes and Prefab Stages, blocks Play mode when saving fails or changes remain, and extends pause-point resume handling for clearing, capture expiry, and client disconnects. ChangesUnsaved editor changes
Pause-point resume and expiration
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant ControlPlayModeUseCase
participant EditorUnsavedChangesQuietSaver
participant UnityEditor
ControlPlayModeUseCase->>EditorUnsavedChangesQuietSaver: Save dirty editor changes
EditorUnsavedChangesQuietSaver->>UnityEditor: Save scenes and Prefab Stage
UnityEditor-->>EditorUnsavedChangesQuietSaver: Save results
ControlPlayModeUseCase->>EditorUnsavedChangesQuietSaver: Detect remaining changes
EditorUnsavedChangesQuietSaver-->>ControlPlayModeUseCase: Failure or remaining paths
ControlPlayModeUseCase-->>UnityEditor: Start Play mode only when clear
sequenceDiagram
participant ClientDisconnect
participant UloopPausePointRegistry
participant EditorUpdate
participant UnityEditor
ClientDisconnect->>UloopPausePointRegistry: Request editor resume
EditorUpdate->>UloopPausePointRegistry: Apply pending resume
UloopPausePointRegistry->>UnityEditor: Set editor pause state to false
EditorUpdate->>UloopPausePointRegistry: Apply capture-window expirations
UloopPausePointRegistry->>UnityEditor: Resume after expiration
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
|
LGTM (merge after required CI including Compile Check is green). Verified this umbrella contains exactly the two reviewed sub-PR squash merges (#1754 → 48c0155, #1755 → b9a6216) and the diff against v3-beta (24 files, +585/−146) matches the sum of the reviewed sub-PR diffs — no extra changes. The body correctly documents the approved Option B trade-off (auto-resume also clears a manual pause) and the resume-from-pause no-rewrite guarantee. |
Summary
control-play-mode Playquietly saves dirty Scenes / Prefab Stage before Edit→Play (same path as run-tests)User Impact
DisconnectAllClientsresume Play Mode; Edit→Play auto-saves dirty editor assets or fails with an explicit listSub-PRs (already merged into this branch)
EditorUnsavedChangesQuietSaverOut of scope
Test plan
v3-beta)await-pause-pointHit, short commands do not resume until Clear/expiryuloop control-play-mode --action Play→ Scene saved, Play startsMade with Cursor