Skip to content

chore: Update the launch comment about how V3 schedules server recovery - #3172

Merged
hatayama merged 2 commits into
mainfrom
chore/dispatcher-launch-v2-comment
Oct 6, 2026
Merged

hatayama merged 2 commits into
mainfrom
chore/dispatcher-launch-v2-comment

Conversation

@hatayama

@hatayama hatayama commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Updates one code comment in the dispatcher's V2 launch path. No behavior change.

User Impact

  • None for users. The comment explains why the V2 launch path focuses the Editor once, and it pointed at a V3 workaround (a SignalTick call, cited by file and line numbers) that V3 has since removed. Anyone following the reference found code that no longer exists.

Changes

  • Rewrites the comment above the focus step: V2 server auto-start is scheduled on EditorApplication.delayCall, which was observed not to run while the Editor window is unfocused. V3 now queues its recovery on the main-thread dispatcher, which drains on update and tick and signals a tick when work is enqueued. V2 has no equivalent, so the launch still focuses the Editor once.
  • The V3 reference now names UnityCliLoopServerController.OnServerLoopUnexpectedlyExited instead of line numbers.
  • No code changes.

Verification

  • scripts/check-go-cli.sh stops in the local sandbox at an existing cli/common test that needs to create a folder under /tmp, unrelated to this change. In its place, cli/dispatcher passes gofmt -l (no files), go vet ./..., go build ./..., golangci-lint fmt --diff, golangci-lint run (0 issues), and go test ./.... CI runs the full check.

The comment pointed at a SignalTick call, by line number, that V3 no
longer makes: V3 now queues its recovery on the main-thread dispatcher,
which drains on update and tick and signals a tick when work is
enqueued. Name the recovery method instead of line numbers so the
reference does not go stale again. No code changes.
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: hatayama/unity-cli-loop/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 13775459-4d66-45cf-9a32-3d9fe5129156
📥 Commits

Reviewing files that changed from the base of the PR and between bc18129 and ab0b066.

📒 Files selected for processing (1)
  • cli/dispatcher/internal/dispatcher/launch_v2_lockfile.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • cli/dispatcher/internal/dispatcher/launch_v2_lockfile.go

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The V2 launch focus comment now states that EditorApplication.delayCall does not run while the Editor window is unfocused. It contrasts this with V3 dispatcher behavior and retains the described V2 focus attempt and non-fatal focus-failure handling.

Changes

Launch focus behavior

Layer / File(s) Summary
Document launch focus behavior
cli/dispatcher/internal/dispatcher/launch_v2_lockfile.go
The comment describes the unfocused-window behavior of V2 EditorApplication.delayCall and contrasts it with V3’s dispatcher. It retains the focus attempt after the lockfile gate and non-fatal handling of focus failure.

Priority: ⬇️ Low

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

Change: Other

Merge Risk: ⚪ Minimal · up to ab0b0

The clarification does not change launch behavior, and no merge-blocking issue was identified.

Architecture Summary

Architecture risk: 🔵 Low · up to bc181

The change affects 1 system.

Changed systems: cli

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — cli (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in cli/dispatcher/internal/dispatcher/launch_v2_lockfile.go: Replaced the comment’s description of a backgrounded idle Editor that may never tick with the explicit condition that V2 EditorApplication.delayCall does not run while the Editor window is unfocused. The revised comment describes V3’s dispatcher behavior and retains the stated V2 focus attempt after the lockfile gate and non-fatal focus-failure handling.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly describes the comment update about how V3 schedules server recovery.
Description check ✅ Passed The description explains the comment change, its context, and the reported verification results.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

The stall was measured in one setup, so the comment should not claim
that delayCall never runs in any unfocused Editor.
@hatayama
hatayama merged commit ffc9cf8 into main Oct 6, 2026
16 checks passed
@hatayama
hatayama deleted the chore/dispatcher-launch-v2-comment branch October 6, 2026 03:55
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