fix(options): preserve existing confirmation handlers

Draft
KN
5d ago
+160-1

Confirmed defect

The translation plugin overrides Window_Options.processOk, but delegates non-language options to Window_Command.processOk. This skips the existing options handler, so confirming ordinary boolean and volume options no longer performs their normal updates. Earlier plugins' options handlers are also bypassed.

Change

Capture the existing Window_Options.processOk before overriding it, and delegate non-language confirmations with the same receiver, arguments and return value. Keep the language branch unchanged.

Only DynamicTranslation.js and a new offline regression test change. This standalone fix is based on main 83ceac969392e7ea1948652d0b2dd6d06233ddeb; it does not update or combine #5–#8, dependencies, lockfiles or workflows.

Validation

  • New tests on the original source: 3 failed, 1 passed. The language-cycle control already passed.
  • Final full Jest suite: 72 passed. Tests cover boolean toggling, volume adjustment/wraparound, earlier-plugin receiver/argument/return preservation, and language-handler isolation.
  • Python installer suite: 27 passed under the frozen uv lock with the dev extra.
  • JavaScript syntax checks and git diff --check: passed.
  • Independent read-only review reran all four focused tests and found no blocker.
  • Node 24.22.1 / npm 11.9.0; Python 3.12.14. npm ci --ignore-scripts --no-audit --no-fund succeeded using a temporary writable cache; the default cache was unavailable. No build/lint scripts are defined.
  • All 15 base text files were verified against their Git blob IDs before editing. The published tree changes exactly the intended two paths; both branch files were read back byte-for-byte and match the tested files.

Head: 5675d19dffb87f37c06e2aac1938a686a94226b4. Hosted CI is pending and must be checked for this exact head.

Limits

These are offline fixtures with modeled RPG Maker option handlers, not live MV/MZ UI acceptance. The unchanged development dependency graph still reports 11 vulnerable-package records (3 high, 1 moderate, 7 low); dependency remediation remains separate, including existing #6. No runtime dependency was added. No merge, deployment, release, real game installation or permission changes.

Summary by Sourcery

Restore normal option-handler behavior while retaining the translation plugin’s language selection controls.

Bug Fixes:

  • Preserve existing option confirmation and cursor handlers so boolean and volume settings continue to update normally, including handlers installed by earlier plugins.

Enhancements:

  • Keep language selection actions isolated while delegating all other option interactions through the existing handlers.

Tests:

  • Add regression coverage for boolean toggling, volume adjustment and wraparound, handler receiver/argument/return preservation, and language-option isolation.

Summary by cubic

Fixes the translation plugin's option handling so confirming boolean and volume options still performs their normal updates, and earlier plugins' handlers aren't bypassed. Also keeps language values valid when the language option is changed with the arrow keys.

  • Captures the existing Window_Options.processOk before overriding it and delegates non-language confirmations with the same receiver, arguments, and return value.
  • Routes cursorRight and cursorLeft on the language option through the language cycle instead of the engine's boolean option path.
  • Adds regression tests covering boolean toggling, volume wraparound, arrow-key language cycling, earlier-plugin handler preservation, and language-cycle isolation.

Arrow-key follow-up (2026-11-13)

Head 93efc16a441fcaba1c10d54d48cf9c1749015585 also keeps the language option out of the engine's boolean left/right paths, which otherwise save true or false as the language. Both arrows reuse the existing language cycle; non-language handlers retain their receiver, arguments and return value. Four new tests cover persisted language strings/cycle order and boolean/volume/delegation controls. They produced 2 failures and 2 passes before the fix, then all passed.

The final full suite passed 76 Jest tests locally and in both Node 18/20 CI jobs; the Python installer job passed all 27 tests. Syntax checks and whitespace validation passed. The remote head/tree were read back; the tested PR merge-ref tree equals the published tree af87265c651a1b7afdb4dcdd7db0e7a654e94f70. Dependencies, workflows and prior PRs remain unchanged. These are offline engine-handler fixtures, not live MV/MZ game UI acceptance. The PR remains Draft and unmerged.