bbovenzi commented on code in PR #75979:
URL: https://github.com/apache/airflow/pull/75979#discussion_r4493657320
##########
airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx:
##########
@@ -168,15 +168,22 @@ export const DetailsLayout = ({ children, error,
isLoading, outletContext, tabs
const noDateFilters = runAfterGte === undefined && runAfterLte === undefined;
- // Initial grid page (no date ceiling) — loaded first so we can check whether
- // the selected run is already visible before fetching it individually.
- const { data: initialGridRuns } = useGridRuns({
- dagRunState: dagRunStateFilter,
- limit,
- runIdPattern: runIdPatternFilter,
- runType: runTypeFilter,
- triggeringUser: triggeringUserFilter,
- });
+ // Match the Grid's first-page query so React Query shares the request. This
observer does not
+ // keep polling after the Grid moves to another page; it only positions a
selected older run.
+ const { data: initialGridRuns } = useGridRuns(
+ {
+ dagRunState: dagRunStateFilter,
+ limit: limit + 1,
Review Comment:
We'll need an `const initialGridRuns = dataGridRuns?.slice(0, limit);` here
too to make sure our pagination check still works when a user is on the last
run of the page.
--
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]