Skip to content

fix(options): preserve existing confirmation handlers - #9

Draft
knowlet wants to merge 2 commits into
mainfrom
fix/options-confirmation-handler-20261111
Draft

knowlet wants to merge 2 commits into
mainfrom
fix/options-confirmation-handler-20261111

Conversation

@knowlet

@knowlet knowlet commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

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.

Written for commit 93efc16. Summary will update on new commits.

View guided diff Turn on auto-fix

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.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · 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

@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Delegate non-language confirmations to the existing options handler, preserving its receiver, arguments, and return value while keeping language selection unchanged.

  • DynamicTranslation.js L544, L551-554

Route language-option arrow-key input through the language cycle while preserving existing handlers for other options.

  • DynamicTranslation.js L555-569

Tests

Test confirmation dispatch for ordinary options, volume wraparound, prior handlers, and isolation of language selection.

  • tests/options-process-ok.test.js L1-80

Test language arrow-key cycling and preservation of existing handlers for non-language options.

  • tests/options-cursor.test.js L1-60

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Route the language option's left and right handlers through the existing
language cycle instead of the engine's boolean option path. Preserve
non-language handlers with their receiver, arguments and return value.

Cover persisted language strings, cycle order, boolean/volume controls,
and earlier-plugin handler delegation.
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