implementation
Implement in your agent
# Implement Alert dialog in your agent ## Objective Implement Alert dialog for this verified behavior: A modal dialog that interrupts a consequential action and requires an explicit confirm or cancel decision. ## Prerequisites - Inspect the repository, design system, and existing tests first. - Preserve unrelated changes and keep the file scope bounded. - Confirm that Alert dialog matches the need before writing code. ## Required behavior - While modal, keyboard focus stays inside the surface until it closes. - The surface remains until the user deliberately confirms or cancels the consequential action. ## States to cover - Decision closed with workspace intact — Decision closed with workspace intact - Initial deletion decision open — Initial deletion decision open - Decision closed after cancellation — Decision closed after cancellation - Deletion decision reopened after cancellation — Deletion decision reopened after cancellation - Deletion submitting — Deletion submitting - Decision closed after confirmed deletion — Decision closed after confirmed deletion - Deletion decision reopened after confirmation — Deletion decision reopened after confirmation ## Accessibility - The primary control or named region for Alert dialog has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names. - Initial focus lands on the least destructive useful action unless reading long consequences first is safer. - Only an explicit decision or a documented safe cancellation closes the alert; no timer or accidental outside press dismisses it. - Tab moves only between decision controls - Escape cancels when cancellation remains safe - Enter activates the explicitly focused action ## Non-goals - The action can be safely undone - The message only reports a result and needs no decision ## Acceptance criteria - The message names the exact consequence - Confirm and Cancel are explicit and visually distinct - Initial focus avoids accidental destructive confirmation - The alert cannot disappear before a decision
sha256:824e1c0ddbb99284aef7134a6a94a3e00eb68d2f20b57087ae5976cc9fe31aee