fix(companion): stop tool-chip elapsed time from clipping + de-noise MCP names - #416
Merged
Merged
Conversation
…names
The tool-call chip laid out the monospace tool name and the elapsed-time
readout as two non-flexible children of a MainAxisSize.min Row. A long
name like `mcp__email-tools__search_emails` consumed the whole row and
pushed the timer ("41s", "3m54s") off the right edge, clipping it.
Restructure so the name + arg share a flexible middle section that
ellipsizes when long, while the elapsed-time text is pinned on the right
and never clips. Chips now fill the available width uniformly, which also
tightens the padding consistency across the activity list.
Also de-noise MCP tool names for display: `mcp__email-tools__search_emails`
renders as `email · search_emails` instead of the full dunder-mangled id,
cutting the visual spam Dylan flagged. Non-MCP names (Bash, Read, …) are
untouched.
Applies to both the live turn (activity_card LiveTurn) and the collapsed
tool history in finished messages, since both reuse ToolChip.
flutter analyze: no issues.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 tool-call activity list, the elapsed-time readout ("41s", "3m54s") was getting clipped off the right edge (Dylan: "you see x seconds is getting cut off here"). Long MCP tool names like
mcp__email-tools__search_emailsalso added a lot of visual spam.Root cause
ToolChip's Row placed the monospace tool name and the timer as two non-flexible children in aMainAxisSize.minRow. A long name took the full width and pushed the timer past the right edge.Fix
mcp__email-tools__search_emails→email · search_emails. Non-MCP names (Bash,Read, …) shown as-is.Applies to both the live turn and the collapsed tool-history in finished messages (both reuse
ToolChip).Test
flutter analyze lib/src/ui/activity_card.dart→ No issues found.Part of the companion-app polish pass. Independent of the other polish PRs — safe to merge in any order.
🤖 Generated with Claude Code