Skip to content

fix(ai-insights): sort conversation spans by start timestamp#111185

Merged
obostjancic merged 4 commits intomasterfrom
ognjenbostjancic/tet-2107-fix-span-sorting-in-conversations
Mar 23, 2026
Merged

fix(ai-insights): sort conversation spans by start timestamp#111185
obostjancic merged 4 commits intomasterfrom
ognjenbostjancic/tet-2107-fix-span-sorting-in-conversations

Conversation

@obostjancic
Copy link
Member

@obostjancic obostjancic commented Mar 20, 2026

Sort spans by start_timestamp instead of end_timestamp in the conversation hook so the AI Spans list displays spans in the order they began. The Messages panel is unaffected because extractMessagesFromNodes applies its own internal sort by end_timestamp.

…span.name

Sort spans by start_timestamp instead of end_timestamp so the AI Spans
list shows spans in the order they began. The Messages panel is
unaffected because it applies its own sort internally.

Also switch from span.description to span.name as the primary span
identifier, matching the API response format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear-code
Copy link

linear-code bot commented Mar 20, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 20, 2026
@obostjancic obostjancic changed the title fix(ai-insights): Sort conversation spans by start timestamp fix(ai-insights): sort conversation spans by start timestamp Mar 20, 2026
Assert that useConversation sorts nodes by start timestamp (for AI
spans list) and that partitionSpansByType sorts by end timestamp
(for conversation messages).
@obostjancic obostjancic marked this pull request as ready for review March 20, 2026 12:07
@obostjancic obostjancic requested a review from a team as a code owner March 20, 2026 12:07
@obostjancic obostjancic merged commit 455bbca into master Mar 23, 2026
69 checks passed
@obostjancic obostjancic deleted the ognjenbostjancic/tet-2107-fix-span-sorting-in-conversations branch March 23, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants