fix: show number labels consistently for current item in variant popover

When an item is the current selection, show the number gutter instead of
replacing it with the ● bullet, so users always see which key to press.

https://claude.ai/code/session_011xS58qyP1BjcuCrJcWPxQB
pull/20058/head
Claude 2026-03-30 12:23:47 +00:00
parent 0b6d955560
commit 8bff03f833
No known key found for this signature in database
1 changed files with 14 additions and 12 deletions

View File

@ -321,12 +321,14 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
const gutter = createMemo(() => {
if (numberLabel()) {
return (
<text
fg={active() ? selectedForeground(theme) : theme.textMuted}
flexShrink={0}
>
{numberLabel()}
</text>
<box flexDirection="row" flexShrink={0}>
<text
fg={active() ? selectedForeground(theme) : current() ? theme.primary : theme.textMuted}
flexShrink={0}
>
{numberLabel()}
</text>
</box>
)
}
return option.gutter
@ -407,16 +409,16 @@ function Option(props: {
return (
<>
<Show when={props.current}>
<text flexShrink={0} fg={props.active ? fg : props.current ? theme.primary : theme.text} marginRight={0}>
</text>
</Show>
<Show when={!props.current && props.gutter}>
<Show when={props.gutter}>
<box flexShrink={0} marginRight={0}>
{props.gutter}
</box>
</Show>
<Show when={props.current && !props.gutter}>
<text flexShrink={0} fg={props.active ? fg : props.current ? theme.primary : theme.text} marginRight={0}>
</text>
</Show>
<text
flexGrow={1}
fg={props.active ? fg : props.current ? theme.primary : theme.text}