Skip to content

Commit 9b5b7b8

Browse files
authored
feat: keep stream error toggle open by default (#8703)
1 parent ae57291 commit 9b5b7b8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

gui/src/components/ToggleDiv.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ interface ToggleProps {
77
title: React.ReactNode;
88
icon?: ComponentType<React.SVGProps<SVGSVGElement>>;
99
testId?: string;
10+
defaultOpen?: boolean;
1011
}
1112

1213
function ToggleDiv({
1314
children,
1415
title,
1516
icon: Icon,
1617
testId = "context-items-peek",
18+
defaultOpen = false,
1719
}: ToggleProps) {
18-
const [open, setOpen] = useState(false);
20+
const [open, setOpen] = useState(defaultOpen);
1921
const [isHovered, setIsHovered] = useState(false);
2022

2123
return (

gui/src/pages/gui/StreamError.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,11 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => {
250250
{/* Expandable technical details using ToggleDiv */}
251251
{message && (
252252
<div className="mb-2">
253-
<ToggleDiv title="View error output" testId="error-output-toggle">
253+
<ToggleDiv
254+
title="View error output"
255+
testId="error-output-toggle"
256+
defaultOpen
257+
>
254258
<div className="flex flex-col gap-0 rounded-sm">
255259
<code className="text-editor-foreground block max-h-48 overflow-y-auto p-3 font-mono text-xs">
256260
{parsedError}

0 commit comments

Comments
 (0)