[v3-2-test] fix(hitl): show mapped task instances on /required_actions listing (#66433)#66482
Merged
Conversation
…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>
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>
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.
The Required Actions listing component hard-coded
mapIndex: parseInt(searchParams.get(MAP_INDEX) ?? "-1", 10), whichalways sent
map_index=-1and silently filtered every page (the global/required_actionsview as well as the per-DAG / per-Run / per-TaskRequired 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.
mapIndextouseTaskInstanceServiceGetHitlDetailsonly whenthe user has explicitly set the
map_indexURL search param. Thedefault behaviour is now "all map indexes" (no filter) instead of
"non-mapped only", and
map_index=-1continues to work as an opt-infilter for non-mapped task instances.
responded_at === undefinedinstead of
=== null. The API serialisesresponded_atas JSONnull, never an omitted field, so the predicate never matched andthe listing never polled for new pending actions.
HITLTaskInstances.test.tsxcovering the threemap_indexURL branches (absent / set to integer / set to
-1) and the refetchpredicate for both
responded_at: nulland 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