Skip to content

fix(editor): make HandlePostCompileFocusReturn and runtime log subscriptions idempotent (#138) - #175

Merged
Daliys merged 2 commits into
developmentfrom
daliys/issue-138-focus-return-idempotency
Aug 7, 2026
Merged

fix(editor): make HandlePostCompileFocusReturn and runtime log subscriptions idempotent (#138)#175
Daliys merged 2 commits into
developmentfrom
daliys/issue-138-focus-return-idempotency

Conversation

@Daliys

@Daliys Daliys commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

Fixes issue #138 by making event subscriptions idempotent in MCPServer.cs and MCPRuntimeLogger.cs.

Proposed Changes

  • Editor/MCPServer.cs: Unsubscribe HandlePostCompileFocusReturn from EditorApplication.update prior to subscribing to prevent duplicate handler accumulation across domain reloads or initialization paths ([MEDIUM] HandlePostCompileFocusReturn update subscription is not idempotent #138).
  • Runtime/MCPRuntimeLogger.cs: Unsubscribe HandleLog from Application.logMessageReceivedThreaded before subscribing to ensure idempotency when scenes initialize.
  • CHANGELOG.md: Log the fix in [Unreleased] -> Fixed.

Verification

  • Ran PYTHONDONTWRITEBYTECODE=1 scripts/prepush-validate.sh --static-only — all 38 unit tests, quality gate, and live smoke checks passed cleanly with 0 errors.

@Daliys
Daliys merged commit ae95ca1 into development Aug 7, 2026
9 of 10 checks passed
@Daliys
Daliys deleted the daliys/issue-138-focus-return-idempotency branch August 7, 2026 11: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