Revert the terminal IME composition-ownership change (#13282)

* Revert "test(ime): restore coverage the composition-ownership change removed (#13168)"

This reverts commit 25a8c517e1.

* Revert "refactor(terminal): return IME composition ownership to xterm (#13128)"

This reverts commit 17b3dff3c4.

* test(ime): keep the architecture-neutral Korean trace coverage

The recorded IBus/fcitx5 and Windows MS-Korean traces from #13168 assert PTY
byte order, not composition ownership, so they still hold once the terminal
composition layer is restored. The mobile accessory-order test pinned the new
handleLiveInputChange signature and does not.

Co-authored-by: Orca <help@stably.ai>

* fix(terminal): keep the macOS Backslash bypass through the revert

The restored native-text forwarder only claims keys for input sources in its
hardcoded CJK allowlist, so third-party IMEs off that list (Qingg, #10896) still
get a raw backslash. #13128 added this bypass as a partial replacement; keep it
rather than trade the open issue back.

Scoped to the bare backslash key. The rest of shouldBypassXtermForMacNativeText
bypassed all unmodified non-ASCII text, which would race the restored forwarder.

Co-authored-by: Orca <help@stably.ai>

* fix(mobile): move the mirror-step ref write out of render

The restored hook assigned runMirrorStepRef during render, which is not
replay-safe — React can discard render work, so the mutation can leak from UI
that never commits. Its only read is inside the held-commit timer, which fires
long after commit, and the ref has a safe default, so an effect is soon enough.

Surfaced by the changed-lines React Doctor gate: the rule postdates this code,
so restoring the file re-introduced it as a new violation.

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Neil
2026-08-08 19:06:50 -07:00
committed by GitHub
co-authored by Orca
parent 17eefef502
commit 17cfc968cf
329 changed files with 12642 additions and 20092 deletions
+1 -33
View File
@@ -173,34 +173,6 @@ jobs:
done
exit "$status"
xterm_patch_sync:
name: xterm patch sync
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- uses: ./.github/actions/install-node-dependencies
# Why: the check rebuilds xterm.js from a pinned upstream commit. Caching the
# npm metadata and the shallow clone turns a ~4 min cold run into well under a
# minute; the key is the manifest, so a commit or toolchain bump invalidates it.
- name: Restore upstream xterm build inputs
uses: actions/cache@v4
with:
path: |
~/.npm
${{ runner.temp }}/xterm-patch-build/upstream/.git
key: xterm-upstream-${{ hashFiles('config/patches/xterm-upstream.json') }}
- name: Verify xterm patches match the pinned upstream build
env:
WORK_DIR: ${{ runner.temp }}/xterm-patch-build
run: node config/scripts/regenerate-xterm-patches.mjs --check --work-dir="$WORK_DIR"
shell_contracts:
name: shell contracts
runs-on: ubuntu-latest
@@ -443,8 +415,7 @@ jobs:
BASE="${{ github.event.pull_request.base.sha }}"
HEAD="${{ github.event.pull_request.head.sha }}"
CHANGED="$(git diff --name-only --diff-filter=AMCR --merge-base "$BASE" "$HEAD")"
# Native specs require their dedicated platform harnesses.
TEST_FILES="$(printf '%s\n' "$CHANGED" | grep -E '^tests/e2e/.*\.spec\.ts$' | grep -Ev -- '-native\.spec\.ts$' || true)"
TEST_FILES="$(printf '%s\n' "$CHANGED" | grep -E '^tests/e2e/.*\.spec\.ts$' || true)"
TEST_FILES_JSON="$(printf '%s\n' "$TEST_FILES" | jq --raw-input --slurp --compact-output 'split("\n") | map(select(length > 0))')"
echo "test_files=$TEST_FILES_JSON" >> "$GITHUB_OUTPUT"
if [ "$TEST_FILES_JSON" != '[]' ]; then
@@ -473,7 +444,6 @@ jobs:
- root_directory_guard
- typecheck
- git_compatibility
- xterm_patch_sync
- shell_contracts
- test
- managed_hook_node18
@@ -496,7 +466,6 @@ jobs:
ROOT_DIRECTORY_GUARD: ${{ needs.root_directory_guard.result }}
TYPECHECK: ${{ needs.typecheck.result }}
GIT_COMPATIBILITY: ${{ needs.git_compatibility.result }}
XTERM_PATCH_SYNC: ${{ needs.xterm_patch_sync.result }}
SHELL_CONTRACTS: ${{ needs.shell_contracts.result }}
TEST: ${{ needs.test.result }}
MANAGED_HOOK_NODE18: ${{ needs.managed_hook_node18.result }}
@@ -508,7 +477,6 @@ jobs:
"$ROOT_DIRECTORY_GUARD" \
"$TYPECHECK" \
"$GIT_COMPATIBILITY" \
"$XTERM_PATCH_SYNC" \
"$SHELL_CONTRACTS" \
"$TEST" \
"$MANAGED_HOOK_NODE18" \
+9 -71
View File
@@ -9,20 +9,10 @@ permissions:
contents: read
jobs:
linux:
name: Linux ${{ matrix.label }} terminal IME
runs-on: ${{ matrix.os }}
linux-x11:
name: Linux X11 terminal IME
runs-on: ubuntu-22.04
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
include:
- label: X11
os: ubuntu-22.04
display_server: x11
- label: Wayland
os: ubuntu-24.04
display_server: wayland
steps:
- name: Checkout
@@ -37,17 +27,10 @@ jobs:
build-essential
dbus-x11
dconf-gsettings-backend
fcitx5
fcitx5-chinese-addons
fcitx5-frontend-gtk3
fcitx5-hangul
ibus
ibus-hangul
ibus-libpinyin
libglib2.0-bin
python3
sway
wtype
xdotool
xfwm4
xvfb
@@ -73,57 +56,7 @@ jobs:
- name: Build Electron app for E2E
run: pnpm exec electron-vite build --mode e2e
- name: Run native IBus exact-byte tests
if: matrix.display_server == 'x11'
env:
ORCA_E2E_NATIVE_IME: ibus
SKIP_BUILD: '1'
run: pnpm run test:e2e:terminal-ime-native
- name: Upload native IBus evidence
if: ${{ always() && matrix.display_server == 'x11' }}
uses: actions/upload-artifact@v7
with:
name: terminal-ime-native-evidence
path: test-results/
retention-days: 7
if-no-files-found: ignore
- name: Run native Fcitx5 exact-byte tests
if: matrix.display_server == 'x11'
env:
ORCA_E2E_NATIVE_IME: fcitx5
SKIP_BUILD: '1'
run: pnpm run test:e2e:terminal-ime-native
- name: Upload native Fcitx5 evidence
if: ${{ always() && matrix.display_server == 'x11' }}
uses: actions/upload-artifact@v7
with:
name: terminal-ime-native-fcitx5-evidence
path: test-results/
retention-days: 7
if-no-files-found: ignore
- name: Run native Fcitx5 Wayland exact-byte tests
if: matrix.display_server == 'wayland'
env:
ORCA_E2E_NATIVE_DISPLAY_SERVER: wayland
ORCA_E2E_NATIVE_IME: fcitx5
SKIP_BUILD: '1'
run: pnpm run test:e2e:terminal-ime-native
- name: Upload native Fcitx5 Wayland evidence
if: ${{ always() && matrix.display_server == 'wayland' }}
uses: actions/upload-artifact@v7
with:
name: terminal-ime-native-fcitx5-wayland-evidence
path: test-results/
retention-days: 7
if-no-files-found: ignore
- name: Run deterministic terminal IME boundary tests
if: matrix.display_server == 'x11'
run: >-
xvfb-run --auto-servernum
env SKIP_BUILD=1 ORCA_E2E_FORWARD_APP_LOGS=1
@@ -131,8 +64,13 @@ jobs:
tests/e2e/terminal-ime-exact-byte.spec.ts
--workers=1
- name: Run native IBus Hangul exact-byte tests
env:
SKIP_BUILD: '1'
run: pnpm run test:e2e:terminal-ime-native
- name: Upload terminal IME evidence
if: ${{ always() && matrix.display_server == 'x11' }}
if: always()
uses: actions/upload-artifact@v7
with:
name: terminal-ime-evidence