UI: Add Details tab to the mapped task instance view#68340
UI: Add Details tab to the mapped task instance view#68340pierrejeambrun wants to merge 1 commit into
Conversation
| return ( | ||
| <ReactFlowProvider> | ||
| <DetailsLayout tabs={tabs}> | ||
| <DetailsLayout outletContext={taskInstance} tabs={tabs}> |
There was a problem hiding this comment.
What does this context actually do? We're only using it here and I don't get what its helping us with?
There was a problem hiding this comment.
This is to re-use the Grid summary. Otherwise the detail tab will have to useGridTiSummariesStream to fetch the TI summary. But since this is a stream, it's a custom implementation, not re-using react query cache and all, so this would open a second stream request to get the TI summaries.
This allow to share the stream from the grid view with the details view, via a context.
Preventing a second call to useGridTiSummariesStream and preventing a second stream request for data we already have.
|
|
||
| // The aggregate summary (per-state counts, dates) is streamed once by the parent page and | ||
| // shared through the router outlet, so this tab does not re-open the TI summaries stream. | ||
| const taskInstance = useOutletContext<LightGridTaskInstanceSummary | undefined>(); |
There was a problem hiding this comment.
Do we want to use this hook anywhere else?
There was a problem hiding this comment.
No, we are only consuming the parent context once, here. (retrieving the TIsummaries provided by the parent page to avoid opening a second stream for that)
Mapped tasks (the /mapped view opened from the Grid) now have a Details tab like normal task instances. It shows the task definition (operator, trigger rule, owner, retries, pool, queue, ...) and a per-state summary of the mapped instances, sourced from the grid TI summaries already loaded by the page.
25a96b5 to
203f4c4
Compare
Mapped tasks (the
/mappedview opened from the Grid) now have a Details tab, like normal task instances already do. It shows the task definition (operator, trigger rule, owner, retries, pool, queue, …) plus a per-state summary of the mapped instances, sourced from the grid TI summaries the page already loads.Screenshots
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines