Skip to content

fix(mac): add timeout for accessibility permissions check - #16878

Open
sgschantz wants to merge 7 commits into
betafrom
fix/mac/16579-accessibility-timeout
Open

sgschantz wants to merge 7 commits into
betafrom
fix/mac/16579-accessibility-timeout

Conversation

@sgschantz

@sgschantz sgschantz commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Implement a timeout for the Accessibility response to be received by the config app from the Keyman input method so that the config app does not spin indefinitely. The input method generally responds within 100 milliseconds, and the timeout is set to 3 seconds.

Keyman Configuration must discover whether the Keyman input method has been granted the Accessibility permission by the user to know what installation steps are required. To do this, it either runs Keyman as a separate process with a special command line argument or it sends it a distributed notification.

To notify the config app of the Accessibility state, the input method sends a distributed notification in response. If this asynchronous response is not received within the timeout, then the timer will execute the not-granted response.

Build-bot: release:mac
Test-bot: skip

Fixes: #16579

@sgschantz sgschantz added this to the B19S4 milestone Oct 22, 2026
@sgschantz sgschantz self-assigned this Oct 22, 2026
@sgschantz sgschantz added the mac/ label Oct 22, 2026
@keymanapp-test-bot keymanapp-test-bot Bot added the user-test-missing User tests have not yet been defined for the PR label Oct 22, 2026
@keymanapp-test-bot

keymanapp-test-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

@github-actions github-actions Bot added the fix label Oct 22, 2026
@sgschantz
sgschantz marked this pull request as ready for review October 22, 2026 18:26
@sgschantz
sgschantz requested a review from mcdurdin October 22, 2026 18:26
@keymanapp-test-bot keymanapp-test-bot Bot removed the user-test-missing User tests have not yet been defined for the PR label Oct 23, 2026

@mcdurdin mcdurdin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; does this need user test too?

@sgschantz

sgschantz commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

@mcdurdin I wanted to add a user test for this, but I don't know how to test it to force the timeout scenario without modifying the input method. Anything I can do to make the input method not respond causes some other error that prevents it reaching the code that would cause a timeout.

I did test by modifying the input method and making it sleep for 4 seconds before responding and that looked good.

@mcdurdin

Copy link
Copy Markdown
Member

@sgschantz even a good-path test is probably not a bad idea though? Running on different devices can expose fun unexpected things

@keyman-server keyman-server modified the milestones: B19S4, B19S5 Oct 24, 2026
@sgschantz sgschantz linked an issue Oct 26, 2026 that may be closed by this pull request
1 of 8 tasks

This branch has not been deployed

No deployments
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.

bug(mac): add timeout for accessibility check

3 participants