Skip to content

Fix hover focus crash when opening settings - #1425

Merged
lujjjh merged 1 commit into
mainfrom
fix/hover-focus-self-query
Oct 3, 2026
Merged

lujjjh merged 1 commit into
mainfrom
fix/hover-focus-self-query

Conversation

@lujjjh

@lujjjh lujjjh commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Query LinearMouse’s own accessibility elements on the main thread. During settings startup, these queries can enter AppKit window initialization and trigger a main-thread assertion. Queries for other applications remain on the background worker.

Covers attribute reads and window ID lookup in hover focus checks.

Validation:

  • Reproduced the original crash in 4 of 10 cold starts.
  • The same scenario passed all 10 runs with the fix.
  • All 23 related tests passed, including a startup regression test.

Summary by CodeRabbit

  • Bug Fixes
    • Improved window-focus detection while the app’s settings window is initializing.
    • Improved handling of accessibility queries for the app’s own windows, helping avoid inconsistent focus results while preserving responsive behavior for queries from other apps.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5d6b2dd7-206a-4bc7-8080-9a1df9d55858
📥 Commits

Reviewing files that changed from the base of the PR and between 38dacd2 and b0de31d.

📒 Files selected for processing (2)
  • LinearMouse/WindowFocus/HoverWindowQuery.swift
  • LinearMouseUnitTests/WindowFocus/HoverWindowQueryTests.swift
 _______________________________________________________________
< e/acc/def/det: Effective accelerationism of defect detection. >
 ---------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@lujjjh lujjjh added the bug Something isn't working label Oct 3, 2026
@lujjjh
lujjjh merged commit 335883c into main Oct 3, 2026
1 of 2 checks passed
@lujjjh
lujjjh deleted the fix/hover-focus-self-query branch October 3, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant