fix(ui): close parent modal when Edit dialog opens (#354)

Fixes #235

The Edit Task modal's close button (X) was unresponsive because both the parent
modal and the edit dialog used z-50 for their overlays. The parent's overlay
intercepted clicks meant for the edit dialog's close button.

This fix hides the parent modal while the Edit dialog is open, then reopens it
when the Edit dialog closes. This is a cleaner UX than z-index hacks.

Signed-off-by: Black Circle Sentinel <mludlow000@icloud.com>
This commit is contained in:
Michael Ludlow
2025-12-27 13:22:49 -05:00
committed by GitHub
parent 40d04d7c7d
commit e9782db044
@@ -307,7 +307,11 @@ function TaskDetailModalContent({ open, task, onOpenChange, onSwitchToTerminals,
variant="ghost"
size="icon"
className="hover:bg-primary/10 hover:text-primary transition-colors"
onClick={() => state.setIsEditDialogOpen(true)}
onClick={() => {
state.setIsEditDialogOpen(true);
// Hide parent modal while edit dialog is open to fix z-index stacking
onOpenChange(false);
}}
disabled={state.isRunning && !state.isStuck}
>
<Pencil className="h-4 w-4" />
@@ -469,7 +473,13 @@ function TaskDetailModalContent({ open, task, onOpenChange, onSwitchToTerminals,
<TaskEditDialog
task={task}
open={state.isEditDialogOpen}
onOpenChange={state.setIsEditDialogOpen}
onOpenChange={(open) => {
state.setIsEditDialogOpen(open);
// Reopen parent modal when edit dialog closes
if (!open) {
onOpenChange(true);
}
}}
/>
{/* Delete Confirmation Dialog */}