feat(windows): add selected-text polish workflow#851
Open
SeanZhang226 wants to merge 1 commit into
Open
Conversation
Contributor
PR Reviewer Guide 🔍(Review updated until commit e53af2e)Here are some key observations to aid the review process:
|
SeanZhang226
force-pushed
the
feat/selection-polish-core
branch
from
July 21, 2026 16:35
274a73f to
e53af2e
Compare
Contributor
|
Persistent review updated to latest commit e53af2e |
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.
User description
Summary
OpenLess voice input is very convenient, but speaking is not always practical in meetings, shared offices, or public places.
This PR adds a Windows-first selected-text polish workflow:
The goal is to provide a small, practical keyboard-based complement to voice input, not a new chat workflow.
What changed
Added a global shortcut and settings section for selected-text polish.
Right Ctrl.Right Alt.Added a safe selected-text workflow.
Added separate prompts for the two workflows.
Added shortcut conflict checks and lightweight capsule feedback.
Platform scope
This feature was developed and tested on Windows through real desktop use.
OpenLess itself remains cross-platform, but this selected-text workflow currently relies on Windows-specific desktop integration for global shortcuts, foreground-window checks, and safe cross-application replacement. macOS and Linux support has not yet been implemented or validated.
Privacy and configuration
Validation
npm test— passed (23 frontend checks)cargo test --manifest-path src-tauri/Cargo.toml --lib— passed (788 tests)Disclosure
This contribution was implemented and tested with assistance from an AI coding agent. The contributor reviewed the design, performed real-use testing, and is responsible for the final submission.
Note
A full Windows NSIS installer smoke test should still be completed through the project's existing IME packaging workflow before a release build is published.
PR Type
Enhancement
Description
Add configurable global shortcut for selected-text polish (default RightAlt on Windows)
Implement safe clipboard-based capture and target verification before inserting
Introduce dedicated selection prompts per style pack, separate from ASR prompts
Support direct replacement and preview-confirm modes with history tracking
Diagram Walkthrough
File Walkthrough
16 files
New selection polish workflow moduleAdd HistorySource, SelectionPolishOutputMode, selection promptsAdd safe target capture and validation for WindowsAdd epoch-guarded capsule for selection polishAdd selection polish hotkey bridge and supervisor loopsAdd SelectionPolishShortcutPressed event and routingIntegrate selection polish module and capsule epoch fieldsRegister new commands and preview window factoryTauri commands for triggering selection polishCommands for preview confirm/cancel and get payloadAdd set_selection_polish_hotkey commandInclude selection polish preferences in settings read/writeSelection polish preview UI componentSettings UI for selection polish hotkey and modeIPC bindings for preview windowSupport selection_polish flag in capsule state1 files
Add conflict check with selection polish hotkey3 files
Light style selection polish promptStructured style selection polish promptFormal style selection polish prompt21 files