Skip to content

Conversation

@roomote
Copy link

@roomote roomote bot commented Oct 21, 2025

Description

This PR fixes the inconsistent behavior with the "API Request" section in the chat interface where a double-arrow icon (⇄) appeared instead of the expandable chevron icon, preventing users from viewing request details.

Issue

Fixes #8755

Changes Made

  • Replaced static double-arrow icon with expandable chevron (▶/▼) for completed API requests
  • Added click handler to toggle expansion state when clicking the header
  • Display API request details in a CodeAccordion component when expanded
  • Removed code duplication in icon rendering logic

Testing

  • ✅ All existing tests pass
  • ✅ Linting passes
  • ✅ Type checking passes

Screenshots

The API Request section now shows:

  • Chevron-down (▶) when collapsed
  • Chevron-up (▼) when expanded
  • Request details are visible when expanded

Review Notes

  • Code review feedback has been addressed:
    • Removed duplicate icon rendering logic
    • Fixed empty onClick handler in CodeAccordion component

Important

Adds expand/collapse functionality to API Request section in ChatRow.tsx, replacing static icon with dynamic chevron and improving code quality.

  • Behavior:
    • Replaces static double-arrow icon with expandable chevron (▶/▼) for completed API requests in ChatRow.tsx.
    • Adds click handler to toggle expansion state in ChatRowContent.
    • Displays API request details in CodeAccordion when expanded.
  • Code Quality:
    • Removes duplicate icon rendering logic in ChatRow.tsx.
  • Testing:
    • All existing tests, linting, and type checking pass.

This description was created by Ellipsis for daaedc6. You can customize this summary. It will automatically update as commits are pushed.

- Replace static double-arrow icon with expandable chevron for completed API requests
- Add click handler to toggle expansion state
- Display API request details in CodeAccordian when expanded
- Maintain consistent UI behavior with other expandable sections

Fixes #8755
- Remove code duplication in icon rendering logic
- Use existing icon variable for non-expandable states
- Fix CodeAccordion onToggleExpand handler
@roomote roomote bot requested review from cte, jr and mrubens as code owners October 21, 2025 19:14
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 21, 2025
@roomote
Copy link
Author

roomote bot commented Oct 21, 2025

Review Complete

No issues found. The implementation correctly addresses the bug reported in #8755.

Changes verified:

  • ✅ Replaced static double-arrow icon with expandable chevron icons for completed API requests
  • ✅ Added click handler to toggle expansion state when clicking the header
  • ✅ Display API request details in CodeAccordian component when expanded
  • ✅ Removed code duplication in icon rendering logic
  • ✅ Properly reuses existing icon variable for non-expandable states
  • ✅ Uses handleToggleExpand callback for CodeAccordian's onToggleExpand

The code follows existing patterns, maintains consistency with the codebase, and successfully addresses the user-reported inconsistency.

Follow Along on Roo Code Cloud

@dosubot dosubot bot added the UI/UX UI/UX related or focused label Oct 21, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 21, 2025

return (
<>
<div
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For accessibility, consider adding role='button' and tabIndex='0' (with keyboard event handlers) to the clickable header <div> so that the expand/collapse functionality is accessible.

Copy link
Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[BUG] Inconsistent API Request expand/collapse behavior - sometimes shows double arrow icon and cannot be unfolded

2 participants