Skip to content

Commit 2d620f5

Browse files
t3dotggclaude
andauthored
fix(web): chat tables and subagent rows line up (pingdotgg#24835)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent c916261 commit 2d620f5

4 files changed

Lines changed: 23 additions & 17 deletions

File tree

‎apps/web/src/components/chat/MarkdownTable.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ export function MarkdownTable({ children, ...props }: ComponentProps<"table">) {
114114
{children}
115115
</table>
116116
</ScrollArea>
117-
<div className="mt-0.5 flex items-center justify-between select-none">
117+
{/* Stays within the row's px-1: the chat lane clips sideways overflow. */}
118+
<div className="mt-0.5 -mx-1 flex items-center justify-between select-none">
118119
{hasClippedCells ? (
119120
<Tooltip>
120121
<TooltipTrigger

‎apps/web/src/components/chat/TimelineV2EventRow.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,12 @@ const V2SubagentGroup = memo(function V2SubagentGroup({
251251
return (
252252
<WorkLogBlock continues={row.continuesWorkLog}>
253253
<Collapsible open={expanded} onOpenChange={toggleExpanded} data-subagent-group>
254+
{/* pr-3.25 matches the panel border, padding, and row inset so the times line up. */}
254255
<CollapsibleTrigger
255256
aria-label={label}
256257
aria-description={statusSummary}
257258
className={cn(
258-
"flex w-full min-w-0 items-center gap-3 py-2 text-left transition-opacity hover:opacity-100",
259+
"flex w-full min-w-0 items-center gap-2.5 py-2 pr-3.25 text-left transition-opacity hover:opacity-100",
259260
expanded || summary.active
260261
? "text-foreground opacity-100"
261262
: "text-muted-foreground opacity-55",

‎apps/web/src/components/chat/V2LifecycleRow.tsx‎

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -439,21 +439,7 @@ function SubagentTimelineLink(props: {
439439
status={status ?? undefined}
440440
/>
441441
<span className="min-w-0 flex-1">
442-
<span className="flex items-baseline gap-2">
443-
<span className="min-w-0 truncate text-xs font-medium text-foreground">
444-
{props.title}
445-
</span>
446-
{detail !== null && (props.event !== undefined || status !== "completed") ? (
447-
<span
448-
className={cn(
449-
"shrink-0 text-3xs",
450-
failed ? "text-destructive" : "text-muted-foreground",
451-
)}
452-
>
453-
{statusLabel}
454-
</span>
455-
) : null}
456-
</span>
442+
<span className="block truncate text-xs font-medium text-foreground">{props.title}</span>
457443
<span
458444
className={cn(
459445
"block text-2xs leading-relaxed",
@@ -469,6 +455,13 @@ function SubagentTimelineLink(props: {
469455
)}
470456
</span>
471457
</span>
458+
{detail !== null && (props.event !== undefined || status !== "completed") ? (
459+
<span
460+
className={cn("shrink-0 text-xs", failed ? "text-destructive" : "text-muted-foreground")}
461+
>
462+
{statusLabel}
463+
</span>
464+
) : null}
472465
<span className="shrink-0 text-xs text-muted-foreground tabular-nums">
473466
{props.event ? props.event.timestamp : <SubagentElapsed agent={timing} />}
474467
</span>

‎apps/web/src/index.css‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,10 +2135,21 @@ code {
21352135
font-size: 0.75rem;
21362136
}
21372137

2138+
/* Top-aligned so wrapped rows share a first line, and the outer columns sit
2139+
flush with the surrounding prose. */
21382140
.chat-markdown th,
21392141
.chat-markdown td {
21402142
padding: 0.45rem 0.75rem;
21412143
text-align: start;
2144+
vertical-align: top;
2145+
}
2146+
2147+
.chat-markdown :is(th, td):first-child {
2148+
padding-inline-start: 0;
2149+
}
2150+
2151+
.chat-markdown :is(th, td):last-child {
2152+
padding-inline-end: 0;
21422153
}
21432154

21442155
.chat-markdown thead th {

0 commit comments

Comments
 (0)