Fix wrongly ordered action screenshots (#1464)

This commit is contained in:
Shuchang Zheng
2025-01-02 05:37:23 -08:00
committed by GitHub
parent 628662604d
commit 22f72c16ec
2 changed files with 3 additions and 2 deletions

View File

@@ -44,7 +44,8 @@ function ActionScreenshot({ stepId, index, taskStatus }: Props) {
(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) {
return (

View File

@@ -72,7 +72,7 @@ function WorkflowRunTimelineItemInfoSection({ activeItem }: Props) {
) {
return (
<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>
{item.status === Status.Completed && (
<TabsTrigger value="extracted_information">