Skip to content

Conversation

@Vishesh-Paliwal
Copy link

@Vishesh-Paliwal Vishesh-Paliwal commented Feb 8, 2026

This PR aims to solve issue #3573
Problem: Embedding traces incorrectly shown with chat UI in trace drawer
fix : added a check to ensure only span_type != embeddings are shown with chat UI

546771998-198a0819-5c46-4900-901e-3c8f2e8235f7
Open with Devin

@CLAassistant
Copy link

CLAassistant commented Feb 8, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Vishesh-Paliwal
❌ Vishesh Paliwal


Vishesh Paliwal seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@vercel
Copy link

vercel bot commented Feb 8, 2026

Someone is attempting to deploy a commit to the agenta projects Team on Vercel.

A member of the Team first needs to authorize it.

@Vishesh-Paliwal Vishesh-Paliwal marked this pull request as ready for review February 9, 2026 08:43
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working UI labels Feb 9, 2026
Copy link
Member

@mmabrouk mmabrouk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Vishesh-Paliwal

I am not sure the check that was done happened in the right place.

Can you please determine/describe the current flow (how and where we discover something is a chat span). If I remember correctly the conditions we had, looked for the span_type. Is that not the case?

Basically can you please update the PR with some research on the source of the issue and the reasoning behind where to put the solution

@Vishesh-Paliwal
Copy link
Author

int the file : TraceDrawer/components/TraceContent/components/OverviewTabItem/index.tsx
I could see that OverviewTabItem component , solely relied on structure of content to detrmine if it should be rendered as chat .
inputs?.prompt &&
Array.isArray(inputs?.prompt) &&
inputs?.prompt.length > 0 &&
inputs?.prompt.every((item: any) => "role" in item)
something like this , Although span_type == chat might have helped determine chat directly instead of structure , I thought it could have been a decision based on if there is a possibilty wrong span_type being assigned , so there structure will help identify chat this way .

Coming to the problem at hand . because embeddings result also had structure similliar to chat detection logic , it was being rendered as chat . Hence I decided to just add one more check activeTrace?.span_type !== "embedding" so that embedding is treated differently .

let me know if this looks good ,
and if span type alone is sufficient to call a trace chat , then we can even remove the structural check part if needed .

Also One thing that comes to my mind seeing this kind of pattern is strategy pattern , we can also make common rendering logic available across web repo based on span types , if this is something you feel will be reused at many places now or later .

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Copy link
Member

@mmabrouk mmabrouk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Vishesh-Paliwal that makes total sense!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files. UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants