-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: show delete button consistently on task cards (#6494) #6511
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
fix: show delete button consistently on task cards (#6494) #6511
Conversation
- Remove size condition from delete button visibility - Keep size display conditional (only show when size > 0) - Update tests to reflect new behavior - Add tests for undefined size and no item cases
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.
Thank you for your contribution! This PR successfully fixes the delete button visibility issue on task cards.
What works well:
- ✅ The delete button now shows consistently when an item exists, regardless of size
- ✅ File size display remains conditional (only shows when size > 0), avoiding "0 B" display
- ✅ Comprehensive test coverage with new edge cases
- ✅ Clean, minimal implementation that follows React best practices
The code changes are focused and properly tested. This improves UX consistency between the main screen and history screen.
LGTM! 🚀
|
Delete button is still not showing on the main screen. This was a workflow test (failed). |
Related GitHub Issue
Closes: #6494
Roo Code Task Context (Optional)
No Roo Code task context for this PR
Description
This PR fixes the missing delete button on task cards in the main chat screen by removing the size condition that was hiding it.
Key changes:
TaskActions.tsxto show the delete button whenever an item exists, regardless of its sizeitem.size > 0Design decision: The delete button visibility is now consistent between the main screen and history screen, improving UX. The file size display remains conditional to avoid showing "0 B" for tasks without size data.
Test Procedure
Automated Testing:
cd webview-ui && npx vitest run src/components/chat/__tests__/TaskActions.spec.tsxManual Testing:
Pre-Submission Checklist
Screenshots / Videos
No UI changes in this PR (The delete button was already styled, just hidden conditionally)
Documentation Updates
Additional Notes
This fix ensures consistent UX between the main chat screen and history screen. The delete functionality was already working properly in the backend - this was purely a UI visibility issue.
Get in Touch
@MuriloFP
Important
Fixes delete button visibility on task cards in
TaskActions.tsxto show consistently when an item exists, regardless of size.TaskActions.tsxto always show the delete button whenitemexists, regardless ofitem.size.item.size > 0.TaskActions.spec.tsxto expect delete button visibility whenitem.sizeis 0 or undefined.item.This description was created by
for 8f2546f. You can customize this summary. It will automatically update as commits are pushed.