apache/airflow

[Filters] Improve DAG View – Code tab with search and section filters

Open

#53045 opened on Jul 8, 2025

View on GitHub
 (10 comments) (0 reactions) (0 assignees)Python (44,809 stars) (16,781 forks)batch import
area:UIgood first issuekind:featurekind:meta

Description

View

DAG View - Code tab

Proposed Improvements

  • Text Search (within DAG code)
    ↪ Enables quick lookup of task IDs, parameter names, function names, or config snippets

  • Toggle for File Diff (across DAG Versions)
    ↪ Helps users understand changes introduced between versions (especially when troubleshooting regressions)

  • Section Filter (e.g., show only task definitions, schedule config, etc.)
    ↪ Useful when scanning long DAG files to focus on relevant areas (e.g., @task decorators, @asset functions)

API Support

❌ No

  • DAG source code is retrieved in full via the /dagSource endpoint.
  • No server-side support for search, diff, or section indexing currently exists.

UI Impact

  • Text search input could be added above the code viewer, with inline highlighting.
  • A toggle for DAG version comparison could enable unified or split diff views.
  • Section filters could be implemented via regex (e.g., jump to task definitions) or indexing during parsing.

Notes

  • Particularly helpful for large DAGs with many custom functions or inline logic
  • Would bring the UI experience closer to modern IDEs, improving developer ergonomics

Contributor guide