You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: add opt-in Chrome window focus across Spaces - #562
Chrome can open a link in the selected profile while macOS stays on another Space or activates another Chrome window.
Add opt-in focusWindow: true for Google Chrome. The launcher finds the receiving window by its new active tab ID, then raises it across Spaces, including fullscreen. Background links keep their existing behavior.
Requires Automation and Accessibility access. Includes the app permission description and signing entitlement.
Validation: launcher race tests, all 80 config API tests, and the focused TypeScript check pass. The reporter confirmed focus works on macOS with two Chrome profiles. Runtime behavior is unchanged by the reduced test and README changes.
Summary by CodeRabbit
New Features
Added an optional focusWindow setting for Chrome profiles to bring the window receiving a link to the foreground, including across Spaces and fullscreen.
The setting is off by default and does not apply to background links. Other browsers continue to open links as before.
Documentation
Added setup guidance for the required Automation and Accessibility permissions when using window focusing.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 5aefacb3-27b3-42ad-b195-78cca367451b
📥 Commits
Reviewing files that changed from the base of the PR and between c64ebba and 2d2c0e2.
📒 Files selected for processing: 3
README.md
apps/finicky/src/browser/launcher_test.go
packages/config-api/src/utils.test.ts
💤 Files with no reviewable changes: 1
packages/config-api/src/utils.test.ts
🚧 Files skipped from review as they are similar to previous changes: 1
README.md
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
📝 Walkthrough
Adds an optional focusWindow browser setting. For eligible Chrome launches, Finicky opens the link, identifies the window with a new active tab, and attempts to raise it. The change also updates macOS permission declarations, signing configuration, tests, and documentation.
Changes: Chrome window focus
Layer / File(s)
Summary
Focus configuration and validation packages/config-api/src/configSchema.ts, packages/config-api/src/utils.test.ts, apps/finicky/src/browser/launcher.go
The browser schemas and Go configuration accept the optional focusWindow setting. A test checks that browser resolution preserves the setting.
Chrome launch and window focus apps/finicky/src/browser/focus_chrome.applescript, apps/finicky/src/browser/launcher.go, apps/finicky/src/browser/launcher_test.go
For non-background Chrome launches with focus enabled, Finicky uses osascript and the embedded script. The script snapshots active tab IDs, opens the launch arguments, searches for a new active tab ID for up to five seconds, and attempts to raise the matching window. Tests cover launcher selection and arguments.
macOS permissions and release configuration apps/finicky/assets/Info.plist, scripts/Finicky.entitlements, scripts/gon-config.json, scripts/release.sh, README.md
The app declares Apple Events usage and enables the Apple Events entitlement in signing configuration. The README describes the option, required permissions, and behavior.
sequenceDiagram
participant Finicky
participant osascript
participant Chrome
participant SystemEvents
Finicky->>osascript: Pass embedded focus script and launch arguments
osascript->>Chrome: Snapshot active tab IDs
osascript->>Chrome: Open launch arguments
osascript->>Chrome: Poll for a new active tab ID
osascript->>Chrome: Move matching window to front and activate
osascript->>SystemEvents: Raise front window and set Chrome frontmost
Loading
Merge Risk:⚪ Minimal · up to 2d2c0
No actionable merge-blocking issue is established; the change is ready for normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. (1 skipped: 1 …
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: an opt-in Chrome window focus feature that works across Spaces.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
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
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.
Chrome can open a link in the selected profile while macOS stays on another Space or activates another Chrome window.
Add opt-in
focusWindow: truefor Google Chrome. The launcher finds the receiving window by its new active tab ID, then raises it across Spaces, including fullscreen. Background links keep their existing behavior.Requires Automation and Accessibility access. Includes the app permission description and signing entitlement.
Refs #550.
Validation: launcher race tests, all 80 config API tests, and the focused TypeScript check pass. The reporter confirmed focus works on macOS with two Chrome profiles. Runtime behavior is unchanged by the reduced test and README changes.
Summary by CodeRabbit
focusWindowsetting for Chrome profiles to bring the window receiving a link to the foreground, including across Spaces and fullscreen.