Repository navigation
fix(workflow-ui): clamp long tool descriptions in the tool picker - #392
Merged
Merged
Conversation
The shared cf-tool-picker rendered each tool's full catalog description. Catalog entries like apply_patch carry a multi-paragraph spec (~864px tall), so the node-overrides tools picker — which lists the whole host + MCP catalog — became unusable, dominated by description text. Clamp descriptions to 2 lines with a "show more" / "show less" toggle. Only descriptions long enough to actually be truncated (>140 chars or multi-line) get the clamp + toggle; short one-liners (echo, now) render in full as before. Per-tool expanded state, keyed by tool identifier. Benefits the agent-role editor too — it uses the same picker. Co-Authored-By: Claude Opus 4.7 (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.
Summary
The shared
cf-tool-pickerrendered each tool's full catalog description. Catalog entries likeapply_patchcarry a multi-paragraph spec (~864px tall), so the node-overrides tools picker — which lists the entire host + MCP catalog — became dominated by description text.Clamp descriptions to 2 lines with a show more / show less toggle. Only descriptions long enough to actually be truncated (
>140chars or multi-line) get the clamp + toggle; short one-liners (echo,now) still render in full with no toggle. Per-tool expanded state, keyed by tool identifier.Also benefits the agent-role editor — it uses the same picker.
Test plan
ng buildcleanecho/now— short, render plain, no toggleread_file/run_command— under threshold, wrap naturally, no toggleapply_patch/vcs.open_pr— clamped to 2 lines (38px) with ashow moretoggleshow moreonapply_patchexpands 38px → 864px, label flips toshow less, re-collapse returns to 38px🤖 Generated with Claude Code