[PR #8628] Completely remove action dispatching from Command Palette #27260

Open
opened 2026-01-31 09:20:55 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/8628

State: closed
Merged: Yes


Following up https://github.com/microsoft/terminal/pull/8586 by @Hegunumo,
fully remove the command dispatching logic from Command Palette.

Currently Command Palette might dispatch command in Tab Switcher mode.
This leads to several inconsistencies:

  • Only the commands with the same key modifier as an ATS anchor will be issued
  • This command will not close the TabSwitcher
    (while commands issued from TerminalPage do).

Implementation details:

  • Pass KeyMapping rather than binding to CommandPalette
  • Use this mapping inside previewKeyDownHandler of ATS to detect
    if previous tab or next tab bindings were engaged.
    No need to handle Ctrl+Tab explicitly anymore -
    it is handled as any other binding.
  • Cleanup the logic in TerminalPage::_SelectNextTab
    that checks if CommandPalette is visible.
    It is not required anymore, as visible palette would intercept the call.
  • Remove dependency of TerminalPage on AppLogic
    that was introduced lately .
**Original Pull Request:** https://github.com/microsoft/terminal/pull/8628 **State:** closed **Merged:** Yes --- Following up https://github.com/microsoft/terminal/pull/8586 by @Hegunumo, fully remove the command dispatching logic from Command Palette. Currently Command Palette might dispatch command in Tab Switcher mode. This leads to several inconsistencies: * Only the commands with the same key modifier as an ATS anchor will be issued * This command will not close the TabSwitcher (while commands issued from TerminalPage do). Implementation details: * Pass KeyMapping rather than binding to CommandPalette * Use this mapping inside previewKeyDownHandler of ATS to detect if previous tab or next tab bindings were engaged. No need to handle Ctrl+Tab explicitly anymore - it is handled as any other binding. * Cleanup the logic in TerminalPage::_SelectNextTab that checks if CommandPalette is visible. It is not required anymore, as visible palette would intercept the call. * Remove dependency of TerminalPage on AppLogic that was introduced lately .
claunia added the pull-request label 2026-01-31 09:20:55 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27260