Skip to content

feat(web): unified span-inspection popover across agent session views - #656

Merged
JeremyFunk merged 4 commits into
mainfrom
feat/agent-session-span-popover
Aug 27, 2026
Merged

feat(web): unified span-inspection popover across agent session views#656
JeremyFunk merged 4 commits into
mainfrom
feat/agent-session-span-popover

Conversation

@JeremyFunk

@JeremyFunk JeremyFunk commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Span inspection on the agent session detail page was fragmented: Overview clicks switched you to the Traces tab, Flow opened a docked drawer, and the waterfall expanded an inline row. This replaces all three with one SpanPopover chrome around the shared SpanExpansion body, opened in place from whatever the reader clicked:

  • Overview: findings, the verdict, and turn-health cells open the popover anchored to the clicked element — no tab switch. "Open in Traces view" lives inside the panel and carries the span and the chosen detail tab across.
  • Flow: node click anchors the popover to the node (canvas fallback for spans without a node). The docked drawer is gone.
  • Traces (waterfall): span row click anchors the popover to the row. The synthetic detail row kind and its virtualizer measurement plumbing are removed, simplifying the waterfall.
  • ?span= stays the source of truth. In the virtualized waterfall, the anchor unmounting (scrolled far away) closes the panel rather than leaving it detached; scrolling back re-anchors it. Only the active view holds the popover open — an outgoing tab panel stays mounted through its exit transition, so inactive views are denied the selection to prevent a double popover.
  • The detail-tab choice is held in SessionViews, so it survives switching spans and views.
  • Net −140 lines in span-expansion.tsx from deleting the two old chromes.

Behavior notes: an outside press closes the panel and clears the selection (so switching tabs by clicking a tab drops it — cross-view carry is the panel's own door); view hotkeys 1–4 are suppressed while the panel is open via the existing dialog guard.

Verified: scoped apps/web typecheck green; agent-session suites pass (311 tests, including the rewritten session-detail popover tests); full apps/web vitest run shows only 4 pre-existing hook-test failures that reproduce identically on main.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@JeremyFunk

Copy link
Copy Markdown
Collaborator Author

Browser-verified the popover at /lab/agent-session and fixed two chrome bugs jsdom couldn't see (8a65fb5): the height cap sat on the popup while the ui Popover's viewport sizes itself from --available-height, so tall content spilled past the popup border — the cap and overflow-y-auto now live on the span-popover wrapper itself; and the title row's -mt-4 inside a flex column shrank its margin box and painted it 16px over the tab strip — the sticky row now pins to the scroller's padding-box top with only horizontal bleed. All three views re-verified visually (Overview finding click, waterfall row click, Flow node click).

@JeremyFunk

Copy link
Copy Markdown
Collaborator Author

Redesigned per feedback (e22becc): the panel is now a full overlay — the repo's Dialog primitive at 86vw × 86vh (near-full on mobile) over the standard bg-black/32 + backdrop-blur-sm scrim — instead of an element-anchored popover. All anchor plumbing is deleted (net −6 lines), the internal layout is a fixed header + tab strip over one scrolling body, and a ?span= deep link now opens the panel from every view including Overview. Escape / scrim / ✕ still clear the selection; the Traces door still carries span + tab. Typecheck green, 312 tests, browser-verified in all three views + mobile.

@JeremyFunk
JeremyFunk merged commit 43c6217 into main Aug 27, 2026
33 checks passed
@JeremyFunk
JeremyFunk deleted the feat/agent-session-span-popover branch August 27, 2026 18:58
@github-actions

Copy link
Copy Markdown

🍁 Maple PR preview

Warning

Preview cleanup could not be confirmed. The Alchemy teardown outcome was skipped.

Final commit e22becc · View workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant