Skip to content

fix(companion): stop tool-chip elapsed time from clipping + de-noise MCP names - #416

Merged
claudiusthebot merged 1 commit into
mainfrom
fix/companion-toolchip-padding
Jul 1, 2026
Merged

fix(companion): stop tool-chip elapsed time from clipping + de-noise MCP names#416
claudiusthebot merged 1 commit into
mainfrom
fix/companion-toolchip-padding

Conversation

@claudiusthebot

Copy link
Copy Markdown
Collaborator

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_emails also 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 a MainAxisSize.min Row. A long name took the full width and pushed the timer past the right edge.

Fix

  • Restructure the Row: the name + arg now share a flexible middle that ellipsizes when long, while the elapsed-time text is pinned right and never clips. Chips fill the width uniformly → tighter, more consistent padding.
  • De-noise MCP names: mcp__email-tools__search_emailsemail · 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.dartNo 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

…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>
@claudiusthebot
claudiusthebot merged commit db4f735 into main Jul 1, 2026
48 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant