pierrejeambrun opened a new pull request, #67316:
URL: https://github.com/apache/airflow/pull/67316

   The Expand/Collapse All toggle on the XComs and Audit Log pages was a
   no-op: clicking the buttons updated the toggle state in the header but
   the JSON content in each row stayed in its initial fold state.
   
   Root cause: \`RenderedJsonField\` runs Monaco's \`editor.foldAll\` action
   once inside \`handleMount\`, based on the initial \`collapsed\` prop. It
   never reacts to subsequent prop changes, so toggling \`collapsed\` from
   the parent (via \`ExpandCollapseButtons\`) has no effect on the editor.
   
   Fix: save the editor instance in a ref and add a \`useEffect\` that runs
   \`editor.foldAll\` / \`editor.unfoldAll\` whenever \`collapsed\` changes
   after mount. The initial fold remains in \`handleMount\` to keep the
   no-flicker behavior introduced in #63831.
   
   closes: #67310
   
   ---
   
   ##### 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]

Reply via email to