Skip to content

Hold OpenBot back from the front while the browser sign-in is open - #1421

Merged
davidmckayv merged 2 commits into
mainfrom
david/front-hold-during-sign-in
Nov 10, 2026
Merged

davidmckayv merged 2 commits into
mainfrom
david/front-hold-during-sign-in

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

Why

Live on Windows F, while the person was on the browser's CopilotKit sign-in page typing their email, "[front] the engine machine is prepared" brought OpenBot in front of the browser and took the focus mid sign-in. With #1417, SetForegroundWindow succeeds there, so setup's own moments steal the focus.

Change

  • While the browser sign-in is open (sign_in_to_copilotkit, from the moment the Account step starts it until it ends), bring_to_front holds back and logs [front] held back: sign-in open in the browser (<why>). That covers the engine machine being prepared, Docker Desktop answering, the engine no longer needing another app's window, and the page's own requests. None of them is the person's next step while they are in the browser.
  • When the sign-in ends, however it ends, OpenBot comes forward once ("the browser sign-in ended"), because the license agreement is the person's next step then. If Windows refuses, the taskbar flashes, as Bring the window forward on Windows without pressing Alt #1417 does.
  • The hold is a guard that is released however the sign-in ends, a failure included.

Test

nothing_comes_forward_while_the_browser_sign_in_is_open_and_once_when_it_ends checks:

  • With sign-in open, the engine-prepared, Docker and engine moments are held back.
  • When sign-in ends, OpenBot comes forward exactly once, and the next moment comes forward as before.
  • The hold ends even when the sign-in fails.
  • bring_to_front checks the hold before anything else, and the sign-in runs inside it.

It runs in its own process, since the hold is process-wide. Without the hold in bring_to_front and the sign-in, it fails; with them, it passes.

On Windows F, "[front] the engine machine is prepared" brought OpenBot in front of the browser while the person typed their email to sign in. While the browser sign-in is open, bring_to_front holds back and logs "[front] held back: sign-in open in the browser"; when the sign-in ends, however it ends, OpenBot comes forward once, since the license agreement is the person's next step then (flashing the taskbar if Windows refuses).
@davidmckayv
davidmckayv merged commit 0b2f1b8 into main Nov 10, 2026
36 checks passed
@davidmckayv
davidmckayv deleted the david/front-hold-during-sign-in branch November 10, 2026 18:47
davidmckayv added a commit that referenced this pull request Nov 10, 2026
… downloads kept

Main's #1434 engine update path, #1435 stall timing, #1427, #1421, #1426,
#1411, #1340, #1344 and #1345 are taken as they are. On top:

- A download the running setup step waits on (the machine image, or the
  images the first screen started) restarts that step's stall clock while
  its bytes come in, as a moving CLI download does. Its progress goes out
  numbered like every other row, so the window's heartbeat counts it.
- A Podman too old for OpenBot gets the installer #1434 runs over it from
  the first screen too.
- On Welcome the download line holds the height of its tallest state, so
  the usage-data text under it no longer moves up when the download ends.
  A real-browser test holds that text still across every state.
- The account step's new heading in the tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant