Repository navigation
fix(linux): fcitx5 auxDown 持久化 + 热键模式保存修复 + 隐藏剪贴板/胶囊设置 - #554
H-Chris233 merged 2 commits into
Conversation
…oard/capsule settings - coordinator.rs: terminal state (Done/Error/Cancelled) auto-clears after 3s; fix RETRY_GEN comparison (fetch_add returns old value, use latest_gen > gen+1); remove broken 300ms retry - HotkeySettingsContext.tsx: fix queueSetSettings never calling setSettings() (latestPrefsRef was already updated to the new object before microtask ran) - openless.cpp: add PostInputMethod event hook to restore auxDown after fcitx5 processes key events - RecordingInputSection.tsx: hide clipboard/paste/capsule settings on Linux; streaming insert shown as standalone card instead of inside clipboard group - ShortcutsSection.tsx: hide "capsule confirm" shortcut hint on Linux Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
On Linux, hide the clipboard/paste/capsule settings group and move the streaming insert toggle directly into the recording input card. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Re: the two flagged areas from the AI review:
|
|
State Desync似乎存在一个类似的问题,下周我看一下能不能修改,但触发概率确实很低,不会产生重大影响。先这样吧。 |
行,先这样吧,但别忘了。 |
|
刚才测试了一下,在谷歌里面无法输入的情况,是输入法本身出的问题,不是插件问题。输入法完全无法使用,所以不需要修改任何相关代码了。 |
|
State Desync这个问题有一定可能性发生,需要通过重启输入法来临时解决。具体来说,就是在切换窗口的时候,旧的弹窗可能没有被正确关闭,而新的弹窗已经被打开了,新的还可能会被关闭,但旧的不会了。 |
User description
变更
fcitx5 插件
openless.cpp:新增PostInputMethod事件钩子,fcitx5 按键处理后自动恢复 auxDown 文字,解决状态提示被键盘事件覆盖的问题后端
coordinator.rs:终态(✅已插入/❌出错/—已取消)3 秒后自动清除 auxDown;修复RETRY_GEN代数比较(fetch_add返回旧值,改为latest_gen > gen+1);移除无效的 300ms 重试前端
HotkeySettingsContext.tsx:修复queueSetSettings永久跳过setSettings()的 bug(latestPrefsRef在 microtask 执行前已被同步更新为新对象,导致next === current)RecordingInputSection.tsx:Linux 隐藏剪贴板/粘贴/胶囊设置组,流式输入开关移入录音卡片内ShortcutsSection.tsx:Linux 隐藏"胶囊确认插入"快捷键提示已知问题(Linux)
Linux / Wayland 使用说明
在 Wayland 下使用 fcitx5 时,需要在系统设置中开启 允许 X11 应用(兼容性 → X11 应用监测快捷键),否则 fcitx5 插件在部分应用中可能无法捕获热键。
🤖 Generated with Claude Code
PR Type
Bug fix, Enhancement
Description
Fix Linux fcitx5 auxDown persistence
Restore saved hotkey settings reliably
Hide Linux-only settings clutter
Auto-clear terminal capsule states
Diagram Walkthrough
File Walkthrough
coordinator.rs
Fix capsule state timing and retriesopenless-all/app/src-tauri/src/coordinator.rs
set_aux_down.HotkeySettingsContext.tsx
Fix queued settings persistenceopenless-all/app/src/state/HotkeySettingsContext.tsx
queueSetSettingsto persist a resolved preference object.latestPrefsRefinside the queued microtask.setSettings()could be skipped permanently.openless.cpp
Restore auxDown after key handlingopenless-all/scripts/linux-fcitx5-plugin/openless.cpp
PostInputMethodkey event watcher.lastAuxText_after fcitx5 processes key events.auxDownfrom being cleared by enter/backspace handling.RecordingInputSection.tsx
Rework Linux recording settings layoutopenless-all/app/src/pages/settings/RecordingInputSection.tsx
detectOS()and branches UI rendering.ShortcutsSection.tsx
Hide Linux-only shortcut hintopenless-all/app/src/pages/settings/ShortcutsSection.tsx