Skip to content

Conversation

@Lee-W
Copy link
Member

@Lee-W Lee-W commented Oct 17, 2025

Why

The backend side of HITLHistory was added in #55952, but the UI part wasn't.

Closes: #54956

What

  • Remove HITLDetailHisotry from get task instance try endpoint
  • Add get hitl detail try endpoint
  • Render hitl detail history to the required actions page

Screenshot

try 1

image

try 2

image

^ 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.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Oct 17, 2025
@Lee-W
Copy link
Member Author

Lee-W commented Oct 17, 2025

after some tesitng, I feel we might need to revert part of the #55952 implementation 🤔 (related to ti history)

@Lee-W Lee-W force-pushed the hitl-history-ui branch 2 times, most recently from bb30a01 to 5a2dc8e Compare October 23, 2025 10:17
@Lee-W Lee-W changed the title feat(hitl): hitl history ui Add UI to HITL History Oct 23, 2025
@Lee-W Lee-W changed the title Add UI to HITL History Add UI to HITLDetailHistory Oct 23, 2025
@Lee-W Lee-W changed the title Add UI to HITLDetailHistory Add HITLDetailHistory UI Oct 23, 2025
@Lee-W Lee-W marked this pull request as ready for review October 23, 2025 10:21
@Lee-W Lee-W requested a review from guan404ming October 23, 2025 10:21
@Lee-W Lee-W moved this to In review in AIP-90 - Human in the loop Oct 27, 2025
Copy link
Member

@guan404ming guan404ming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, UI wise looks good.

I found a minor cache issue in my local test.

Screen.Recording.2025-10-29.at.12.39.54.AM.mov

We need to invalidate the cache when submitting a reply by adding:

[useTaskInstanceServiceGetHitlDetailTryKey, { dagId, dagRunId, mapIndex, taskId }],

to the mutation's onSuccess callback at

UseDagRunServiceGetDagRunKeyFn({ dagId, dagRunId }),
[useDagRunServiceGetDagRunsKey],
[useTaskInstanceServiceGetTaskInstancesKey, { dagId, dagRunId }],
[useTaskInstanceServiceGetTaskInstanceKey, { dagId, dagRunId, mapIndex, taskId }],
[useTaskInstanceServiceGetHitlDetailsKey, { dagIdPattern: dagId, dagRunId }],
[useTaskInstanceServiceGetHitlDetailKey, { dagId, dagRunId }],

Feel free to let me know if anything's unclear or if you'd like me to explain further!

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rebase this PR because the backend part was merged and typo was fixed, this will make the changelog limited to the front-end part and make it easier to review I believe.

@Lee-W Lee-W marked this pull request as draft November 4, 2025 14:26
@Lee-W Lee-W force-pushed the hitl-history-ui branch 3 times, most recently from 60618ce to 83806cd Compare December 3, 2025 10:22
Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a few issues that we need to fix.

We also need to add the query key for useTaskInstanceServiceGetHitlDetailTryDetail in useUpdateHITLDetail.ts

Also, I noticed in example_hitl_operator dag that the hitlDetails.body details never changes after the first try even though what I submitted in the prior hitl actions is different.

@Lee-W Lee-W marked this pull request as draft December 5, 2025 03:51
@Lee-W
Copy link
Member Author

Lee-W commented Dec 5, 2025

Mark it as a draft. I'll get back to it if bandwidth allow

@Lee-W Lee-W force-pushed the hitl-history-ui branch 5 times, most recently from 45f398c to 248367b Compare January 6, 2026 10:21
@Lee-W Lee-W marked this pull request as ready for review January 6, 2026 10:22
@Lee-W Lee-W requested a review from vatsrahul1001 as a code owner January 6, 2026 10:22
@bbovenzi bbovenzi self-assigned this Jan 9, 2026
@Lee-W Lee-W requested a review from choo121600 as a code owner January 14, 2026 08:21
Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good start. I want to make some other UX changes to improve HITL but thats separate from this functionality

@bbovenzi bbovenzi merged commit a9dbe4e into apache:main Jan 14, 2026
246 of 247 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in AIP-90 - Human in the loop Jan 14, 2026
@bbovenzi bbovenzi deleted the hitl-history-ui branch January 14, 2026 17:09
@Lee-W
Copy link
Member Author

Lee-W commented Jan 15, 2026

Got it. Thanks @bbovenzi !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Missing review history when tasks are cleared (HITL)

4 participants