feat(api): expose seriesLimit on line/stacked_bar tiles in external API - #2772
Conversation
Co-authored-by: Drew Davis <pulpdrew@gmail.com>
🦋 Changeset detectedLatest commit: 48c49ac The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryAdds positive-integer
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/api/src/utils/zod.ts | Extends the external line and stacked-bar chart schemas with an optional positive-integer series limit. |
| packages/api/src/routers/external-api/v2/utils/dashboards.ts | Preserves seriesLimit while converting line and stacked-bar configurations between external and internal representations. |
| packages/api/src/mcp/tools/dashboards/schemas.ts | Exposes seriesLimit in MCP dashboard schemas with matching validation and agent-facing documentation. |
| packages/api/src/routers/external-api/v2/dashboards.ts | Documents seriesLimit for line and stacked-bar configurations in the source OpenAPI annotations. |
| packages/api/openapi.json | Publishes the new optional field in the generated External API contract. |
| packages/api/src/routers/external-api/tests/dashboards.int.test.ts | Covers create, update, omission, persistence, and retrieval behavior through External API v2. |
| packages/api/src/mcp/tests/dashboards/patchDashboard.int.test.ts | Verifies that MCP patching preserves seriesLimit when changing a line tile to stacked-bar. |
| packages/api/src/mcp/tests/dashboards/saveDashboard.int.test.ts | Extends MCP save-dashboard coverage to include grouped line and stacked-bar tiles with series limits. |
Reviews (9): Last reviewed commit: "Merge branch 'main' into cursor/expose-s..." | Re-trigger Greptile
E2E Test Results✅ All tests passed • 264 passed • 1 skipped • 905s
Tests ran across 4 shards in parallel. |
Co-authored-by: Drew Davis <pulpdrew@gmail.com>
6b53ba7 to
bc23427
Compare
🔴 Tier 4 — CriticalTouches auth, data models, config, tasks, OTel pipeline, ClickHouse, or CI/CD. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
|
<!-- deep-review --> Deep Review✅ No critical issues found. The five-line production change is correct on its happy path: 🟡 P2 -- recommended
🔵 P3 nitpicks (7)
Reviewers (11): correctness, testing, maintainability, project-standards, api-contract, kieran-typescript, adversarial, performance, security, agent-native, learnings-researcher. Testing gaps:
Follow-up, not part of this change: Environment caveat: |
fccdbad to
976a738
Compare
Co-authored-by: Drew Davis <pulpdrew@gmail.com>
976a738 to
370fca0
Compare
Deep Review✅ No critical issues found. The change is additive and backward compatible: an optional field added to two builder tile schemas, wired symmetrically through both converters, with 🟡 P2 -- recommended
🔵 P3 nitpicks (4)
Reviewers (8): correctness, testing, api-contract, maintainability, project-standards, kieran-typescript, agent-native, learnings-researcher. Testing gaps:
|
8aa82c6 to
6fcb934
Compare
Deep Review✅ No critical issues found. The diff is a small, additive pass-through of an existing internal
🟡 P2 — recommended
The same PR documents this correctly on the MCP surface — 🔵 P3 nitpicks (1)
Reviewers (6): correctness, testing, maintainability, project-standards, api-contract, agent-native
Testing gaps:
|
|
<!-- deep-review --> Deep Review✅ No critical issues found. The change is additive, type-sound, and well-tested. Injection is not reachable (the value is bound as a ClickHouse 🟡 P2 -- recommended
🔵 P3 nitpicks (7)
Reviewers (10): correctness, testing, maintainability, project-standards, api-contract, security, adversarial, kieran-typescript, agent-native, learnings-researcher. Testing gaps:
Note: |
PR #2772 (merged into this branch via main) added seriesLimit to the external Line/StackedBar tile schemas as positive-only, and the converter emitted `config.seriesLimit ?? undefined`. This branch relaxes the internal schema to allow 0 (unlimited), so a stored 0 would serialize verbatim and be rejected on a GET->PUT round-trip by the positive-only write schema. Gate both cases on hasPositiveSeriesLimit so 0/null map to absent, matching the existing Pie/Bar limit mappings. Adds unit coverage for 0/null/positive.
Summary
This PR adds the
seriesLimitdisplay setting to the line and stacked-bar chart schemas in the external API and MCP. Previously, this field was stripped out by the schemas, and thus could not round-trip in a dashboard modified by MCP or the external API.Testing
Connect via the API or MCP and validate that the property round-trips for line and stacked bar charts.
Screenshots or video
N/A — non-UI change (External API only).
How to test on Vercel preview
N/A — non-UI change
References