Commit c5600f9b by QuentinHsu

perf(channels): compact model test row actions

- replace per-model test text buttons with icon-only actions matching the channel list.
- let the action column shrink to its icon content to reduce table width.
parent b35dfa32
......@@ -26,6 +26,7 @@ import {
Check,
CheckCircle2,
Copy,
Gauge,
Info,
Loader2,
Settings,
......@@ -293,7 +294,7 @@ function getTestTableColumnClass(columnId: string) {
case 'result':
return 'w-80 min-w-80 max-w-80 whitespace-normal'
case 'actions':
return 'bg-popover w-24 min-w-24 whitespace-nowrap sm:w-28 sm:min-w-28'
return 'bg-popover w-px whitespace-nowrap'
default:
return undefined
}
......@@ -922,17 +923,26 @@ function ChannelTestDialogContent({
const isTestingModel = testingModels.has(model)
return (
<Tooltip>
<TooltipTrigger
render={
<Button
variant='outline'
size='sm'
variant='ghost'
size='icon-sm'
onClick={() => testSingleModel(model)}
disabled={isTestingModel || isBatchTesting}
aria-label={t('Test Connection')}
/>
}
>
{isTestingModel && (
<Loader2 className='animate-spin' data-icon='inline-start' />
{isTestingModel ? (
<Loader2 className='size-4 animate-spin' />
) : (
<Gauge className='size-4' />
)}
{t('Test')}
</Button>
</TooltipTrigger>
<TooltipContent>{t('Test Connection')}</TooltipContent>
</Tooltip>
)
},
enableSorting: false,
......@@ -1130,7 +1140,7 @@ function ChannelTestDialogContent({
<col className='w-auto' />
<col className='w-28' />
<col className='w-80' />
<col className='w-auto' />
<col className='w-px' />
</colgroup>
}
getColumnClassName={(columnId) =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment