Add trace viewer span markers for hooks and attributes #2452
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 93294dc The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
karthikscale3
left a comment
There was a problem hiding this comment.
Approving because this is directionally good and the focused marker/segment tests pass, but please address the two inline UI regressions before merging: tiny-span attr_set markers can disappear, and marker tooltips/labels no longer identify the event kind.
| const baseMarkers = useMemo(() => computeSpanMarkers(span), [span]); | ||
| const markers = useMemo( | ||
| () => | ||
| geometry.mode.kind === 'full' |
There was a problem hiding this comment.
Small UI regression risk: because markers are only projected/rendered when geometry.mode.kind is full, any attr_set marker on a short/tiny span disappears. The old AttrSetMarkers path projected by viewport time and still showed those diamonds even when the bar collapsed to tiny/arrow. Can we keep a visible marker/indicator for tiny spans too?
| className="pointer-events-auto absolute top-0 bottom-0 z-10 flex w-8 -translate-x-1/2 items-center justify-center" | ||
| style={{ left: `clamp(8px, ${m.leftPct}%, calc(100% - 8px))` }} | ||
| > | ||
| <TimestampTooltip date={m.timeMs}> |
There was a problem hiding this comment.
Could we preserve the marker kind and include it in the tooltip/aria label? Right now SpanMarker only carries timeMs, so hook_received and attr_set both render as the same timestamp-only tick. That regresses the previous Attributes set affordance and makes hook resumptions vs attribute writes indistinguishable.
Test by visiting a Workflow with a hook, and a workflow with attributes being set.
CleanShot.2026-06-16.at.12.06.25.mp4