refactor(frontend): migrate diff dialogs to Modal chrome (D-5) (#909)

* refactor(frontend): extend Modal size system with wide variant

Adds 'wide' (max-w-5xl w-[95vw]) to ModalSize for dialogs that render
Monaco DiffEditor side-by-side, which need ~1024px to display both panels
clearly. The existing 'xl' cap at max-w-xl (576px) is too narrow for that
use case.

* refactor(frontend): migrate ComposeDiffPreviewDialog to Modal chrome (D-5)

Replaces raw Dialog/DialogHeader/DialogFooter with Modal size="wide",
ModalHeader, and ModalFooter. Kicker carries the stack name and file type
context; title is the file name (accessible dialog name for tests). Footer
hint reuses the existing "ON DISK → UNSAVED" label via the hint prop.

* refactor(frontend): migrate GitSourceDiffDialog to Modal chrome (D-5)

Replaces Dialog + nested AlertDialog with Modal size="wide", ModalHeader,
ModalFooter, and ConfirmModal. Kicker is "GIT · PULL PREVIEW"; title is
the stack name. Short SHA moves to the sr-only description. The "Deploy
after apply" checkbox in the footer hint slot uses normal-case and
tracking-normal on the Label to prevent KICKER_CLASS uppercase/tracking
from being inherited. The overwrite confirmation uses ConfirmModal with
variant="destructive" (rose rail) since it replaces local file content.
This commit is contained in:
Anso
2026-05-04 11:53:35 -04:00
committed by GitHub
parent 945259f048
commit 46b3d53274
3 changed files with 167 additions and 188 deletions
+2 -1
View File
@@ -18,13 +18,14 @@ import {
const KICKER_CLASS = 'font-mono text-[10px] uppercase tracking-[0.22em]';
type ModalSize = 'sm' | 'md' | 'lg' | 'xl';
type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'wide';
const SIZE_CLASS: Record<ModalSize, string> = {
sm: 'max-w-sm',
md: 'max-w-md',
lg: 'max-w-lg',
xl: 'max-w-xl w-[95vw]',
wide: 'max-w-5xl w-[95vw]',
};
interface ModalProps {