fix(chat): make task session rendering authoritative

Use the Task part's state.metadata.sessionId as the only live identity contract for child sessions. Remove timestamp, status, and ordering heuristics that could misassociate concurrent subagents or repeatedly scan directory sessions while parts stream.

Extract Task metadata parsing and child-summary projection into a focused model with cached projections for unchanged message records. Preserve output and part-level metadata parsing only for legacy persisted records, and keep standalone Task rows visible when sorted activity groups are rendered.

Validated with focused Task and turn projection tests, UI type-check, lint, and dead-code analysis.
This commit is contained in:
Bohdan Triapitsyn
2026-07-14 01:36:17 +03:00
parent a1badccddd
commit cd1816f63b
7 changed files with 195 additions and 627 deletions
@@ -1839,7 +1839,7 @@ const AssistantMessageBody = React.memo(({
}
const activity = activityByPart.get(part);
if (activity?.kind === 'tool' && (shouldRenderActivityGroup || !isStandaloneTool(toolName))) {
if (activity?.kind === 'tool' && !isStandaloneTool(toolName)) {
i += 1;
continue;
}