Skip to content

Commit 33f7f59

Browse files
authored
fix: tui list jank issue (#25219)
1 parent 461e734 commit 33f7f59

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function createDialogProviderOptions() {
5151
}[provider.id],
5252
footer: consoleManaged ? sync.data.console_state.activeOrgName : undefined,
5353
category: provider.id in PROVIDER_PRIORITY ? "Popular" : "Other",
54-
gutter: connected && onboarded() ? <text fg={theme.success}></text> : undefined,
54+
gutter: connected && onboarded() ? () => <text fg={theme.success}></text> : undefined,
5555
async onSelect() {
5656
if (consoleManaged) return
5757

packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export function DialogSessionList() {
168168
value: x.id,
169169
category,
170170
footer,
171-
gutter: isWorking ? <Spinner /> : undefined,
171+
gutter: isWorking ? () => <Spinner /> : undefined,
172172
}
173173
})
174174
})

packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export interface DialogSelectOption<T = any> {
4242
categoryView?: JSX.Element
4343
disabled?: boolean
4444
bg?: RGBA
45-
gutter?: JSX.Element
45+
gutter?: () => JSX.Element
4646
margin?: JSX.Element
4747
onSelect?: (ctx: DialogContext) => void
4848
}
@@ -407,7 +407,7 @@ function Option(props: {
407407
active?: boolean
408408
current?: boolean
409409
footer?: JSX.Element | string
410-
gutter?: JSX.Element
410+
gutter?: () => JSX.Element
411411
onMouseOver?: () => void
412412
}) {
413413
const { theme } = useTheme()
@@ -422,7 +422,7 @@ function Option(props: {
422422
</Show>
423423
<Show when={!props.current && props.gutter}>
424424
<box flexShrink={0} marginRight={0}>
425-
{props.gutter}
425+
{props.gutter?.()}
426426
</box>
427427
</Show>
428428
<text

0 commit comments

Comments
 (0)