Skip to content

CmdPal: Fix hotkey navigation when palette is showing transient dock page - #48089

Merged
Michael Jolley (michaeljolley) merged 1 commit into
mainfrom
dev/mjolley/fix-hotkey-over-dock-nav
Jun 1, 2026
Merged

Michael Jolley (michaeljolley) merged 1 commit into
mainfrom
dev/mjolley/fix-hotkey-over-dock-nav

Conversation

@michaeljolley

Copy link
Copy Markdown
Contributor

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

â€Ķ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>
@michaeljolley
Michael Jolley (michaeljolley) merged commit ba20da1 into main Jun 1, 2026
17 checks passed
@michaeljolley
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)
@ReginaldTang

Copy link
Copy Markdown

Michael Jolley (@michaeljolley)
Going back to the CmdPal start page works, but upon closing and reopening CmdPal, the extension becomes the start page again.

Recording 2026-05-05 173542.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.100 Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using a shortcut to open CmdPal directly to the extension while CmdPal is already open to the dock sets the extension as the start page

4 participants