From edbd2c2e6c8f5c85cd0d131b2d062ec2d241d5e2 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Thu, 12 Nov 2026 21:05:14 -0800 Subject: [PATCH] Chat New line: skip the bubble pull-up when no hover row draws; trim above a leading turn bar From review: the -mt-6 assumed the user bubble's copy/time row is drawn, but a message with no timestamp may draw none, and the line would then reach into the bubble. It now requires a timestamp. An above-row line followed by its row's own turn bar (a turn opened without a prompt) gets the same deeper trim as above-turn-bar. Co-Authored-By: Claude --- ...iveChatTranscriptRow.new-rows-spacing.test.tsx | 15 +++++++++++---- .../messages/rows/NativeChatTranscriptRow.tsx | 7 +++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/renderer/src/components/native-chat/messages/rows/NativeChatTranscriptRow.new-rows-spacing.test.tsx b/src/renderer/src/components/native-chat/messages/rows/NativeChatTranscriptRow.new-rows-spacing.test.tsx index c2a5f3aca42..089d606a41d 100644 --- a/src/renderer/src/components/native-chat/messages/rows/NativeChatTranscriptRow.new-rows-spacing.test.tsx +++ b/src/renderer/src/components/native-chat/messages/rows/NativeChatTranscriptRow.new-rows-spacing.test.tsx @@ -27,7 +27,6 @@ const context: NativeChatTranscriptRowContext = { taskListPredecessors: new Map(), expandedTurnIds: new Set(), onToggleExpandedTurn: vi.fn(), - subagentDisclosure: { setSectionOpen: vi.fn(), setRosterOpen: vi.fn() }, onScrollMessageToTop: vi.fn(), onRevealDiff: vi.fn() } @@ -51,8 +50,6 @@ function slot(overrides: Partial = {}): NativeChatMessage drawsMessage: true, turnFolds: false, turnDiff: undefined, - subagentRoster: undefined, - depth: 0, estimatedHeight: 40, ...overrides } @@ -127,7 +124,17 @@ describe('NativeChatTranscriptRow New line spacing', () => { ['-mb-3'], ['-mt-6'] ], - ['above-turn-bar', user(), { text: 'Not sent' }, ['-mb-3'], ['-mt-6']] + ['above-turn-bar', user(), { text: 'Not sent' }, ['-mb-3'], ['-mt-6']], + ['above-turn-bar', user(), { sending: true }, ['-mb-3'], ['-mt-6']], + ['above-turn-bar', user({ timestamp: null }), undefined, ['-mb-3'], ['-mt-6']], + ['above-turn-bar', { ...user(), drawsMessage: false }, undefined, ['-mb-3'], ['-mt-6']], + [ + 'above-row', + slot({ statusAbove: true, status: { startedAt: 1, thinking: false, workedSeconds: null } }), + undefined, + ['-mb-3'], + ['-mt-6', '-mb-1.5'] + ] ] as const)('spaces the line %s, case %#', (place, row, notice, has, lacks) => { const view = render(