Skip to content

Defer shell searches until IME composition is committed - #142

Open
Nagi-Inaba wants to merge 1 commit into
ARahim3:mainfrom
Nagi-Inaba:fix/ime-composition-search
Open

Nagi-Inaba wants to merge 1 commit into
ARahim3:mainfrom
Nagi-Inaba:fix/ime-composition-search

Conversation

@Nagi-Inaba

Copy link
Copy Markdown

Issue: Closes #135. Scope agreed in #135 (comment).

What changed and why:

The shell now waits for Japanese IME composition to finish before submitting the query. Both search fields track composition, cancel the previous debounce, and invalidate outstanding replies so intermediate text and older results do not interrupt conversion. Committed text follows the existing search flow once, including when the final input event arrives before or after compositionend. Enter/Escape remain with the IME while composition is active.

The main window uses its existing query state for duplicate detection, so searches handed over from the panel can still be cleared. Programmatic searches and ordinary typing retain their existing behavior. Added dependency-free Node regression tests and run them in the shell CI job.

Tests run:

  • node --test shell/tests/composition.test.cjs: 17 passed. The composition regressions were also exercised against the original source and failed as expected; the initial-query clearing regression failed before its correction.

  • swift test through the cloud toolchain wrapper: both targets passed (7 tests in 2 LlamaRuntime suites, with the model-dependent reference-vector test skipped; 114 tests in 16 DigUpKit suites).

  • cargo test --locked -j 3 in shell/src-tauri: 12 passed.

  • node --check for all six shell UI JavaScript files; git diff --check: passed.

  • Playwright with headless Chromium on Linux, 1000×800: both real HTML pages loaded without application console errors; synthetic composition produced no searches for intermediate text and one semantic search for committed 東京. Also checked Enter/Escape during composition and clearing an initial handed-over query. Tauri IPC was mocked for this browser check; the Browser plugin was not available.

  • Windows x64 build: the patched release shell compiled successfully and all 17 composition tests passed on a Windows runner: https://github.com/Nagi-Inaba/DigUp/actions/runs/39717366807.

  • Real Windows/WebView2 with a Japanese IME: the contributor manually checked both the panel and main window on Windows 11 Pro 25H2 (OS build 26200.9711) using the default Windows Japanese IME (Microsoft IME; its version was not recorded). Conversion remained stable without results cycling through intermediate input, committed text was searched, and the Enter used to commit conversion did not open a result.

The manual Windows check used a portable test build of this patched shell (b036b07) with the checksum-verified helper/DLLs from the official v0.7.0-beta.2 release. This verifies the IME interaction, rather than a complete rebuild of the latest Windows engine or installer. The test packaging is on a separate branch and is not part of this PR. All cloud-side development and Linux checks ran in a Linux environment. Native Linux/WebKit IME input has not been checked.

Search-result evals: not run. Matching, ranking, model weights and index storage are unchanged; this change controls submission timing for uncommitted input.

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.

Defer shell searches until IME composition is committed

1 participant