From 9b57a0b14f70bfa836b691923af8a322e1dbc927 Mon Sep 17 00:00:00 2001 From: Alona Date: Mon, 8 Dec 2025 14:50:03 -0500 Subject: [PATCH] Remove error icon from ExpandableMessage component (#11964) --- .../chat/expandable-message.test.tsx | 5 ++--- .../features/chat/expandable-message.tsx | 18 +++++------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/frontend/__tests__/components/chat/expandable-message.test.tsx b/frontend/__tests__/components/chat/expandable-message.test.tsx index 0b25ef1f92..4ba839b8af 100644 --- a/frontend/__tests__/components/chat/expandable-message.test.tsx +++ b/frontend/__tests__/components/chat/expandable-message.test.tsx @@ -61,7 +61,7 @@ describe("ExpandableMessage", () => { expect(icon).toHaveClass("fill-success"); }); - it("should render with error icon for failed action messages", () => { + it("should render with no icon for failed action messages", () => { renderWithProviders( { "div.flex.gap-2.items-center.justify-start", ); expect(container).toHaveClass("border-neutral-300"); - const icon = screen.getByTestId("status-icon"); - expect(icon).toHaveClass("fill-danger"); + expect(screen.queryByTestId("status-icon")).not.toBeInTheDocument(); }); it("should render with neutral border and no icon for action messages without success prop", () => { diff --git a/frontend/src/components/features/chat/expandable-message.tsx b/frontend/src/components/features/chat/expandable-message.tsx index 12942498a2..f1f7fe6869 100644 --- a/frontend/src/components/features/chat/expandable-message.tsx +++ b/frontend/src/components/features/chat/expandable-message.tsx @@ -6,7 +6,6 @@ import { I18nKey } from "#/i18n/declaration"; import ArrowDown from "#/icons/angle-down-solid.svg?react"; import ArrowUp from "#/icons/angle-up-solid.svg?react"; import CheckCircle from "#/icons/check-circle-solid.svg?react"; -import XCircle from "#/icons/x-circle-solid.svg?react"; import { OpenHandsAction } from "#/types/core/actions"; import { OpenHandsObservation } from "#/types/core/observations"; import { cn } from "#/utils/utils"; @@ -169,19 +168,12 @@ export function ExpandableMessage({ )} - {type === "action" && success !== undefined && ( + {type === "action" && success && ( - {success ? ( - - ) : ( - - )} + )}