Skip to content

fix(desktop): preserve composer focus during preview automation - #9

Merged
BreakTheBeta merged 4 commits into
mainfrom
fix/composer-focus-retention
Sep 10, 2026
Merged

fix(desktop): preserve composer focus during preview automation#9
BreakTheBeta merged 4 commits into
mainfrom
fix/composer-focus-retention

Conversation

@BreakTheBeta

Copy link
Copy Markdown
Owner

Agent-driven browser preview clicks and key presses temporarily move Electron keyboard focus into the guest WebContents. Clicks could leave it there indefinitely—including for hidden or background-thread previews—and press cleanup restored the outer renderer without reliably restoring the composer DOM element.

This restores the previously focused renderer after preview clicks on both success and failure, without overriding a newer user focus choice. The web host also snapshots and restores the exact connected DOM control around click and press operations, while respecting concurrent operations, window blur, and newer pointer/keyboard focus. Other preview operations remain unchanged because they do not transfer native focus.

This incorporates the reviewed upstream fixes from pingdotgg#10982 and pingdotgg#9849, plus applies the DOM focus guard to clicks. Related to pingdotgg#5792 and pingdotgg#10980.

Verified: Preview Manager 90/90 tests; renderer focus guard 10/10 tests; targeted lint and formatting pass (existing warnings only).

Implemented with GPT-5 Codex in T3 Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 10, 2026
@BreakTheBeta
BreakTheBeta merged commit 4206aaa into main Sep 10, 2026
7 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants