Skip to content

fix(macos): show capsule in fullscreen Spaces#556

Open
H-Chris233 wants to merge 2 commits into
Open-Less:betafrom
H-Chris233:fix/issue-548-macos-fullscreen-capsule
Open

fix(macos): show capsule in fullscreen Spaces#556
H-Chris233 wants to merge 2 commits into
Open-Less:betafrom
H-Chris233:fix/issue-548-macos-fullscreen-capsule

Conversation

@H-Chris233
Copy link
Copy Markdown
Collaborator

@H-Chris233 H-Chris233 commented May 30, 2026

User description

Summary

  • Add NSWindowCollectionBehavior::FullScreenAuxiliary to the macOS capsule no-activate show path.
  • Keep CanJoinAllSpaces and orderFrontRegardless so the capsule remains visible without focusing OpenLess.
  • Extend the macOS capsule Spaces contract test to cover fullscreen auxiliary behavior.

Fixes #548

Test Plan

  • npm --prefix "openless-all/app" run check:macos-capsule-spaces
  • cargo test --manifest-path "openless-all/app/src-tauri/Cargo.toml" capsule_show_strategy_matches_platform_activation_contract -- --test-threads=1
  • npm --prefix "openless-all/app" run build
  • git diff --check

Notes

  • cargo check --manifest-path "openless-all/app/src-tauri/Cargo.toml" --target x86_64-apple-darwin cannot complete on this Linux machine because the macOS SDK is unavailable (TargetConditionals.h missing from the ring build). Real macOS fullscreen smoke testing is still required.

PR Type

Bug fix, Tests


Description

  • Enable capsule in fullscreen Spaces

  • Preserve no-activate display behavior

  • Add contract coverage for auxiliary windows


Diagram Walkthrough

flowchart LR
  A["show_capsule_window_no_activate"] -- "adds fullscreen auxiliary behavior" --> B["NSWindow.collectionBehavior"]
  B -- "keeps capsule visible" --> C["orderFrontRegardless"]
  D["macos-capsule-spaces-contract.test.mjs"] -- "verifies behavior contract" --> A
Loading

File Walkthrough

Relevant files
Bug fix
coordinator.rs
Add fullscreen auxiliary capsule behavior                               

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

  • Defines AppKit collection behavior flags locally for macOS.
  • Adds CanJoinAllSpaces and FullScreenAuxiliary to the capsule window.
  • Keeps the existing orderFrontRegardless no-activate show path intact.
+7/-0     
Tests
macos-capsule-spaces-contract.test.mjs
Extend macOS capsule spaces contract                                         

openless-all/app/scripts/macos-capsule-spaces-contract.test.mjs

  • Adds an assertion for FULL_SCREEN_AUXILIARY behavior.
  • Verifies the capsule sets collection behavior before showing.
  • Preserves the existing no-activate and forbidden-call checks.
+6/-0     

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 30, 2026

PR Reviewer Guide 🔍

(Review updated until commit a5970f8)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

548 - PR Code Verified

Compliant requirements:

  • The no-activate path still uses set_visible_on_all_workspaces(true) and orderFrontRegardless.
  • The capsule window now opts into NSWindowCollectionBehaviorFullScreenAuxiliary.
  • A contract test was added for the capsule Spaces behavior.

Requires further human verification:

  • Verify on a real macOS system that the capsule is visible after switching to another desktop and in fullscreen Spaces.
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

Persistent review updated to latest commit a5970f8

Sign up for free to 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.

[ui] 语音识别小窗口仅在桌面一显示,其他桌面无法显示

1 participant