-
Notifications
You must be signed in to change notification settings - Fork 92
Qurator: adjust styling for tool messages #4572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Create collapsible ToolMessage component with status icons and hover effects for better visual hierarchy. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4572 +/- ##
==========================================
- Coverage 39.44% 39.44% -0.01%
==========================================
Files 852 852
Lines 36848 36860 +12
Branches 5760 6017 +257
==========================================
+ Hits 14536 14538 +2
+ Misses 21794 21098 -696
- Partials 518 1224 +706
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR enhances the Assistant Chat UI by introducing better visual hierarchy for tool messages through a new collapsible `ToolMessage` component. The changes include renaming the 'bright' color scheme to 'normal' and adding a new 'faint' color scheme specifically for tool messages, which uses a grey background with reduced opacity and hover effects. The core improvement is the new `ToolMessage` component that displays tool usage information in a collapsed state by default, with expandable details and status icons (`Build`, `CheckCircleOutline`, `ErrorOutline`, `CircularProgress`) that provide immediate visual feedback about tool execution states.The implementation replaces direct MessageContainer
usage in both ToolUseEvent
and ToolUseState
components with the new ToolMessage
component. This creates a more organized chat interface where tool messages have a subtle presence that doesn't compete with user and assistant messages for attention, while still providing full functionality through click-to-expand interaction patterns.
Important Files Changed
Changed Files
Filename | Score | Overview |
---|---|---|
catalog/app/components/Assistant/UI/Chat/Chat.tsx | 4/5 | Introduces new ToolMessage component with collapsible interface, faint color scheme, and status icons for better tool message visual hierarchy |
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it focuses on UI improvements without changing core functionality
- Score reflects well-structured component implementation with proper TypeScript typing and Material-UI integration
- Pay attention to the ToolMessage component's expand/collapse behavior and ensure proper testing of hover effects across different browsers
Sequence Diagram
sequenceDiagram
participant User
participant Chat
participant MessageContainer
participant ToolMessage
participant Model
participant DevTools
participant Input
User->>Chat: "Opens chat interface"
Chat->>MessageContainer: "Renders initial greeting message"
MessageContainer-->>Chat: "Displays greeting"
User->>Input: "Types message and submits"
Input->>Chat: "onSubmit(content)"
Chat->>Model: "dispatch(Ask action)"
Model-->>Chat: "Updates state to WaitingForAssistant"
Chat->>MessageContainer: "Renders user message"
Chat->>MessageContainer: "Renders WaitingState"
MessageContainer-->>Chat: "Displays processing message"
Model-->>Chat: "Updates state to ToolUse"
Chat->>ToolMessage: "Renders ToolUseState with running status"
ToolMessage->>MessageContainer: "Creates faint colored container"
MessageContainer-->>ToolMessage: "Styled tool message"
ToolMessage-->>Chat: "Collapsible tool message with spinner"
User->>ToolMessage: "Clicks to expand details"
ToolMessage->>ToolMessage: "toggleExpanded()"
ToolMessage-->>User: "Shows JsonDisplay with tool details"
Model-->>Chat: "Tool execution completes"
Chat->>ToolMessage: "Updates with success/error status"
ToolMessage-->>Chat: "Shows status icon (success/error)"
Model-->>Chat: "Assistant response ready"
Chat->>MessageContainer: "Renders assistant message"
MessageContainer-->>Chat: "Displays assistant response"
User->>Chat: "Clicks menu button"
Chat->>Chat: "toggleMenu()"
Chat-->>User: "Shows menu options"
User->>Chat: "Selects 'Developer Tools'"
Chat->>DevTools: "Renders developer panel"
DevTools-->>Chat: "Shows dev tools interface"
User->>MessageContainer: "Hovers over message with actions"
MessageContainer->>MessageContainer: "Shows discard action"
User->>MessageContainer: "Clicks discard"
MessageContainer->>Model: "dispatch(Discard action)"
Model-->>Chat: "Updates conversation state"
1 file reviewed, no comments
@fiskus ping |
* master: Qurator: adjust styling for tool messages (#4572) Qurator: Limit total search results contents context to 100k characters to avoid context window overflow (#4573) Bump amazonlinux from 2023.8.20250908.0 to 2023.8.20250915.0 in /catalog (#4558) Bump debian from bullseye-20250908-slim to bullseye-20250929-slim in /lambdas/thumbnail (#4568) Bump amazonlinux from 2023.8.20250908.0 to 2023.8.20250915.0 in /s3-proxy (#4559)
Make tool messages less prominent