Avoid activating OpenLess when showing dictation capsule#456
Open
H-Chris233 wants to merge 1 commit into
Open
Conversation
Route the capsule show path through platform no-activate behavior so macOS can use orderFrontRegardless during dictation while preserving the existing fallback path when native handles are unavailable. Constraint: issue Open-Less#452 requires AeroSpace users not to be pulled back to the OpenLess workspace during dictation startup. Rejected: removing macOS fallback entirely | product decision is to preserve visible recording feedback if no-activate cannot access ns_window. Confidence: medium Scope-risk: narrow Directive: macOS fallback to window.show is intentional but may still switch workspace; validate on real macOS with AeroSpace before claiming full issue acceptance. Tested: npm run build; cargo test --manifest-path openless-all/app/src-tauri/Cargo.toml --lib -- --test-threads=1; git diff --check Not-tested: macOS real-device AeroSpace workspace behavior
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Collaborator
Author
|
@appergb 请在真机上进行测试 |
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
NSWindow orderFrontRegardlesspath so showing the recording capsule does not normally activate OpenLess or pull AeroSpace back to the OpenLess workspace.window.show()fallback when no-activate cannot access the native window, so recording feedback is not lost.Fallback behavior
ns_window()is unavailable/null, the code intentionally falls back towindow.show().Needs macOS real-device validation
This PR was implemented and tested from a non-macOS environment. Before treating issue #452 as fully accepted, please verify on a real macOS machine with AeroSpace:
Test plan
npm run buildcargo test --manifest-path openless-all/app/src-tauri/Cargo.toml --lib -- --test-threads=1git diff --checkRefs #452
PR Type
Bug fix
Description
Route capsule display through no-activate
Preserve fallback when native handle unavailable
Add macOS AeroSpace-safe window showing
Cover platform strategy with tests
Diagram Walkthrough
File Walkthrough
coordinator.rs
Use no-activate capsule showing by platformopenless-all/app/src-tauri/src/coordinator.rs
CapsuleShowStrategyto choose no-activate or fallbackbehavior per platform.
show_capsule_window_for_recording()to centralize capsule displayand fallback logging.
ns_window()handling withorderFrontRegardlesstoavoid AeroSpace workspace switches.
contract.