pierrejeambrun opened a new pull request, #67645:
URL: https://github.com/apache/airflow/pull/67645
## Symptom
Open a Clear or Mark-as-success/failed dialog on a Dag Run or task
instance, close it without confirming, and the page becomes
unresponsive — only scroll works. Reopening another dialog doesn't
help; only a hard refresh recovers.
## Root cause
The buttons that own these dialogs render them like
```tsx
{open ? <ClearRunDialog ... open={open} /> : undefined}
```
When the user closes the dialog, ``open`` flips to ``false`` and the
parent unmounts the dialog component *synchronously*. Chakra never
gets to run ``Dialog.Root``'s close transition, which is what removes
the body-scroll lock + ``pointer-events`` overlay it applies on open.
The overlay stays on ``document``, blocking every click while still
letting wheel events through.
## Fix
Drop the conditional wrapper in the five callers (``ClearRunButton``,
``MarkRunAsButton``, ``ClearTaskInstanceButton`` — three discriminator
branches, ``MarkTaskInstanceAsButton``, and the ``ClearTaskInstance``
mount on the Task Instance Header) and always render the dialog.
``lazyMount`` (already set on every ``Dialog.Root``) defers the very
first mount until the user actually opens the dialog, and the
``open`` prop drives visibility cleanly across subsequent cycles.
``ClearRunDialog``'s ``useClearDagRunDryRun`` was the only dry-run
query in this set that didn't already gate on ``open``; adding
``enabled: open`` so the now-always-mounted dialog doesn't fire it
in the background. The four other dialogs already do this.
## Screenshots
UI bug-fix with no visual change — the dialog looks the same, it just
stops trapping the page after close. No screenshot can show that;
exercising in the browser is the only way to confirm.
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 4.7)
Generated-by: Claude Code (Opus 4.7) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]