fix(hitl): show mapped task instances on /required_actions listing#66433
Open
paultmathew wants to merge 1 commit intoapache:mainfrom
Open
fix(hitl): show mapped task instances on /required_actions listing#66433paultmathew wants to merge 1 commit intoapache:mainfrom
paultmathew wants to merge 1 commit intoapache:mainfrom
Conversation
Fixes apache#66428. The Required Actions listing component hard-coded ``mapIndex: parseInt(searchParams.get(MAP_INDEX) ?? "-1", 10)``, which always sent ``map_index=-1`` and silently filtered every page (the global ``/required_actions`` view as well as the per-DAG / per-Run / per-Task Required Actions tabs) down to non-mapped task instances. Mapped HITL rows were therefore counted by the home-page badge but invisible in the listing pages. * Pass ``mapIndex`` to ``useTaskInstanceServiceGetHitlDetails`` only when the user has explicitly set the ``map_index`` URL search param. The default behaviour is now "all map indexes" (no filter) instead of "non-mapped only", and ``map_index=-1`` continues to work as an opt-in filter for non-mapped task instances. * Fix the auto-refresh predicate that compared ``responded_at === undefined`` instead of ``=== null``. The API serialises ``responded_at`` as JSON ``null``, never an omitted field, so the predicate never matched and the listing never polled for new pending actions. * Add ``HITLTaskInstances.test.tsx`` covering the three ``map_index`` URL branches (absent / set to integer / set to ``-1``) and the refetch predicate for both ``responded_at: null`` and a populated value. Signed-off-by: Paul Mathew <ptmathew96@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
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
|
bbovenzi
approved these changes
May 5, 2026
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.
Fixes #66428.
Why
/required_actionsand the per-DAG / per-Run / per-Task Required Actionstabs all silently dropped HITL rows for mapped task instances because the
listing component hard-coded
mapIndex: parseInt(searchParams.get(MAP_INDEX) ?? "-1", 10),which always sent
map_index=-1and filtered to non-mapped TIs only.Issue #66428 has the full repro and access-log evidence.
What
mapIndexto the listing call only when the user has explicitlyset the
map_indexURL search param. Default behaviour is now"all map indexes" (no filter) instead of "non-mapped only", and
map_index=-1continues to work as an opt-in filter for non-mappedtask instances.
responded_at === undefinedinstead of=== null. The API serializesresponded_atas JSONnull, never an omitted field, so the predicatenever matched and the page never polled for new pending actions while
open. The issue's "Anything else" section flagged this; the OP offered
to roll it into the same PR and there has been no maintainer pushback,
so it is included here.
Tests
HITLTaskInstances.test.tsxcovering the three URL-parambranches (
map_indexabsent / set to2/ set to-1) and therefetch predicate for both
responded_at: nulland a populated value.pnpm exec vitest run src/pages/HITLTaskInstances/HITLTaskInstances.test.tsx(5/5 passing),
pnpm exec eslint src/pages/HITLTaskInstances/,pnpm exec tsc -p tsconfig.app.json --noEmit, andprek run --fileson the changed files.
^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.Made with Cursor