From d0ef2b2ade61b89bf8d2104e378b4ba9d89a59d8 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 3 Apr 2026 23:01:59 -0400 Subject: [PATCH] refactor(tui): style console org account headers --- .../cli/cmd/tui/component/dialog-console-org.tsx | 8 ++++++++ .../opencode/src/cli/cmd/tui/ui/dialog-select.tsx | 14 +++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-console-org.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-console-org.tsx index cc2b7a48f4..670f8fdfbd 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-console-org.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-console-org.tsx @@ -3,6 +3,7 @@ import { DialogSelect } from "@tui/ui/dialog-select" import { useSDK } from "@tui/context/sdk" import { useDialog } from "@tui/ui/dialog" import { useToast } from "@tui/ui/toast" +import { useTheme } from "@tui/context/theme" type OrgOption = { accountID: string @@ -28,6 +29,7 @@ export function DialogConsoleOrg() { const sdk = useSDK() const dialog = useDialog() const toast = useToast() + const { theme } = useTheme() const [orgs] = createResource(async () => { const result = await sdk.client.experimental.console.listOrgs({}, { throwOnError: true }) @@ -73,6 +75,12 @@ export function DialogConsoleOrg() { title: item.orgName, value: item, category: accountLabel(item), + categoryView: ( + + {item.accountEmail} + {accountHost(item.accountUrl)} + + ), onSelect: async () => { if (item.active) { dialog.clear() diff --git a/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx b/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx index 30cf3b9543..46821cccec 100644 --- a/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx +++ b/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx @@ -38,6 +38,7 @@ export interface DialogSelectOption { description?: string footer?: JSX.Element | string category?: string + categoryView?: JSX.Element disabled?: boolean bg?: RGBA gutter?: JSX.Element @@ -291,9 +292,16 @@ export function DialogSelect(props: DialogSelectProps) { <> 0 ? 1 : 0} paddingLeft={3}> - - {category} - + + {category} + + } + > + {options[0]?.categoryView} +