Skip to content

feat(flow-view): show span info on the trace flow edges#243

Merged
Makisuo merged 3 commits into
mainfrom
feat/flow-view-edge-info
Jul 21, 2026
Merged

feat(flow-view): show span info on the trace flow edges#243
Makisuo merged 3 commits into
mainfrom
feat/flow-view-edge-info

Conversation

@Makisuo

@Makisuo Makisuo commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

What

Trace Flow view edges were bare smoothstep lines. Each edge now carries a FlowEdgeData payload and renders through a new custom edge component (packages/ui/src/components/traces/flow-edge.tsx):

  • Default labels only on significant edges — errors (duration in red), combined ×N groups (×3 · 51.0ms), and edges consuming ≥5% of the trace. Fast internal hops stay as clean lines so dense traces remain readable.
  • Hover reveals the full pill on any edge+120.0ms → 210.0ms (44%): start offset from the parent span (tinted with the target's category accent), total duration, and share of the trace. Combined groups append · ×3, 13.0ms–21.0ms (min–max); missing-span edges show no data.
  • Stroke encoding — width scales with trace share (same sqrt curve as the cards' cost rail), error edges stroke red, missing-span edges render dashed and unanimated.
  • The hardcoded dark-tuned oklch edge stroke is replaced with a theme token (var(--flow-edge, var(--border))).

Why

The flow card redesign (icon chips + cost rail) made the nodes information-dense, but the paths between them carried nothing. Timing, fan-in counts, and error state on the edges make the flow diagram answer "where did the time go" without opening the detail panel.

Notes for review

  • Modeled on the service-map custom edge, but self-contained in packages/ui (the flow view is shared with the local-mode UI and landing).
  • Labels are pointer-events-none and hover is driven by a 16px invisible hit path, so node clicks and pan gestures are unaffected (verified in /flow-lab).
  • Zero/negative start offsets (clock skew) are omitted from the pill rather than shown as +0ms.
  • Flow-lab's synthetic spans previously all shared one timestamp; they now have staggered start times so the offset path is exercised in the sandbox.
  • Verified in /flow-lab (all card/edge variants, hover states, error + missing-span edges, click-through selection) and repo typecheck passes. No existing tests cover flow-utils.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Trace flow diagram edges were bare smoothstep lines. Each edge now
carries a FlowEdgeData payload (duration/min/max, trace share, start
offset from parent, x-count, error/missing flags, category accent) and
renders through a custom edge component:

- default labels only on significant edges (errors, >=5% of trace,
  combined xN groups) to keep dense traces readable
- hover reveals the full pill: +offset -> duration (share), with
  min-max range for combined groups and "no data" for missing spans
- stroke width scales with trace share (same sqrt curve as the card
  cost rail); error edges red, missing-span edges dashed/unanimated
- stroke color moved from a hardcoded dark oklch to a theme token

Flow-lab spans get staggered start times so the offset path is
exercised in the sandbox.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pullfrog

pullfrog Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Your Pullfrog Router balance is exhausted.

You have a card on file but auto-reload is disabled, so runs paused once your balance went past the overdraft buffer.

Top up balance → · Enable auto-reload →

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | Rerun failed job ➔View workflow run | via Pullfrog | Using Claude Opus𝕏

Makisuo and others added 2 commits July 21, 2026 15:29
PR #242 pinned creator roles onto MCP keys and added tests asserting a
member key cannot create standard keys or revoke other users' keys, but
the authorization layers still stamped every resolved API key with the
default (root) roles, so those restrictions never applied and the tests
fail on main (200 instead of 403).

Plumb resolved.roles through the v1 and v2 authorization layers and the
MCP tenant resolver, falling back to the defaults for keys without
pinned roles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Makisuo
Makisuo merged commit c97bb7f into main Jul 21, 2026
8 checks passed
@Makisuo
Makisuo deleted the feat/flow-view-edge-info branch July 21, 2026 14:55
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