Repository navigation
CmdPal: Fix hotkey navigation when palette is showing transient dock page - #48089
Merged
Michael Jolley (michaeljolley) merged 1 commit intoJun 1, 2026
Merged
Conversation
âĶpage When a keyboard shortcut opens CmdPal to an extension while the palette is already showing a dock-launched transient page, the frame's back stack is empty and GoHome() cannot restore the root page. This leaves the user unable to navigate back to the main list. ResetToHome() explicitly clears transient state and re-navigates to the root page before the hotkey target is pushed, ensuring the main list is always reachable via Back/Escape. Fixes #47994 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Michael Jolley (michaeljolley)
marked this pull request as ready for review
May 24, 2026 03:22
Michael Jolley (michaeljolley)
requested review from
JiÅÃ PolÃĄÅĄek (jiripolasek) and
Mike Griese (zadjii-msft)
May 24, 2026 03:22
Michael Jolley (michaeljolley)
enabled auto-merge (squash)
May 24, 2026 03:45
Mike Griese (zadjii-msft)
approved these changes
Jun 1, 2026
Michael Jolley (michaeljolley)
deleted the
dev/mjolley/fix-hotkey-over-dock-nav
branch
June 1, 2026 21:29
Boliang Zhang (LegendaryBlair)
pushed a commit
that referenced
this pull request
Jun 2, 2026
âĶpage (#48089) ## Summary When a keyboard shortcut opens CmdPal to an extension while the palette is already showing a dock-launched transient page, `GoHome(false)` cannot restore the root page â the frame's back stack is empty because the transient dock page was never pushed on top of root. The user ends up with only the hotkey-target page in the frame with no way to navigate back to the main list. ## Root Cause In `ShellPage.SummonOnUiThread()`, the hotkey-to-page branch called `GoHome(false)` before sending `ShowWindowMessage`. But when the active page is a transient dock page, `_currentlyTransient` is still `true` and the frame back stack is empty, so `GoHome` can't re-establish the root page as the frame base. ## Fix Added `ResetToHome()` to `ShellViewModel`, mirroring the pattern already used in `WindowHiddenMessage` handling: 1. Clears `_currentlyTransient` 2. Calls `_rootPageService.GoHome()` to reset extension state 3. Sends `PerformCommandMessage` for `_rootPage` â navigating MainListPage into the frame as the base In `ShellPage.SummonOnUiThread()`, the `GoHome(false)` call in the `isPage` branch is replaced with `ViewModel.ResetToHome()`. The root page is then cleanly in the frame before the hotkey target's `PerformCommandMessage` navigates on top of it. Fixes #47994 Co-authored-by: root <root@io.bbq> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit ba20da1)
|
Michael Jolley (@michaeljolley) |
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
When a keyboard shortcut opens CmdPal to an extension while the palette is already showing a dock-launched transient page,
GoHome(false)cannot restore the root page â the frame's back stack is empty because the transient dock page was never pushed on top of root. The user ends up with only the hotkey-target page in the frame with no way to navigate back to the main list.Root Cause
In
ShellPage.SummonOnUiThread(), the hotkey-to-page branch calledGoHome(false)before sendingShowWindowMessage. But when the active page is a transient dock page,_currentlyTransientis stilltrueand the frame back stack is empty, soGoHomecan't re-establish the root page as the frame base.Fix
Added
ResetToHome()toShellViewModel, mirroring the pattern already used inWindowHiddenMessagehandling:_currentlyTransient_rootPageService.GoHome()to reset extension statePerformCommandMessagefor_rootPageâ navigating MainListPage into the frame as the baseIn
ShellPage.SummonOnUiThread(), theGoHome(false)call in theisPagebranch is replaced withViewModel.ResetToHome(). The root page is then cleanly in the frame before the hotkey target'sPerformCommandMessagenavigates on top of it.Fixes #47994