Repository navigation
Defer shell searches until IME composition is committed - #142
Open
Nagi-Inaba wants to merge 1 commit into
Open
Nagi-Inaba wants to merge 1 commit into
Nagi-Inaba wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 testthrough 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 3inshell/src-tauri: 12 passed.node --checkfor 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 officialv0.7.0-beta.2release. 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.