Skip to content

Conversation

@ArthurKnaus
Copy link
Member

Render messages as markdown.
Allow switching to raw values for text and json messages.
Adjust the collapsing mechanism to also work with rich content.

Screen.Recording.2025-12-12.at.12.56.43.mov
Screen.Recording.2025-12-12.at.12.47.16.mov

@ArthurKnaus ArthurKnaus requested a review from a team December 12, 2025 12:03
@ArthurKnaus ArthurKnaus requested a review from a team as a code owner December 12, 2025 12:03
@linear
Copy link

linear bot commented Dec 12, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 12, 2025
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Missing key props cause inconsistent state reset behavior

The PR adds key={getNodeId(node)} to MultilineText and MessagesArrayRenderer components to reset internal state when switching nodes (lines 239, 245), but the MultilineJSON for toolArgs and MultilineText for embeddingsInput don't have this key prop. Since these components now have internal showRaw and clipped state that should reset when nodes change, the missing keys cause inconsistent behavior where some views reset when switching nodes but these don't, potentially showing stale raw/formatted toggle states from a previously viewed node.

static/app/views/performance/newTraceDetails/traceDrawer/details/span/eapSections/aiInput.tsx#L249-L256

) : null}
{toolArgs ? (
<TraceDrawerComponents.MultilineJSON value={toolArgs} maxDefaultDepth={1} />
) : null}
{embeddingsInput ? (
<TraceDrawerComponents.MultilineText>
{embeddingsInput.toString()}
</TraceDrawerComponents.MultilineText>

Fix in Cursor Fix in Web


@ArthurKnaus ArthurKnaus merged commit 3506d5b into master Dec 15, 2025
49 checks passed
@ArthurKnaus ArthurKnaus deleted the arthurknaus/tet-687-render-markdown-nicely-in-span-details branch December 15, 2025 11:51
@github-actions github-actions bot locked and limited conversation to collaborators Dec 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants