From a4140dac258779a0f49e0388d7d03872a00ddbea Mon Sep 17 00:00:00 2001 From: chengyongru Date: Thu, 10 Sep 2026 15:21:15 +0800 Subject: [PATCH] fix(webui): align file edits and remove redundant status markers --- webui/src/components/MessageBubble.tsx | 4 +- .../thread/activity/ActivityStep.tsx | 49 ++++++++++--------- .../thread/activity/FileEditRow.tsx | 39 +++------------ 3 files changed, 37 insertions(+), 55 deletions(-) diff --git a/webui/src/components/MessageBubble.tsx b/webui/src/components/MessageBubble.tsx index 09028ada9..6e158fb76 100644 --- a/webui/src/components/MessageBubble.tsx +++ b/webui/src/components/MessageBubble.tsx @@ -887,8 +887,8 @@ export function StreamingLabelSheen({ {children} diff --git a/webui/src/components/thread/activity/ActivityStep.tsx b/webui/src/components/thread/activity/ActivityStep.tsx index 1404847a6..21f3bd2cf 100644 --- a/webui/src/components/thread/activity/ActivityStep.tsx +++ b/webui/src/components/thread/activity/ActivityStep.tsx @@ -10,6 +10,7 @@ export type ActivityStepTone = "neutral" | "active" | "success" | "error"; export interface ActivityStepProps { icon?: LucideIcon; marker?: ReactNode; + showMarker?: boolean; label: ReactNode; ariaLabel?: string; active?: boolean; @@ -24,6 +25,7 @@ export interface ActivityStepProps { export function ActivityStep({ icon: Icon, marker, + showMarker = true, label, ariaLabel, active = false, @@ -58,32 +60,35 @@ export function ActivityStep({ data-testid="activity-step" aria-label={ariaLabel} className={cn( - "relative grid min-w-0 grid-cols-[1.125rem_minmax(0,1fr)] gap-2 py-0.5 text-[13px] leading-5", + "relative grid min-w-0 py-0.5 text-[13px] leading-5", + showMarker ? "grid-cols-[1.125rem_minmax(0,1fr)] gap-2" : "grid-cols-1", className, )} style={style} > - - {marker ?? ( - - {Icon ? : null} - - )} - + {showMarker ? ( + + {marker ?? ( + + {Icon ? : null} + + )} + + ) : null}
{typeof label === "string" ? ( diff --git a/webui/src/components/thread/activity/FileEditRow.tsx b/webui/src/components/thread/activity/FileEditRow.tsx index 0579c7b4f..071161df1 100644 --- a/webui/src/components/thread/activity/FileEditRow.tsx +++ b/webui/src/components/thread/activity/FileEditRow.tsx @@ -1,11 +1,8 @@ import { useEffect, useMemo, useState } from "react"; import { - AlertCircle, - CheckCircle2, ChevronDown, ChevronRight, ChevronUp, - CircleDashed, ExternalLink, } from "lucide-react"; import { useTranslation } from "react-i18next"; @@ -95,29 +92,11 @@ function FileEditRow({ const action = fileEditAction(edit, editing, failed); const hasCountedDiff = !failed && !edit.binary && hasVisibleDiffStats(edit); const showDiff = canRenderDiff(edit, displayMode); - const statusIcon = failed ? ( - - ) : editing ? ( - - ) : ( - - ); return (
- {statusIcon} - - )} + showMarker={false} active={editing} tone={failed ? "error" : editing ? "active" : "success"} className="text-xs" @@ -126,7 +105,7 @@ function FileEditRow({ ? t("message.fileEditPreparing", { defaultValue: "Preparing file edit…" }) : ( - {action} + {action} {showDiff ? ( -
- -
+ ) : null}
);