Skip to content

feat(dashboard): show custom track-event properties on tool invocations - #67

Merged
marselsel merged 2 commits into
mainfrom
feat/show-custom-event-properties
Aug 5, 2026
Merged

feat(dashboard): show custom track-event properties on tool invocations#67
marselsel merged 2 commits into
mainfrom
feat/show-custom-event-properties

Conversation

@marselsel

Copy link
Copy Markdown
Collaborator

Why

Integrators that disable input/output capture — for privacy policies or app-store requirements — report curated fields through yavio.track() instead. Those events land in ClickHouse (events.metadata) but the dashboard never rendered them anywhere. The result: a privacy-conscious integration's invocations all show "No input/output data captured for this invocation", and the data it deliberately does send (e.g. Shipal's carrier, status, user_intent, latency_ms) is invisible.

What

A custom track() event fired inside a tool handler shares the invocation's trace_id (the SDK's AsyncLocalStorage trace context). The expanded invocation row in the tool-detail view now:

  • fetches sibling track events for the listed traces (one extra paged query, trace_id IN (...), same time window — a track event shares its call's timestamp to within the handler's runtime)
  • renders each one as a named badge + key-value grid (Custom Events)
  • renders the tool_call event's own metadata when non-empty (Properties)
  • keeps the honest empty state when nothing at all was captured, and keeps the input/output note when only custom events exist

Values are integrator-supplied content and are rendered as plain text only.

Tests

  • queryToolRecentInvocations: joins custom events by trace id (dedup, empty-trace skip, mapping to the right invocations) — 3 new/updated cases
  • Full dashboard suite: 512 passed; typecheck and biome clean

Rider

Second commit adds .claude/settings.local.json to .gitignore (personal Claude Code settings; must never land in a public repo).

Verified against production data: Shipal Prod events confirm the two-events-per-trace shape this renders.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Coverage Report for dashboard

Status Category Percentage Covered / Total
🔵 Lines 85% 2818 / 3315
🔵 Statements 85% 2818 / 3315
🔵 Functions 89.11% 172 / 193
🔵 Branches 89.63% 683 / 762
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/dashboard/lib/queries/tool-detail.ts 100% 90.38% 100% 100%
packages/dashboard/lib/queries/types.ts 100% 100% 100% 100%
Generated in workflow #191 for commit d58be03 by the Vitest Coverage Report Action

@marselsel
marselsel merged commit c05584d into main Aug 5, 2026
12 checks passed
@marselsel
marselsel deleted the feat/show-custom-event-properties branch August 5, 2026 17:24
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