From b6945ce772b3013090dcef6b3fff3249667a824e Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Tue, 2 Jun 2026 19:50:55 -0500 Subject: [PATCH] fix(desktop): switch model on keyboard activation of picker rows The model row is a Radix sub-trigger (no onSelect), so switching was pointer-only. Wire Enter/Space alongside onClick so keyboard users can switch models too. --- .../src/app/shell/model-menu-panel.tsx | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/apps/desktop/src/app/shell/model-menu-panel.tsx b/apps/desktop/src/app/shell/model-menu-panel.tsx index 8a837467448..97338a94618 100644 --- a/apps/desktop/src/app/shell/model-menu-panel.tsx +++ b/apps/desktop/src/app/shell/model-menu-panel.tsx @@ -164,17 +164,26 @@ export function ModelMenuPanel({ gateway, onSelectModel, requestGateway }: Model ? 'Fast' : '' - // Every row is a hover-Edit submenu trigger. Clicking switches - // to the family's base model; the Fast toggle inside swaps to - // the -fast sibling (or flips the speed param) as appropriate. + // Every row is a hover-Edit submenu trigger. Activating it + // (pointer or keyboard) switches to the family's base model; + // the Fast toggle inside swaps to the -fast sibling (or flips + // the speed param). The sub-trigger has no `onSelect`, so wire + // both click and Enter/Space for keyboard parity. + const activate = () => { + if (!isCurrent) { + void switchTo(family.id, group.provider.slug) + } + } + return ( { - if (!isCurrent) { - void switchTo(family.id, group.provider.slug) + onClick={activate} + onKeyDown={event => { + if (event.key === 'Enter' || event.key === ' ') { + activate() } }} >