fix(web): show a reused child agent's current run in Lineage #12977
Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 250+ commits into
main fromfix/v2-reused-child-lineage-statusopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- @@ -47,0 +108,21 @@108+ startedAt: subagent.startedAt,109+ completedAt: subagent.completedAt,110+ };111+ if (subagent.origin !== "app_owned" || childThread === null) return record;112+ const activityRunStatus = childThread.activityRunStatus ?? null;113+ if (activityRunStatus !== null) {114+ // Preparing and starting count as running so the timer ticks from the115+ // activity run's anchor, the same anchor the sidebar working timer uses.116+ return {117+ status: activityRunStatus === "waiting" ? "waiting" : "running",118+ startedAt: childThread.activityRunStartedAt ?? subagent.startedAt,119+ completedAt: null,120+ };121+ }122+ const status = subagentStatusFromShellStatus(childThread.status);123+ if (status === null) return record;124+ // A queued follow-up has not started, so there is nothing to time yet.125+ if (status === "pending") return { status, startedAt: null, completedAt: null };126+ return {127+ status,128+ startedAt: childThread.latestRunStartedAt ?? subagent.startedAt,
juliusmarminge added labelsmacroscope-review
Yash-Singh1(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed