feat (UI): improve UX by grouping tool calls in the chat#2224
Open
peterj wants to merge 3 commits into
Open
Conversation
|
Warning Testing pausedMonthly snapshot limit reached. Update your plan for additional snapshots and to resume testing. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves chat readability in the UI by collapsing consecutive tool-call messages into a single expandable “tool call group” row, while keeping the expanded view equivalent to the existing per-message rendering.
Changes:
- Added shared, non-component helper utilities to detect/extract tool-call request/result data from A2A SDK messages.
- Introduced a new
ToolCallGroupcomponent plus grouping logic to fold consecutive tool-call message runs into collapsible sections. - Updated the chat rendering pipeline to render grouped items for both stored and streaming message lists, with accompanying unit tests and Storybook stories.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/lib/toolCallExtraction.ts | New shared helpers for identifying tool messages and extracting tool call requests/results. |
| ui/src/lib/tests/toolCallExtraction.test.ts | Unit tests covering tool call message detection and extraction behavior. |
| ui/src/components/chat/ToolCallGroup.tsx | New grouping component and grouping algorithm for consecutive tool-call messages. |
| ui/src/components/chat/ToolCallGroup.stories.tsx | Storybook stories demonstrating grouped tool-call UX states (passing, failing, running, many). |
| ui/src/components/chat/ToolCallDisplay.tsx | Refactor to consume the shared extraction helpers instead of in-component copies. |
| ui/src/components/chat/ChatInterface.tsx | Switches chat rendering to use grouped render items for stored/streaming messages. |
| ui/src/components/chat/tests/ToolCallGroup.test.tsx | Unit tests for grouping logic and ToolCallGroup expand/collapse + summary behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
b48d13a to
714d224
Compare
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
Contributor
|
@peterj - What about subagent Tool Call and MCP App calls? Should we separated those ?? |
Collaborator
Author
|
i’ll check the sub agents - the mcp app calls are rendered outside of the
group
…On Mon, Jul 13, 2026 at 19:40 Dmytro Rashko ***@***.***> wrote:
*dimetron* left a comment (kagent-dev/kagent#2224)
<#2224 (comment)>
@peterj <https://github.com/peterj> - What about subagent Tool Call and
MCP App calls? Should we separated those ??
—
Reply to this email directly, view it on GitHub
<#2224?email_source=notifications&email_token=ACURJ3DPCEOKROF2U64PQ2D5EUNIXA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOJWGA4DKNBQG442M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4960854079>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACURJ3FE4MROXO3P2OTMMUD5EUNIXAVCNFSNUABFKJSXA33TNF2G64TZHM4TEMBRGU4TKMBRHNEXG43VMU5TIOBXGIZDSOBZGAYKC5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ACURJ3GRSCPJMUK5HHR2U5T5EUNIXA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOJWGA4DKNBQG442M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/ACURJ3AZPBACDF6HIUXJKRD5EUNIXA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOJWGA4DKNBQG442M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
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.
Group the tool calls in the chat for better readability of the chat. The expanded view is the same as what we currently have, the new part is the grouping of the tool calls.