fix(sessions): stop footer status line overlapping diff stats when narrow#3258
Merged
Conversation
…rrow 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
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Renders the footer inside fixed-width boxes (720px down to 220px) so the truncation behaviour at narrow pane widths is easy to eyeball in Storybook. Covers generating, generating-with-queue, awaiting-permission, and idle states. DiffStatsChip doesn't render in Storybook (its tRPC diff-stats query never resolves there), but the pure ContextUsageIndicator occupies the same shrink-0 right-side group, so the overlap scenario is still exercised. Generated-By: PostHog Code Task-Id: 8391467b-63fc-459c-89ef-1d9a45177b91
pauldambra
added a commit
that referenced
this pull request
Jul 8, 2026
Assets-only branch so the PR description can embed the images without adding binaries to the PR diff. Generated-By: PostHog Code Task-Id: 8391467b-63fc-459c-89ef-1d9a45177b91
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the main chat window is narrow (e.g. with panes open), the status line above the prompt input overlaps itself: "(Esc to stop" wraps onto three lines and the elapsed time paints over the diff stats ("22 files").
The left half of the footer row is allowed to shrink (
min-w-0), but nothing insideGeneratingIndicatorwas constrained to a single line — so wrappable text wrapped, and the non-wrappable elapsed time overflowed into theshrink-0right-side stats.Fix
Make the indicator a single non-wrapping line that shrinks gracefully:
min-w-0and the brain iconshrink-0, so the component shrinks inside the row instead of overflowing into the diff stats.Textrun (dot rendered inline), so they truncate as a unit with an ellipsis instead of wrapping.shrink-[8] truncateand the activity wordtruncate, so the Esc/timer hint collapses first and the activity word only ellipsizes as a last resort. The context ring and diff stats keep their space.After (light mode, from the new Storybook stories)
Wide (720px) — everything on one line:
Narrow (340px) — the "(Esc to stop · …s)" hint ellipsizes first; the context ring stays intact, nothing overlaps or wraps:
(Screenshots live on the
posthog-code/fix-session-footer-overlap-assetsbranch so no binaries land in this PR's diff.)Testing
SessionFooter.stories.tsxrendering the footer at fixed widths from 720px down to 220px (generating, generating + queue, awaiting permission, idle). Verified in Storybook (dark and light) via headless browser screenshots:DiffStatsChipdoesn't render in Storybook (its diff-stats query never resolves there), but it shares theshrink-0right-side group with the context ring, so the overlap scenario is exercised.pnpm exec biome checkon the changed files — clean.pnpm --filter @posthog/ui typecheck— passes.🤖 Generated with Claude Code