Skip to content

Shorten Windows IME submit timeout - #514

Merged
H-Chris233 merged 1 commit into
Open-Less:betafrom
H-Chris233:issue-491-ime-clipboard-followup
May 21, 2026
Merged

Shorten Windows IME submit timeout#514
H-Chris233 merged 1 commit into
Open-Less:betafrom
H-Chris233:issue-491-ime-clipboard-followup

Conversation

@H-Chris233

@H-Chris233H-Chris233 commented May 21, 2026

Copy link
Copy Markdown
Collaborator

User description

Summary

  • Shorten the Windows IME native owner-thread and async edit-session waits from 3s to 2s each.
  • Keep Rust-side IME_SUBMIT_TIMEOUT greater than the native total wait, reducing the worst-case submit stall from 7s to 5s without allowing late IME commits to race the fallback path.
  • Leave clipboard restore timing unchanged because the current path already restores only when the clipboard still matches the inserted text and has delayed-terminal coverage.

Test Plan

  • git diff --check
  • cargo test --manifest-path "/home/chris233/openless/openless-all/app/src-tauri/Cargo.toml" windows_ime_ipc
  • cargo check --manifest-path "/home/chris233/openless/openless-all/app/src-tauri/Cargo.toml" --target "x86_64-pc-windows-gnu"

Notes: Native OpenLessIme.dll build still needs Windows/MSVC CI or real Windows validation.

Refs #491


PR Type

Bug fix, Tests


Description

  • Shorten native IME wait times

  • Cap Rust submit timeout at 5s

  • Sync C++ submit timeout constant

  • Add regression test for budget


Diagram Walkthrough

flowchart LR
A["Windows IME native waits"] -- "2s + 2s" --> B["Rust submit timeout (5s)"]
C["C++ submit timeout"] -- "2s" --> A
B -- "verified by" --> D["Regression test"]
Loading

File Walkthrough

Relevant files
Bug fix
windows_ime_ipc.rs
Lower Rust IME timeout budget

openless-all/app/src-tauri/src/windows_ime_ipc.rs

  • Reduces native owner-thread and async edit-session waits from 3s to
    2s.
  • Keeps the Rust submit timeout at 5s, preserving the native wait
    margin.
  • Adds a regression test asserting the 5000ms follow-up stall budget.
+7/-2
text_service.cpp
Match native IME timeout in C++

openless-all/app/windows-ime/src/text_service.cpp

  • Lowers kSubmitTextTimeoutMs from 3000 to 2000.
  • Aligns the Windows IME message timeout with the shorter native wait
    path.
+1/-1

@github-actions

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

491 - PR Code Verified

Compliant requirements:

  • Native IME wait timeouts shortened from 3s to 2s.
  • Rust submit timeout kept above the native total wait and capped at 5s.
  • Regression test added for the timeout budget.

Requires further human verification:

  • Real Windows end-to-end validation that recording no longer causes the multi-second stall and that IME commits still behave correctly under slow/native edge cases.
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@H-Chris233
H-Chris233 merged commit ebc9d47 into Open-Less:betaMay 21, 2026
4 checks passed
appergb pushed a commit that referenced this pull request May 22, 2026
…s/Linux 修复
自 v1.3.4-11-beta-tauri 以来的改动:
- feat(ui): 给划词追问框与语音胶囊加磨砂玻璃质感(#519)
- fix(linux): 修复 Linux 主窗口控件(#518 / issue #517)
- fix(windows): 缩短 Windows IME 提交超时(#514 / issue #491)
- fix(windows): 流式 SendInput 节流(#513 / issue #491)
- feat(asr): 新增更大的 Foundry Whisper 模型(#512 / issue #511)
- fix(asr): 修复智谱 ASR endpoint 处理(#510 / issue #507)
- fix(ui+network): 更新/登录/网络检测/市场加载四项修复
- fix(asr): 修复智谱批量 ASR 分片(#509 / issue #508)
本次只动版本号,逻辑改动已在上述 PR 落盘。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@H-Chris233
H-Chris233 deleted the issue-491-ime-clipboard-followup branch May 29, 2026 10:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@H-Chris233