ucaeon opened a new pull request, #73429: URL: https://github.com/apache/airflow/pull/73429
Add an **Expand task groups by default** preference under **Settings → Graph**, following the [user-settings approach suggested in the issue](https://github.com/apache/airflow/issues/55305#issuecomment-5511302239). This uses browser-local settings rather than introducing the Dag and TaskGroup constructor parameters originally proposed. ### Behavior - The preference is disabled by default, preserving the current collapsed behavior. - When enabled, all task groups, including nested groups, expand in Dags without a saved group selection. - Existing per-Dag selections take precedence, including an explicitly saved collapse-all selection. Changing the preference does not overwrite these selections. - The preference is stored in the browser and applies to both Graph and Grid, which share group selection state. closes: #55305 ### Testing - All 1,304 UI tests passed across 150 test files. - TypeScript, ESLint, pre-commit checks, and manual checks passed, including the production UI build. - Verified locally with `example_task_group` that the preference persists after reload, nested groups expand by default, and manual selections are preserved after reload. ### Screenshots **Before — Settings** The Graph settings section has no option to choose whether task groups expand by default. <img width="1280" height="900" alt="Settings before the change" src="https://github.com/user-attachments/assets/3a51eec6-c33d-41fa-95fa-1fe1c55fcefd" /> **After — Settings with the new preference enabled** The new “Expand task groups by default” toggle lets users choose the default expansion behavior for Dags without a saved group selection. <img width="1280" height="900" alt="Settings with the default expansion preference enabled" src="https://github.com/user-attachments/assets/2d167bc9-b7a4-4f93-bb29-6d8e15b93b69" /> **Nested task groups expanded by default** With the preference enabled and no saved selection for this Dag, both top-level and nested task groups expand automatically. <img width="1280" height="900" alt="Nested task groups expanded by default" src="https://github.com/user-attachments/assets/b03519de-781b-4e83-99e1-28972887098f" /> **Manual group selection preserved after reload** After manually collapsing `section_2` and reloading, `section_2` remains collapsed while `section_1` stays expanded. The saved selection takes precedence over the enabled default. <img width="1280" height="900" alt="Manual group selection preserved after reload" src="https://github.com/user-attachments/assets/c8cde6d3-6a5c-4957-87a5-1cbeafb641f0" /> --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Codex (GPT-6) Generated-by: Codex (GPT-6) 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]
