Skip to content

[v3-2-test] fix(hitl): show mapped task instances on /required_actions listing (#66433)#66482

Merged
potiuk merged 1 commit into
v3-2-testfrom
backport-e3e3f6f-v3-2-test
May 10, 2026
Merged

[v3-2-test] fix(hitl): show mapped task instances on /required_actions listing (#66433)#66482
potiuk merged 1 commit into
v3-2-testfrom
backport-e3e3f6f-v3-2-test

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 6, 2026

Fixes #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.
    (cherry picked from commit e3e3f6f)

Co-authored-by: Paul Mathew ptmathew96@gmail.com
Signed-off-by: Paul Mathew ptmathew96@gmail.com
Co-authored-by: Cursor cursoragent@cursor.com

…s listing (#66433)

Fixes #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.
(cherry picked from commit e3e3f6f)

Co-authored-by: Paul Mathew <ptmathew96@gmail.com>
Signed-off-by: Paul Mathew <ptmathew96@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label May 6, 2026
@potiuk potiuk marked this pull request as ready for review May 10, 2026 00:25
@potiuk potiuk merged commit 5a307ec into v3-2-test May 10, 2026
75 checks passed
@potiuk potiuk deleted the backport-e3e3f6f-v3-2-test branch May 10, 2026 01:38
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.2.2 milestone May 18, 2026
@vatsrahul1001 vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label May 19, 2026
vatsrahul1001 pushed a commit that referenced this pull request May 20, 2026
…s listing (#66433) (#66482)

Fixes #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.
(cherry picked from commit e3e3f6f)

Signed-off-by: Paul Mathew <ptmathew96@gmail.com>
Co-authored-by: Paul Mathew <ptmathew96@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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. type:bug-fix Changelog: Bug Fixes

3 participants