Skip to content

feat(cmdpal): list hover actions with extension SDK configuration#48863

Open
tonythethompson wants to merge 8 commits into
microsoft:mainfrom
tonythethompson:feat/cmdpal-list-hover-actions
Open

feat(cmdpal): list hover actions with extension SDK configuration#48863
tonythethompson wants to merge 8 commits into
microsoft:mainfrom
tonythethompson:feat/cmdpal-list-hover-actions

Conversation

@tonythethompson

@tonythethompson tonythethompson commented Jun 25, 2026

Copy link
Copy Markdown

Summary

  • User setting: master toggle List hover actions (Appearance → default On)
  • Click fix: hover icons receive pointer events via ContentTemplateRoot routing
  • Host resolver: HoverActionResolver with home vs extension defaults; host pin/dock/move items excluded unless explicitly flagged
  • Invoke context: home top-level rows pass IListItem for IPage navigation; context-menu invokables keep ICommandContextItem (matches context menu)
  • Extension SDK: HoverActionsMode, IListPage2, ICommandItem2, ICommandContextItem2, ICommandProvider5 for dev configurability
  • UI: tags and hover actions share one trailing column; 25ms hover-exit delay
  • Backward compat: silent extensions unchanged (first 3 visible MoreCommands)

Demo

202606251352.mp4

Configuration layers

Layer Control
User (CmdPal) EnableListHoverActions on/off
Dev (SDK) mode, per-command ShowInHoverActions / HoverOrder, page max & visibility
Host defaults Home: first 3 extension-origin commands (skip host pin/dock). Extension lists: first 3 visible MoreCommands

SDK modes

  • Default / FirstN — first N visible; upgrades to Explicit when any command sets ShowInHoverActions
  • Explicit — flagged commands only, sorted by HoverOrder
  • AllMoreCommands — all visible commands
  • None — no hover strip

Nested IListPage instances configure themselves (no depth API).

Resolution order

  1. Home row ICommandItem2 (HomeHoverActionsMode, etc.)
  2. Provider ICommandProvider5 (DefaultHoverActionsMode)
  3. Page IListPage2 (HoverActionsMode, MaxHoverActions, HoverActionsVisibility)

Test plan

  • Build: tools/build/run-cmdpal-dev.ps1
  • Unit tests: HoverActionResolverTests, HoverActionClickHelperTests
  • Demo video (see above)
  • Hover extension list row → explicit actions invoke on click
  • CmdPal home → extension rows show extension commands only (no host pin in hover strip)
  • Settings → disable List hover actions → strip hidden everywhere
  • Keyboard-select row → hover strip per visibility (OnHoverOnly on home, HoverOrSelected in extension lists by default)
  • Context-menu invokables (e.g. Apps → Run as administrator) work from hover strip

Notes

  • Dock band hover out of scope
  • Consumer extension example: Quick Shell (requires local SDK until next Microsoft.CommandPalette.Extensions NuGet ships hover APIs)

Display up to three MoreCommands actions as icon buttons when a list
row is hovered or keyboard-selected, following the PowerToys Run
pattern. Tags hide while hover actions are visible.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the Product-Command Palette Refers to the Command Palette utility label Jun 25, 2026
@michaeljolley michaeljolley added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jun 25, 2026
@michaeljolley

Copy link
Copy Markdown
Contributor

@tonythethompson, can you confirm you built/ran this locally?

Also, please add a video of this working.

tonythethompson and others added 5 commits June 25, 2026 11:37
Route row pointer events through the ListViewItem template root so hover
action icons receive clicks. Adds hit-test helper, UI tests, and dev scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce HoverActionResolver with home host-command exclusion, EnableListHoverActions
setting in Appearance, and IHostContextItem markers for pin/dock context items.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add HoverActionsMode, IListPage2, ICommandItem2, ICommandContextItem2, and
ICommandProvider5 with toolkit defaults for extension authors.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add HoverActionResolverTests covering user toggle, home filtering, explicit
mode, and visibility. Document hover configuration in the extension template.

