Skip to content

Commit 86be2e8

Browse files
authored
fix(sessions): stop footer status line overlapping diff stats when narrow
The generating indicator's text nodes had no single-line constraint, so in a narrow chat pane "(Esc to stop" wrapped onto multiple lines and the non-wrappable elapsed time painted over the shrink-0 diff stats on the right. Make the indicator a single non-wrapping line that shrinks cleanly: the "(Esc to stop · 5.4s)" hint is one truncating text run that gives up space (shrink-[8]) before the activity word, which itself truncates as a last resort. Generated-By: PostHog Code Task-Id: 8391467b-63fc-459c-89ef-1d9a45177b91
1 parent 2ecc6b6 commit 86be2e8

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

packages/ui/src/features/sessions/components/GeneratingIndicator.tsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -171,21 +171,22 @@ export function GeneratingIndicator({
171171
<Flex
172172
align="center"
173173
gap="2"
174-
className="select-none select-none"
174+
className="min-w-0 select-none"
175175
style={{ WebkitUserSelect: "none" }}
176176
>
177-
<Brain size={12} className="ph-pulse" />
178-
<Text className="text-[13px] text-accent-11">{activity}...</Text>
179-
<Text color="gray" className="text-[13px]">
177+
<Brain size={12} className="ph-pulse shrink-0" />
178+
<Text className="truncate text-[13px] text-accent-11">{activity}...</Text>
179+
{/* The hint shrinks (and truncates) well before the activity word does. */}
180+
<Text color="gray" className="shrink-[8] truncate text-[13px]">
180181
(Esc to stop
181-
</Text>
182-
<Circle size={4} weight="fill" className="mx-[2px] my-0 text-gray-9" />
183-
<Text
184-
color="gray"
185-
style={{ fontVariantNumeric: "tabular-nums" }}
186-
className="text-[13px]"
187-
>
188-
{formatDuration(elapsed, 1)})
182+
<Circle
183+
size={4}
184+
weight="fill"
185+
className="mx-1 inline-block align-middle text-gray-9"
186+
/>
187+
<span style={{ fontVariantNumeric: "tabular-nums" }}>
188+
{formatDuration(elapsed, 1)})
189+
</span>
189190
</Text>
190191
</Flex>
191192
);

0 commit comments

Comments
 (0)