Skip to content

Commit 3cb5fa7

Browse files
authored
🤖 fix: prevent ForceDeleteModal overflow with long error logs (#554)
ErrorCodeBlock now has a 400px max-height with scrolling, and the modal itself is constrained to 90vh to ensure the Force Delete button always remains visible. _Generated with `cmux`_
1 parent cadb5f9 commit 3cb5fa7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/components/ForceDeleteModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const ForceDeleteModal: React.FC<ForceDeleteModalProps> = ({
5050
subtitle="The workspace could not be removed normally"
5151
onClose={onClose}
5252
maxWidth="600px"
53+
maxHeight="90vh"
5354
isLoading={isDeleting}
5455
>
5556
<ErrorSection>

src/components/Modal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const ModalContent: React.FC<
3030
className={cn(
3131
"bg-dark rounded-lg p-6 w-[90%] flex flex-col shadow-lg border border-border",
3232
"[&_h2]:mt-0 [&_h2]:mb-2 [&_h2]:text-white",
33+
maxHeight && "overflow-y-auto",
3334
className
3435
)}
3536
style={{ maxWidth, ...(maxHeight && { maxHeight }) }}
@@ -96,7 +97,8 @@ export const ErrorCodeBlock: React.FC<{ children: React.ReactNode; className?: s
9697
<pre
9798
className={cn(
9899
"bg-background-secondary border border-border rounded p-3",
99-
"text-xs font-mono text-foreground overflow-x-auto whitespace-pre-wrap break-words leading-relaxed",
100+
"text-xs font-mono text-foreground overflow-auto whitespace-pre-wrap break-words leading-relaxed",
101+
"max-h-[400px]",
100102
className
101103
)}
102104
>

0 commit comments

Comments
 (0)