Co-authored-by: Cursor <cursoragent@cursor.com>
Refine host/provider resolution for home vs extension surfaces, align hover
strip with static tags, use hybrid PerformCommandMessage context for top-level
IPage navigation vs context-menu invokables, and remove dev-only debug logging
plus QuickShell-specific UI tests from the PR.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tonythethompson

tonythethompson commented Jun 25, 2026

Copy link
Copy Markdown
Author

@michaeljolley
Local build confirmed on feat/cmdpal-list-hover-actions (latest commit f13d991).

Demo: https://github.com/user-attachments/assets/737a46ed-aa93-463f-a0f8-0e855a461807

Covers:

  • Hover strip on extension list rows (explicit actions via SDK)
  • CmdPal home extension rows (Create / Settings on Quick Shell)
  • Click-to-invoke (not just keyboard shortcuts)
  • Tags + hover actions aligned in the trailing column

Follow-up in latest commit: hybrid invoke context (top-level IPage vs context-menu invokables), host-injected command filtering on extension surfaces, resolver polish, removed dev debug logging.

@microsoft-github-policy-service microsoft-github-policy-service Bot added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 25, 2026
@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 48863 in repo microsoft/PowerToys

@tonythethompson tonythethompson changed the title feat(cmdpal): show hover action buttons on list item rows feat(cmdpal): list hover actions with extension SDK configuration Jun 25, 2026
Document resolution precedence, mode semantics, host-injected filtering,
visibility defaults, HomeMaxHoverActions, and the user master toggle so
agents and developers can configure hover actions without reading the host.

Co-authored-by: Cursor <cursoragent@cursor.com>
@michaeljolley

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Azure Pipelines Verify XAML formatting failed on ContainerContentChanging
attribute placement; reorder per repo XAML Styler settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
@michaeljolley

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jiripolasek

Copy link
Copy Markdown
Contributor

Honestly, I think this might need some discussion. Command Palette already has an action/context menu for this, and I'm worried this might fragment the UX.

@tonythethompson

Copy link
Copy Markdown
Author

Thanks for raising this, @jiripolasek. I agree it’s worth talking through.

The way I’m thinking about it: hover actions aren’t meant to replace the context menu. They’re just a quicker way to run a small subset of the same MoreCommands (edit, pin, delete, and so on). A lot of launchers do something similar by surfacing one or two frequent actions without making you open a menu first.

On why not stick with context menu only:

For pointer users, it’s one click instead of right-click, find the action, click again. For keyboard users, with HoverOrSelected the strip shows when a row is selected, so you can still reach actions without opening the menu. And for extensions, the full menu is still there. Hover only shows what the extension explicitly flags with ShowInHoverActions, or falls back to the existing first-3 behavior.

There are also a few guardrails in the design to keep this from feeling like a second, competing UI:

There’s a user-level toggle in Settings → Appearance (“List hover actions”), default on but globally disableable. Extensions can opt out entirely with HoverActionsMode.None, or just not flag commands for hover. Extensions that don’t opt in keep today’s behavior (context menu only). And on home, host pin/dock/move actions stay out of the hover strip unless an extension explicitly includes them.

One thing I’d genuinely like team input on: should this stay on by default for new installs, or default off until we’ve seen more extension adoption and UX feedback? I’m also open to narrowing scope, for example extension list rows only and not home rows, if that would feel less fragmented.

@jiripolasek

Copy link
Copy Markdown
Contributor

@michaeljolley Should we discuss things here or run it through a regular issue?

@michaeljolley

Copy link
Copy Markdown
Contributor

@michaeljolley Should we discuss things here or run it through a regular issue?

This should have been an issue with discussions before becoming a PR. @tonythethompson feel free to create one.

@michaeljolley michaeljolley self-requested a review June 25, 2026 22:41

@michaeljolley michaeljolley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RC just to block merging until we discuss.

@tonythethompson

Copy link
Copy Markdown
Author

@michaeljolley Should we discuss things here or run it through a regular issue?

This should have been an issue with discussions before becoming a PR. @tonythethompson feel free to create one.

You're right, sorry for jumping straight to a PR. Opened #48885 for discussion. Happy to mark this PR as draft or closed while the issue is discussed.

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

Labels

Needs-Team-Response An issue author responded so the team needs to follow up Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Product-Command Palette Refers to the Command Palette utility

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants