Skip to content

UI: Group and filter Dags by folder on the Dags page#68544

Open
RabahAmrouche05 wants to merge 3 commits into
apache:mainfrom
RabahAmrouche05:dags-folder-grouping
Open

UI: Group and filter Dags by folder on the Dags page#68544
RabahAmrouche05 wants to merge 3 commits into
apache:mainfrom
RabahAmrouche05:dags-folder-grouping

Conversation

@RabahAmrouche05

Copy link
Copy Markdown

What

Adds a folder navigation tree to the Dags page. The tree is built from each
Dag's relative_fileloc directory, and selecting a folder filters the Dag list
to the Dags that live in it (and its subfolders).

Why

The Dags page only offered a flat list. In deployments with many Dags spread
across subfolders of the dags folder (e.g. team_a/etl/…, team_b/ml/…) there
was no way to browse or filter by folder.

How

  • Backend — a server-side relative_fileloc_prefix filter on GET /ui/dags
    (strict folder match, so team_a never catches team_alpha) and a new
    GET /ui/dags/folders endpoint returning the distinct folders of all readable
    Dags. Filtering is done server-side so the result stays correct across
    pagination, sorting and the other filters.
  • Frontend — a collapsible folder tree on the Dags page that drives the
    filter via a dag_folder search param, with the tree hierarchy reconstructed
    client-side from the folder paths.

Dags located at the bundle root contribute no folder and appear under "All Dags".

Tests: backend (folders endpoint + filter, incl. the team_a / team_alpha
edge case) and frontend (buildFolderTree unit tests + DagFolderTree
component tests).


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

Add a collapsible folder navigation tree to the Dags page, built from each
Dag's relative_fileloc directory. Selecting a folder filters the list to the
Dags it contains (and its subfolders) via a new server-side filter, so the
result stays correct across pagination, sorting and other filters.

Backend adds a relative_fileloc_prefix filter on GET /ui/dags and a new
GET /ui/dags/folders endpoint returning the distinct folders of all readable
Dags. Dags at the bundle root contribute no folder and appear under 'All Dags'.
@boring-cyborg boring-cyborg Bot added area:API Airflow's REST/HTTP API area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default labels Jun 14, 2026
@boring-cyborg

boring-cyborg Bot commented Jun 14, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Newsfragment is only added for important changes. I think this is not needed here.

@jscheffl

Copy link
Copy Markdown
Contributor

Can you please add a screenshow or small video recording of how it looks like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants