refactor: improve UI consistency by standardizing header and sidebar component heights, and enhance right panel functionality with expanded button integration

This commit is contained in:
Anish Sarkar 2026-03-29 21:27:10 +05:30
parent b5cc45e819
commit 7632291731
7 changed files with 73 additions and 57 deletions

View file

@ -20,8 +20,6 @@ export const ThinkingStepsDisplay: FC<{ steps: ThinkingStep[]; isThreadRunning?:
steps,
isThreadRunning = true,
}) => {
const [isOpen, setIsOpen] = useState(true);
const getEffectiveStatus = useCallback(
(step: ThinkingStep): "pending" | "in_progress" | "completed" => {
if (step.status === "in_progress" && !isThreadRunning) {
@ -38,12 +36,18 @@ export const ThinkingStepsDisplay: FC<{ steps: ThinkingStep[]; isThreadRunning?:
!isThreadRunning &&
steps.every((s) => getEffectiveStatus(s) === "completed");
const isProcessing = isThreadRunning && !allCompleted;
const [isOpen, setIsOpen] = useState(() => isProcessing);
useEffect(() => {
if (isProcessing) {
setIsOpen(true);
return;
}
if (allCompleted) {
setIsOpen(false);
}
}, [allCompleted]);
}, [allCompleted, isProcessing]);
if (steps.length === 0) return null;