Fix wrongly ordered action screenshots (#1464)
This commit is contained in:
@@ -44,7 +44,8 @@ function ActionScreenshot({ stepId, index, taskStatus }: Props) {
|
|||||||
(artifact) => artifact.artifact_type === ArtifactType.ActionScreenshot,
|
(artifact) => artifact.artifact_type === ArtifactType.ActionScreenshot,
|
||||||
);
|
);
|
||||||
|
|
||||||
const screenshot = actionScreenshots?.[index];
|
// action screenshots are reverse ordered w.r.t action order
|
||||||
|
const screenshot = actionScreenshots?.[actionScreenshots.length - index - 1];
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ function WorkflowRunTimelineItemInfoSection({ activeItem }: Props) {
|
|||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<div className="rounded bg-slate-elevation1 p-4">
|
<div className="rounded bg-slate-elevation1 p-4">
|
||||||
<Tabs key={item.block_type} defaultValue={defaultTab}>
|
<Tabs key={item.task_id ?? item.block_type} defaultValue={defaultTab}>
|
||||||
<TabsList>
|
<TabsList>
|
||||||
{item.status === Status.Completed && (
|
{item.status === Status.Completed && (
|
||||||
<TabsTrigger value="extracted_information">
|
<TabsTrigger value="extracted_information">
|
||||||
|
|||||||
Reference in New Issue
Block a user