Files
Dan Sutton a15566ddce fix(webapp): control cancel-run Dialog state so submit isn't raced by Radix DialogClose
Previous attempt wrapped the form's submit button in <DialogClose
asChild> so the dialog closed on click. That race-condition'd with
Remix's <Form>: Radix's Slot-attached onClick triggered
onOpenChange(false), the Dialog and its child Form unmounted mid-cycle,
and the button's name=value pair (carrying `redirectUrl`) was dropped
from the submitted FormData. The action then read
`submission.value.redirectUrl` as undefined and the resulting redirect
landed on `/env/dev` instead of the run-detail page.

Switch to a ControlledCancelRunDialog at the call site that owns the
Radix `open` state. The inner CancelRunDialog watches the navigation
state transitions and signals the parent to close the dialog once the
submission has captured its submitter cleanly. Submit-button name=value
is preserved; redirect resolves to the run-detail page; modal still
dismisses after submit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 08:55:24 +01:00
..
2025-07-30 13:48:02 +01:00
2026-02-12 17:48:02 +00:00
2025-11-19 11:22:23 +00:00
2023-11-24 14:08:50 +00:00
2025-05-28 11:02:56 +01:00
2025-04-04 14:20:28 +01:00