KatalKavya96 opened a new pull request, #56093: URL: https://github.com/apache/airflow/pull/56093
### Problem When editing a DAG Run note, users were sometimes prompted with **two confirmation dialogs** when navigating away — one real and one spurious. This happened because the Markdown editor was uncontrolled, and the dirty-form detector assumed there were unsaved changes even when the content was already saved. ### Fix - Converted the note editor into a **controlled component**. - Added local state (`currentValue`) that syncs with `mdContent` via `useEffect`. - Updates now flow cleanly through `setMdContent` from the textarea `onChange`. - Prevents the false-positive dirty state that caused duplicate confirmations. ### Result - Users only get a confirmation prompt when there are **actual unsaved changes**. - DAG Run note editing behaves consistently with no redundant dialogs. ### Testing - Verified that typing into the note updates both preview and parent state. - Navigating away after saving does not trigger any extra confirmation. - Placeholder renders correctly when the note is empty. ### Demo Video https://github.com/user-attachments/assets/6bf49685-4661-42db-9e3e-4c966e83cde7 --- Closes: #55847 -- 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]
