[3757] feat(observability): improve inputs and outputs rendering#3758
[3757] feat(observability): improve inputs and outputs rendering#3758
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const outputs = getTraceOutputs(record) | ||
| const {data: sanitizedOutputs} = sanitizeDataWithBlobUrls(outputs) | ||
| return ( | ||
| <TruncatedTooltipTag | ||
| children={outputs ? getStringOrJson(outputs) : ""} | ||
| placement="bottom" | ||
| <SmartCellContent | ||
| value={sanitizedOutputs} | ||
| maxLines={4} |
There was a problem hiding this comment.
🚩 Observability output column missing keyPrefix may cause poor React reconciliation
The SmartCellContent in the observability outputs column (getObservabilityColumns.tsx:104-109) does not provide a keyPrefix prop, so all output cells use the default "cell". This means every output cell's chat messages get React keys like cell-0, cell-1, etc.
While React keys only need to be unique among siblings (and each cell is in a different table row subtree), this could cause suboptimal reconciliation if React ever needs to diff these cells during table updates — identical keys across rows may prevent React from detecting that cell content has changed.
Contrast with the inputs column (getObservabilityColumns.tsx:89-90) which passes keyPrefix={\trace-input-${record.span_id}`}for unique keys. The sessions table cells similarly use unique prefixes. Consider addingkeyPrefix={`trace-output-${record.span_id}`}` for consistency.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fixed in 2ef6746. I added stable output key prefixes for both traces and sessions output cells: trace-output-{span_id} and session-{sessionId}-output.
This PR improves how observability tables render inputs and outputs. It replaces flat string previews with typed cell renderers. It keeps row height stable for long conversations. It still shows full content on hover.
Changes
CleanShot.2026-02-13.at.19.50.05.mp4
Closes #3757