Skip to content

Automate browser based workflows with AI

fix(SKY-10974): keep clear-credential confirm dialog above dialog overlays (#6542)

Suchintan15405812e31d
diff --git a/skyvern-frontend/src/components/ClearCredentialDialog.tsx b/skyvern-frontend/src/components/ClearCredentialDialog.tsx
index b1b4add21..864044e41 100644
--- a/skyvern-frontend/src/components/ClearCredentialDialog.tsx
+++ b/skyvern-frontend/src/components/ClearCredentialDialog.tsx
@@ -40,7 +40,13 @@ export function ClearCredentialDialog({
{label}
</Button>
</DialogTrigger>
- <DialogContent onCloseAutoFocus={(e) => e.preventDefault()}>
+ {/* z-[60]: this dialog can be nested inside another Dialog (cloud
+ integrations tile); all overlays/contents share z-50, so paint order
+ otherwise depends on portal DOM order alone. */}
+ <DialogContent
+ className="z-[60]"
+ onCloseAutoFocus={(e) => e.preventDefault()}
+ >
<DialogTitle>{title}</DialogTitle>
<DialogDescription>{description}</DialogDescription>
<DialogFooter>
diff --git a/skyvern-frontend/src/components/ui/dialog.tsx b/skyvern-frontend/src/components/ui/dialog.tsx
index db16e295b..cabb71f94 100644
--- a/skyvern-frontend/src/components/ui/dialog.tsx
+++ b/skyvern-frontend/src/components/ui/dialog.tsx
@@ -27,6 +27,9 @@ const DialogOverlay = React.forwardRef<
));
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
+// Overlays and contents all render at z-50, so nested dialogs paint correctly
+// only by portal DOM order; a dialog nested inside another should raise its
+// content above z-50 (e.g. className="z-[60]").
const DialogContent = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>