diff --git a/src/ui/src/components/common/LoadingState.tsx b/src/ui/src/components/common/LoadingState.tsx
index 54e621b9..7143890a 100644
--- a/src/ui/src/components/common/LoadingState.tsx
+++ b/src/ui/src/components/common/LoadingState.tsx
@@ -1,9 +1,28 @@
import { Spinner } from "../ui/spinner";
-export function LoadingState() {
+interface LoadingStateProps {
+ /**
+ * Extra classes applied to the spinner icon itself (e.g. "mr-2 h-4 w-4") so callers that
+ * previously rendered a bare `Loader2` icon inline can preserve their sizing/margin.
+ */
+ className?: string;
+ /**
+ * When set, skips the default centered block wrapper (`flex items-center justify-center
+ * py-8`) so the spinner sits inline next to a label instead of taking over a full block.
+ * Callers migrating a small inline `Loader2` (inside a button, next to text, etc.) should
+ * pass `true`; full-page/section loaders should leave this unset to keep prior behaviour.
+ */
+ inline?: boolean;
+}
+
+export function LoadingState({ className, inline = false }: LoadingStateProps = {}) {
+ if (inline) {
+ return
diff --git a/src/ui/src/components/workflow/UndoStagePanel.tsx b/src/ui/src/components/workflow/UndoStagePanel.tsx
index b468866f..0f8e8c39 100644
--- a/src/ui/src/components/workflow/UndoStagePanel.tsx
+++ b/src/ui/src/components/workflow/UndoStagePanel.tsx
@@ -1,7 +1,8 @@
-import { Check, ChevronRight, Loader2, Undo2, Wrench, X } from "lucide-react";
+import { Check, ChevronRight, Undo2, Wrench, X } from "lucide-react";
import type React from "react";
import { type MCPStep, MCPStepType } from "../../types";
import { deepParseJson, formatToolName } from "../../utils";
+import { LoadingState } from "../common/LoadingState";
import { ReasoningStep } from "./ReasoningStep";
const handleDetailsToggle = (data: unknown) => (e: React.SyntheticEvent