Skip to content

fix(macos): show capsule across Spaces#549

Merged
H-Chris233 merged 2 commits into
Open-Less:betafrom
H-Chris233:fix/issue-548-macos-capsule-spaces
May 29, 2026
Merged

fix(macos): show capsule across Spaces#549
H-Chris233 merged 2 commits into
Open-Less:betafrom
H-Chris233:fix/issue-548-macos-capsule-spaces

Conversation

@H-Chris233
Copy link
Copy Markdown
Collaborator

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

User description

Summary

  • Make the macOS recording capsule visible across all Spaces before showing it.
  • Keep the no-activation show path by continuing to use orderFrontRegardless and avoiding window.show() / focus APIs.
  • Add a CI-covered static contract test for the macOS capsule Spaces/no-focus behavior.

Fixes #548

Verification

  • 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
  • npm --prefix "openless-all/app" run build
  • git diff --check

Notes

  • I could not live-smoke-test macOS Spaces behavior from this Linux environment.

PR Type

Bug fix, Tests


Description

  • Show capsule across all Spaces

  • Keep no-activation display behavior

  • Add macOS contract verification

  • Run contract in CI


Diagram Walkthrough

flowchart LR
  A["macOS capsule show path"] -- "set visible on all workspaces" --> B["orderFrontRegardless"]
  C["CI workflow"] -- "runs" --> D["macOS Spaces contract test"]
  D -- "verifies" --> A
  E["package.json script"] -- "invokes" --> D
Loading

File Walkthrough

Relevant files
Bug fix
coordinator.rs
Show capsule on all macOS Spaces                                                 

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

  • Calls set_visible_on_all_workspaces(true) before showing the capsule.
  • Keeps orderFrontRegardless as the no-activation display path.
  • Logs a warning if enabling all-workspace visibility fails.
+6/-1     
Configuration changes
ci.yml
Run capsule Spaces check in CI                                                     

.github/workflows/ci.yml

  • Adds a CI step to run the macOS capsule Spaces contract check.
  • Ensures the visibility contract is validated during automated builds.
+3/-0     
package.json
Add macOS capsule contract script                                               

openless-all/app/package.json

  • Adds the check:macos-capsule-spaces npm script.
  • Links the script to the new contract test file.
+1/-0     
Tests
macos-capsule-spaces-contract.test.mjs
Add macOS Spaces contract test                                                     

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

  • Adds a static contract test for the macOS capsule show path.
  • Verifies set_visible_on_all_workspaces(true) happens before
    orderFrontRegardless.
  • Guards against focus or activation APIs in the no-activate path.
+33/-0   

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

PR Reviewer Guide 🔍

(Review updated until commit 57f186f)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

548 - PR Code Verified

Compliant requirements:

  • Make the ASR capsule visible across macOS Spaces / follow the active desktop instead of only desktop 1.
  • Preserve the no-activation show path; do not use window.show(), focus, or app activation APIs.
  • Add a CI-covered static contract test for the macOS capsule Spaces behavior.

Requires further human verification:

  • Verify on a real macOS Spaces setup that the capsule remains visible after switching desktops.
⏱️ 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 57f186f

@H-Chris233 H-Chris233 self-assigned this May 29, 2026
@H-Chris233 H-Chris233 merged commit 5f6f447 into Open-Less:beta May 29, 2026
4 checks passed
@H-Chris233 H-Chris233 deleted the fix/issue-548-macos-capsule-spaces branch May 29, 2026 03:20
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