Repository navigation
Show tool summaries at full row width - #933
Merged
AnthonyRonning merged 1 commit intoSep 15, 2026
Merged
AnthonyRonning merged 1 commit into
AnthonyRonning merged 1 commit into
Conversation
Tool-card and thinking-row summaries are one-line prose, but their title divs combined line_clamp(1) with a middle ellipsis and no min_w_0/flex sizing. GPUI therefore middle-truncated sentences that read head...tail, and the line-clamp wrap path decides truncation from summed per-character advances, which overestimates shaped text and cuts summaries that would fit. Give both titles the canonical single-line treatment instead: min_w_0 + flex_1 + overflow hidden + nowrap + end ellipsis. The title now claims the row's width and only ellipsizes at its end when the honestly-shaped text overflows, matching the subagent activity rows. The redundant flex_1 spacer in the tool header goes away with it. A debug_bounds layout test pins the fills-the-row contract.
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
In the GPUI Agent transcript, tool-card and thinking-row summaries were
truncated with a middle ellipsis (
head…tail) well before the row's end,even when the text would fit — cut off mid-sentence with most of the row
left empty.
Two causes in
render_tool/render_thinking:line_clamp(1)withtext_ellipsis_middle()and had no
min_w_0/ flex sizing. Middle truncation is for paths andidentifiers; these titles are one-line prose summaries.
line_clamptruncation path decides fromsummed per-character advances (no shaping/kerning), which overestimates
the real text width and cuts summaries that would actually fit.
Change
Both titles now use the canonical single-line treatment already used by
the subagent activity rows in the same file:
min_w_0()+flex_1()+.truncate()(overflow hidden + nowrap +end ellipsis). The title claims the row's width and only ellipsizes at
its end when the honestly-shaped text overflows.
flex_1spacer in the tool header row is gone.Evidence
debug_boundsharness: the tool titlewas middle-ellipsized mid-sentence; post-fix it fills the row
(723px → full row) and truncates only at the end.
test_tool_summary_title_fills_the_rowpins thefills-the-row contract for both the tool card and the thinking row.
just ci(fmt-check, clippy-D warningsacross all four feature sets, workspace + headless tests).