Skip to content

feat: add groupByColumnsOnLeft to MCP dashboard table tile schema#2198

Open
alex-fedotyev wants to merge 2 commits intomainfrom
alex/HDX-mcp-groupby-lhs
Open

feat: add groupByColumnsOnLeft to MCP dashboard table tile schema#2198
alex-fedotyev wants to merge 2 commits intomainfrom
alex/HDX-mcp-groupby-lhs

Conversation

@alex-fedotyev
Copy link
Copy Markdown
Contributor

Summary

Follow-up to #2149. Drew added groupByColumnsOnLeft to the
external-API table chart config and to the conversion path in #2149,
but the MCP hyperdx_save_dashboard tool did not advertise the field
on its table-tile schema. As a result, MCP clients had no way to
discover or set the option, even though the underlying save / fetch
plumbing already supports it.

This change adds the field to mcpTableTileSchema.config and extends
the existing multi-tile MCP test to assert a table tile with
groupByColumnsOnLeft: true round-trips through hyperdx_save_dashboard.

Test plan

  • yarn tsc --noEmit clean in packages/api
  • yarn lint clean in packages/api
  • Existing MCP dashboard suite passes; the should create a dashboard with multiple tile types row now also asserts groupByColumnsOnLeft on the table tile round-trips
  • External API tests covering groupByColumnsOnLeft round-trip still pass (no change to that surface; verified locally)

Surfaces the table-tile display option that PR #2149 added to the
external API to MCP clients. The conversion path already round-trips
the field; this advertises it on the MCP table tile schema and
extends the existing multi-tile MCP test to assert the value
survives save -> fetch.

Follow-up to #2149.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment May 5, 2026 7:50pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

🦋 Changeset detected

Latest commit: 3de9c9a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/api Patch
@hyperdx/app Patch
@hyperdx/otel-collector Patch

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

@github-actions github-actions Bot added the review/tier-2 Low risk — AI review + quick human skim label May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🔵 Tier 2 — Low Risk

Small, isolated change with no API route or data model modifications.

Why this tier:

  • Standard feature/fix — introduces new logic or modifies core functionality

Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns.
SLA: Resolve within 4 business hours.

Stats
  • Production files changed: 1
  • Production lines changed: 7 (+ 8 in test files, excluded from tier calculation)
  • Branch: alex/HDX-mcp-groupby-lhs
  • Author: alex-fedotyev

To override this classification, remove the review/tier-2 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

PR Review

✅ No critical issues found.

The change is minimal and correct — groupByColumnsOnLeft is already fully supported in the external API layer (zod.ts:266, external-api/v2/utils/dashboards.ts:244,426). This PR simply exposes the missing field on the MCP schema so MCP clients can discover and set it.

  • Schema addition uses consistent style (z.boolean().optional().describe(...)) matching adjacent fields like asRatio
  • Test guards with toBeDefined() before accessing tableTile.config, so failure is safe
  • Changeset file included
  • groupBy: 'SpanName' added alongside groupByColumnsOnLeft: true in the test input, which is semantically correct (the option only matters when there are group-by columns)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

E2E Test Results

All tests passed • 157 passed • 3 skipped • 1199s

Status Count
✅ Passed 157
❌ Failed 0
⚠️ Flaky 6
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

@alex-fedotyev
Copy link
Copy Markdown
Contributor Author

Good catch. Added expect(tableTile).toBeDefined() in 3de9c9a.

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

Labels

automerge review/tier-2 Low risk — AI review + quick human skim

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant