Skip to content

Conversation

@cmbilly8
Copy link

@cmbilly8 cmbilly8 commented Nov 1, 2025

Description

This PR adds the total element count to the Dag Runs and Task Instances grids, similar to the existing behavior in the Dags tab.

No new data fetching or logic was added; the count uses an already available attribute in the component's state.

Closes #57639


UI Preview

Dag Runs

Before
Dag Runs before
After
Dag Runs after

Task Instances

Before
Task Instances before
After
Task Instances after

Testing

Manually verified across multiple states and views.

DAG Runs:

Case Screenshot
0 runs
1 run
Many runs

Task Instances:

Case Screenshot
0 tasks
1 task
Many tasks

DAG Page (Dag Runs tab):
Dag Page (Dag Runs tab)

DAG Run Page (Task Instances tab):
Dag Run Page (Task Instances tab)

RTL / i18n Validation:

RTL example i18n example


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg
Copy link

boring-cyborg bot commented Nov 1, 2025

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 (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
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: [email protected]
    Slack: https://s.apache.org/airflow-slack

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Nov 1, 2025
Copy link
Member

@guan404ming guan404ming left a comment

Choose a reason for hiding this comment

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

Overall looks good. Small nit, I think we just need to output one not found message in UI is enough.

@KoviAnusha
Copy link
Contributor

@cmbilly8 , Appreciate that you reused the existing state instead of adding extra API calls. One small thought for next time: adding a quick test or storybook screenshot for RTL/i18n coverage whenever we touch display components, just to keep those cases visible early.

@guan404ming
Copy link
Member

guan404ming commented Nov 3, 2025

Appreciate that you reused the existing state instead of adding extra API calls. One small thought for next time: adding a quick test or storybook screenshot for RTL/i18n coverage whenever we touch display components, just to keep those cases visible early.

Thanks for your suggestion. IMO, to provide RTL screenshot is great, but I think i18n coverage is not required here since this PR is not related to translation change.

@cmbilly8 cmbilly8 force-pushed the display_result_count_for_dag_run_and_ti branch from 3572ecc to 2122c12 Compare November 3, 2025 12:24
@cmbilly8
Copy link
Author

cmbilly8 commented Nov 3, 2025

Overall looks good. Small nit, I think we just need to output one not found message in UI is enough.

Just updated to conditionally render the heading only if the result count is > 0 so that we aren't telling the user twice that there are no results:

Dag Runs

Results > 0
Dag Runs with results
No results
Dag Runs no results
Task Instances
Results > 0
Task Instances with results
No results
Task Instances no results

@bbovenzi
Copy link
Contributor

bbovenzi commented Nov 4, 2025

Actually, one thought. We already pass the total_entries to . Perhaps we should make this part of the shared DataTable component so that it displays on everything, not just Dag Runs and Task Instances?

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

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display Result Counts for DAG Runs and Task Instances Filters

4 participants