test(desktop): wait for restored focus - #4644
Merged
Merged
Conversation
Settings focus returns on the next animation frame, so the Storybook assertion waits for the final state. Generated-by: Codex
Astro-Han
approved these changes
Sep 3, 2026
Astro-Han
left a comment
Contributor
There was a problem hiding this comment.
Correct fix and it matches the file's own idiom: waitFor is already imported and already wraps two other assertions here. Focus that never lands still fails the story, so nothing is weakened. Storybook only, CI green.
ggbdpq
pushed a commit
to ggbdpq/maka
that referenced
this pull request
Sep 4, 2026
`OAuthCreateAdoptsExactConnection` asserted focus on the created connection's button immediately, but the row restores focus on the next frame, so the assertion could run before the restoration landed. Wrapping it in `waitFor` matches what the rest of the file already does at two other assertions, and keeps the assertion's strength: focus that never arrives still fails. Storybook story only, no production change. Generated-by: OpenAI Codex Generated-by: GLM-5.3-Flash (ZCode)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The OAuth connection story could check focus before the next-frame focus restoration completed. Wait for the new connection row to receive focus.
Production behavior is unchanged.
Verification
npm run buildnpm run typecheckAI use
Select exactly one:
Tool(s) and scope: OpenAI Codex implemented the test fix, reviewed it, ran verification, and drafted this PR.
Checklist
Does this PR entail a change in behavior?