fix(web): truncate long task IDs so they stay inside their column

The task-log and MJ task ID cells used a w-max wrapper, so long IDs
(and the platform/action subtitle) overflowed the column and rendered
under the adjacent Cost column. Constrain the cell to the column width
and let the badge label ellipsize; the copy button still copies the
full ID.
This commit is contained in:
t0ng7u
2026-07-11 22:12:20 +08:00
parent fe6e0c8ee8
commit 26144aa1d6
2 changed files with 6 additions and 5 deletions
@@ -153,12 +153,12 @@ export function useDrawingLogsColumns(
}
return (
<div className='flex w-max flex-col gap-0.5'>
<div className='flex min-w-0 flex-col items-start gap-0.5'>
<CopyableStatusBadge
value={mjId}
variant='neutral'
size='sm'
className='font-mono'
className='max-w-full min-w-0 shrink overflow-hidden font-mono [&>[data-slot=status-badge-label]]:min-w-0 [&>[data-slot=status-badge-label]]:max-w-full [&>[data-slot=status-badge-label]]:shrink [&>[data-slot=status-badge-label]]:overflow-hidden [&>[data-slot=status-badge-label]]:text-ellipsis'
>
{mjId}
</CopyableStatusBadge>
@@ -135,22 +135,23 @@ export function useTaskLogsColumns(isAdmin: boolean): ColumnDef<TaskLog>[] {
return <span className='text-subtle-foreground text-xs'>-</span>
}
return (
<div className='flex w-max flex-col gap-0.5'>
<div className='flex min-w-0 flex-col items-start gap-0.5'>
<CopyableStatusBadge
value={taskId}
variant='neutral'
size='sm'
className='font-mono'
className='max-w-full min-w-0 shrink overflow-hidden font-mono [&>[data-slot=status-badge-label]]:min-w-0 [&>[data-slot=status-badge-label]]:max-w-full [&>[data-slot=status-badge-label]]:shrink [&>[data-slot=status-badge-label]]:overflow-hidden [&>[data-slot=status-badge-label]]:text-ellipsis'
>
{taskId}
</CopyableStatusBadge>
<span className='text-subtle-foreground max-w-[200px] truncate text-xs'>
<span className='text-subtle-foreground max-w-full truncate text-xs'>
{getTaskPlatformName(log.platform)} ·{' '}
{t(taskActionMapper.getLabel(log.action))}
</span>
</div>
)
},
size: 260,
meta: {
cardRole: 'title',
cardSpan: 2,