Repository navigation
ui: extend console parenting beyond MSAL - #2465
Merged
Merged
Conversation
Console parenting currently lives inside the MSAL adapter, so other in-process authentication dialogs do not benefit from the visible terminal owner. Those prompts can appear disconnected from the Git operation that opened them. Resolve the parent at the shared authentication boundary so all in-process prompts follow the same policy. Explicit handles retain precedence, hidden console owners are ignored, and minimised owners remain eligible. Keep progress-window creation in the MSAL adapter: it is a fallback for broker flows that require a parent, not a default owner for ordinary authentication dialogs. Assisted-by: Claude Sonnet 5 Assisted-by: GPT-6.1 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Helper commands resolve their parent handle independently of the in-process authentication path. Keeping only the explicit-HWND case would leave their default parent-selection policy inconsistent with the shared authentication lookup. Use the same visible-console fallback when no handle is configured. Explicit handles still take precedence, and a missing or hidden console leaves the parent unset. Assisted-by: GPT-6.1 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
dscho
approved these changes
Oct 5, 2026
Merged
mjcheetham
added a commit
that referenced
this pull request
Oct 6, 2026
**Bug Fixes:** - Prompt for default OS account on Microsoft DevBox (#2459) - Restore Entra broker parent window handling (#2464) **Features:** - Support `authtype` Git capability (#2457) - Add console parent window parenting for non-Entra UI (#2465) **Other changes:** - Drop Windows x86 release binaries (#2456) - Documentation updates (#2460) - Fix release workflow _VERSION_ file parsing
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.
This follows up on #2464.
Visible-console parenting currently lives inside the MSAL adapter, so other in-process authentication dialogs remain unparented unless
GCM_MODAL_PARENTHWNDis supplied. Those prompts can appear disconnected from the terminal that initiated the Git operation.This PR moves console-parent discovery into a shared platform helper and uses it in the authentication and UI-helper parent handle lookups. This extends the fallback beyond MSAL while keeping the two lookup paths consistent. MSAL retains responsibility for creating a progress window when broker authentication requires a parent and no usable handle was resolved.
Explicit HWNDs still take precedence and are not visibility-filtered. Automatically discovered owners must be visible, with visibility checked after resolving the console's root owner to accommodate ConPTY compatibility windows.
Update the environment variable documentation to describe the fallback to the console-parent window.
Tested behaviour on Windows Terminal, conhost.exe (classic terminal host), and Git Bash/MSYS2's terminal.