Repository navigation
Dag run breadcrumb switcher - #74471
Merged
Merged
Conversation
Switching to a different run meant leaving the page you were looking at, or digging the run picker out of the graph view's options popover. The run is already named in the breadcrumb next to the Dag it belongs to, so that is where picking a different one belongs — the same place, and the same two-part control, the Dag level already uses.
Both panels asked react-select to load their options from a mount effect, and both unmount when the panel closes, so every open was a round trip that started as a spinner over an empty list — including when the same Dags or runs had just been on screen a moment earlier. What a panel lists is not the panel's own business: it belongs to the level that opens it, which stays on the page. From there it is loaded before anyone opens anything, and the run list keeps up with the page's auto-refresh. Giving the run level a permanent place in the bar follows from the same idea: the breadcrumb is where runs are switched, so every page of a Dag can reach the latest run, not only the pages that already have one in the URL.
Neither panel has anything to wait for any more: what they list is loaded by the breadcrumb level that opens them, and a typed search replaces the results once it answers rather than blanking them first. A spinner over a list that is already there only reads as the panel losing its place. The run level also had to declare the `dag` namespace to name itself. It had not needed to while it only appeared on task pages without a run; now that it is on every page of a Dag, it was showing its translation key.
Neither search is reusable — each has exactly one caller, the switcher button it belongs to — so sitting in `components/` only put distance between the two halves of one control. The query that feeds a panel was a hook of its own for the same reason, read once, in a component short enough to hold it. Only the combo-box chrome is genuinely shared, and a folder holding one file behind a re-export is not a module.
bbovenzi
requested review from
choo121600,
guan404ming,
pierrejeambrun,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
October 8, 2026 18:35
kaxil
approved these changes
Oct 8, 2026
Folding the option builders and query constants into the panel components left each one exporting things that are not components, which costs the file its fast refresh. They are shared between a panel and the level that opens it, so they belong beside both rather than inside either.
kaxil
reviewed
Oct 8, 2026
Switching runs from a mapped task built its own path and sent `/tasks/<id>`, which has no row once the task is expanded, so the page it landed on reported no task instance found. It also dropped whichever tab was open. The shared builder the grid and keyboard navigation already use handles both, and knows to stop at the list of instances. Suppressing react-select's loading message as well as its spinner went too far: on the first search after the input is cleared react-select empties the list itself, and with nothing to say in that window it rendered no menu at all. `checkPendingRuns` does not scale the refresh interval back, it switches it off, so the list stopped noticing runs once the current ones finished — and while any run was active, every page of a Dag polled for a panel nobody had opened. The panel is the only thing that reads this list, so it is also the only thing that needs it kept current. Rebuilding every option on each poll cost react-select the focused row, since it tracks focus by reference: arrowing down and pressing Enter could open a different run than the one highlighted.
Contributor
Author
|
CI failure was already in main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend our breadcrumb dropdown search to apply to both Dags and Dag Runs. This makes it easier to switch between runs especially on the Graph view and when no runs are yet selected. Also fixed an issue with the dropdown that always fetched the data on every dropdown open and forced a spinner to show up before results.
Was generative AI tooling used to co-author this PR?
Claude Opus 5
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.