Map Debian multiarch addon dir to /usr/lib64 for RPM packages.
Uses FCITX_RPM_ADDON_DIR derived from cmake output instead of
hardcoded paths.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add SetCustomDictationTrigger(s) to plugin for custom key combos
- Add fcitx5 availability check before hotkey install, surface error
- Sync custom dictation combo to fcitx5 plugin from coordinator
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Extend the fcitx5 plugin with SetQaHotkeyRaw/SetTranslationHotkeyRaw
DBus methods and corresponding signals, so that QA panel toggle and
translation modifier hotkeys work on Linux (not just the main dictation
hotkey). Built-in Shift key translation modifier also handled by the
plugin. Document DBus security model in plugin header.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Remove 290 lines of unused rdev listener code from the Linux hotkey
platform module, drop the rdev dependency from Cargo.toml, and clean up
capsule_window_visible init leftover. Update doc comments and frontend
i18n to reflect the unified fcitx5-only path.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ic->connect(ic->destroyed, ...) is invalid — InputContext has no two-arg
connect overload. Use ic->destroyed.connect(callback) directly, which
calls Signal<void()>::connect. Also simplified ScopedConnection storage
from unique_ptr to direct member (ScopedConnection is move-assignable).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Prevents savedIc_ from becoming a dangling pointer by connecting to the
InputContext::destroyed signal when the IC is saved. On destruction the
pointer is cleared automatically, and commitText falls through to
foreachFocused for the current focused IC.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
FCITX_INSTALL_ADDONDIR varies by distro (multiarch Ubuntu →
/usr/lib/x86_64-linux-gnu/fcitx5/; Fedora → /usr/lib64/fcitx5/;
Arch → /usr/lib/fcitx5/). Extract from cmake cache at build time
via GITHUB_ENV instead of hardcoding.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When ensure_modifier_hotkey_monitor finds an existing monitor and
updates the rdev/CGEventTap binding, it must also sync the new binding
to the fcitx5 plugin on Wayland. Previously the early return skipped
this, leaving plugin and coordinator out of sync after a hotkey change.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add "Build fcitx5 plugin" step to release-tauri.yml: compiles
the C++ plugin via cmake, copies .so + .conf to
src-tauri/linux-fcitx5-plugin/ for the Tauri bundler.
- Override tauri build --config to include deb.files / rpm.files
that place the plugin at /usr/lib/fcitx5/ so it's auto-detected
after install.
- Add fcitx5, fcitx5-module-dbus as deb/rpm dependencies.
- Local builds unaffected (config is CI-only via --config flag).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add #[cfg(target_os = "linux")] to mod linux_fcitx to fix macOS/Windows
CI compilation (dbus crate is Linux-only).
- Wayland: skip capsule window show/hide entirely in emit_capsule so the
target app never loses keyboard focus. Text is committed via fcitx5
plugin commit_string — no window means the compositor forwards the
commit to the right app.
- X11 keeps existing behavior (show capsule window once per session).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- fcitx5 C++ plugin (scripts/linux-fcitx5-plugin/) with DBus interface:
CommitText, SetHotkey/SetHotkeyRaw, DictationKeyEvent signal
- linux_fcitx.rs: DBus client to call plugin from Rust
- coordinator/dictation.rs: Wayland insertion via fcitx5 commit_text,
streaming insert enabled on Wayland
- insertion.rs: fcitx5 commit_text on Linux with clipboard fallback
- unicode_keystroke.rs: Linux path uses fcitx5 commit_text
- Capsule window show-once on Linux to avoid stealing focus
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Older builds could persist the old default streamingInsert=false into preferences.json, which is indistinguishable from a user opt-out if the value is treated as an ordinary bool. Add a one-time migration marker, persist normalized legacy prefs on load, and keep later user opt-outs durable after migration.
Constraint: issue #440 requests streaming input/output defaults on for fresh installs and updates, plus release notes for the behavior change.
Rejected: treating any stored false as manual opt-out | old default writes would keep update users off forever.
Rejected: overriding every false forever | would erase a user's post-migration manual opt-out.
Confidence: high
Scope-risk: moderate
Directive: Keep UserPreferencesWire serde defaults and migration markers aligned with persisted UserPreferences fields.
Tested: cargo test --manifest-path src-tauri/Cargo.toml --lib streaming_insert -- --nocapture
Tested: cargo test --manifest-path src-tauri/Cargo.toml --lib legacy_streaming_insert_false_is_migrated_and_marker_is_persisted -- --nocapture
Tested: npm run build
Tested: cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml --lib
Tested: git diff --check
Not-tested: cargo fmt --check fails on pre-existing unrelated formatting drift in volcengine.rs and commands.rs.
Wayland now uses CLI-triggered dictation and copy-only output safety, so user-visible Linux hints should not imply that Wayland streaming insertion or global hotkeys are still attempted inside OpenLess.
Constraint: Wayland trigger support is currently delivered through desktop shortcuts invoking openless CLI flags.
Rejected: Leaving old best-effort Wayland wording in Settings | It conflicts with Phase 1 copy-only behavior and the CLI trigger path.
Confidence: high
Scope-risk: narrow
Directive: Keep future portal/libei language in research docs, not current-product Settings hints.
Tested: npm run build; cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml; git diff --check
Not-tested: Live Wayland Settings rendering on GNOME/KDE/Hyprland/sway.
Wayland cannot prove synthetic typing or paste delivery, so Linux Wayland now bypasses streaming success semantics and keeps completed dictation text in the clipboard with explicit fallback status. The Phase 1 plan is recorded at repo root to keep follow-up work aligned with the current CLI trigger decision.
Constraint: Wayland security model does not provide X11-style global key or cross-app text injection guarantees.
Rejected: Treating enigo or simulated paste success as inserted on Wayland | It can report success while the target app receives no text.
Confidence: high
Scope-risk: narrow
Directive: Keep Wayland automatic input as an explicitly probed future enhancement; do not silently restore fake insertion success.
Tested: cargo fmt --manifest-path openless-all/app/src-tauri/Cargo.toml; cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml --lib coordinator::dictation; cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml --lib focus_restore_failure_uses_specific_error_code; git diff --check; cargo check --manifest-path openless-all/app/src-tauri/Cargo.toml
Not-tested: Real Wayland compositor clipboard behavior and Windows TSF runtime behavior on native hosts.
Constraint: legacy preferences may have defaultMode without activeStylePackId, and Raw style packs may still use the LLM path
Rejected: defaulting missing activeStylePackId to builtin.light | silently changes Raw, Structured, and Formal users during upgrade
Rejected: skipping script normalization for Raw LLM output | lets Simplified/Traditional preferences be bypassed by raw style packs
Confidence: high
Scope-risk: narrow
Directive: treat missing activeStylePackId as a migration case derived from defaultMode, not as the new-user default
Tested: cargo fmt --manifest-path src-tauri/Cargo.toml; git diff --check; cargo test --manifest-path src-tauri/Cargo.toml --lib types::tests::missing_active_style_pack_id_uses_legacy_default_mode; cargo test --manifest-path src-tauri/Cargo.toml --lib types::tests::explicit_active_style_pack_id_is_preserved; cargo test --manifest-path src-tauri/Cargo.toml --lib coordinator::dictation::tests::raw_llm_output_still_applies_script_preference; cargo test --manifest-path src-tauri/Cargo.toml --lib
Not-tested: full app build; desktop runtime smoke on macOS/Windows
Constraint: hotword wording appears in both effective system prompts and preview diagnostics
Rejected: keeping the slash form | less natural and leaves preview wording harder to read
Confidence: high
Scope-risk: narrow
Directive: keep hotword preview wording aligned with the system prompt wording
Tested: cargo fmt --manifest-path src-tauri/Cargo.toml; git diff --check; cargo test --manifest-path src-tauri/Cargo.toml --lib polish::tests::
Not-tested: full app build; desktop runtime smoke on macOS/Windows
Constraint: type_unicode_chunk returns the actual count of inserted characters, including partial failures
Rejected: appending the full delta after every successful call | hides short writes and makes typed_text diverge from the screen
Confidence: high
Scope-risk: narrow
Directive: preserve typed_text as the source of truth for what actually reached the focused field during streaming insertion
Tested: cargo fmt --manifest-path src-tauri/Cargo.toml; git diff --check; cargo check --manifest-path src-tauri/Cargo.toml; cargo test --manifest-path src-tauri/Cargo.toml --lib
Not-tested: desktop runtime smoke on macOS/Windows