Skip to content

fix(mcp): answer empty results with guidance and keep empty panels out of dashboards - #347

Merged
vishr merged 1 commit into
mainfrom
fix/no-empty-results
Oct 18, 2026
Merged

vishr merged 1 commit into
mainfrom
fix/no-empty-results

Conversation

@vishr

@vishr vishr commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • On the OpenTelemetry Demo, chat showed empty evidence views and agent-built dashboards saved empty panels. The agent asked a service for a signal it does not have, such as span latency for the metrics-only kafka, or searched for checkout error logs that never occurred.
  • Fragment tools whose every result is empty now return a no_data tool error instead of an empty view. The message names the services checked and their span, log and metric counts in the window, or returns unknown_service guidance when the name is not in the data. inspect_trace still returns a trace that has only spans or only logs. Guidance skips the service lookup when a checked filter cannot be represented as an exact scope, so a namespace restriction is never lost.
  • create_dashboard, replace_dashboard and edit_dashboard run the spec before each write attempt and reject non-text panels that do not execute OK, listing each panel's path, title and diagnosis. Panels truncated by the shared row budget count as populated. Saves from the UI are unaffected.
  • Agent and server instructions no longer allow deliberately empty panels. The chat-side path that collapsed empty views is removed.
  • Landing recordings ask for a richer dashboard. A take fails with fewer than six panels, any empty panel, fewer than four chat evidence views, or an empty view.

Verification

  • Regression tests for all-empty fragments, logs-only and spans-only traces, namespace-preserving guidance, and the budget-truncated 40-panel save across create, replace and edit. Each failed before its fix.
  • go test -race on internal/agent, internal/mcp, internal/panel and internal/dashboard; just ui-check, just docs-generate-check, UI lint.
  • Browser: smoke, accessibility and panel SQL editor specs, 60 passed.
  • Codex adversarial review; all three findings fixed.
  • just check in the pre-push hook.

…t of dashboards

Chat showed empty evidence views and agent-built dashboards saved empty
panels when the agent queried a signal a service does not have, such as span
latency for a metrics-only messaging system or error logs that never occurred.

- Fragment tools whose every result is empty return a no_data tool error
  instead of an empty view. The message names the services checked and the
  spans, logs and metrics each has in the window, or unknown_service guidance
  when the name is not in the data. inspect_trace still returns a trace with
  spans or logs. Guidance skips service lookups when a checked filter cannot
  be represented as an exact scope, so a namespace restriction is never lost.
- create_dashboard, replace_dashboard and edit_dashboard run the spec before
  each write attempt and reject non-text panels that do not execute OK, with
  each panel's path, title and diagnosis. Panels truncated by the shared row
  budget count as populated. UI saves are unaffected.
- Agent and server instructions no longer allow deliberately empty panels;
  chat no longer has an empty-view collapse path.
- Landing recordings ask for a richer dashboard and fail a take with fewer
  than six panels, any empty panel, fewer than four chat evidence views, or an
  empty view.

Claude-Session: https://claude.ai/code/session_018HfyEXHyGD1utmKF4CQtyQ
@vishr
vishr merged commit d19e679 into main Oct 18, 2026
16 checks passed
@vishr
vishr deleted the fix/no-empty-results branch October 18, 2026 17:47
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