Repository navigation
Maple Review Bot / Maple / review
completed
Nov 16, 2026 in 3m 56s
Confidence 6/10 · 2 issues to address
🟡 Confidence 6/10 · needs attention. Held at 6 because a correctness warning is open.
2 warnings −2 · 5 notes · tests covered · risk medium · 1/1 new units observable
Converts Grafana dashboard JSON into PromQL and ClickHouse widgets, with sections, variable rewriting, a v2 endpoint, MCP import_json and a web import report. Layout, SQL scoping and warnings are pinned by tests; the earlier findings on silently dropped targets and variables still stand at this head.
convertGrafanaDashboardToPortableturns panels into PromQL and raw-SQL widgetsPOST /v2/dashboards/import/grafanaimports with the shared raw-SQL scoping- MCP
create_dashboardtakesimport_jsonfor Grafana and Perses - The web list reports an import's warnings in a dialog
Still open from earlier reviews
- 🟠 Warning · F11 · a target with
rawSqlwhose datasource cannot be resolved is imported as ClickHouse SQL with no warning at all ·path:74 - 🟠 Warning · F12 ·
label_values(..., job)returns the service facet before the selector check, so the metric and its label filters are dropped with no warning ·path:77 - 🔵 Note · F13 · A
rawSqltarget with an unresolvable datasource becomes ClickHouse silently ·packages/backend/src/services/dashboards/grafana-import-panels.ts:74 - 🔵 Note · F14 ·
label_values(…, job)drops the selector's label filters without a warning ·packages/backend/src/services/dashboards/grafana-import-variables.ts:77 - 🔵 Note · F4 · Grafana
multivariables import as single-select with no warning ·packages/backend/src/services/dashboards/grafana-import-variables.ts:119 - 🔵 Note · F5 ·
import_jsonerror names a weaker rule thanisGrafanaDashboardJsonenforces ·apps/ai/src/mcp/tools/create-dashboard.ts:339 - 🔵 Note · F9 · Clearing
importReportat close unmounts the report dialog before its leave transition ·apps/web/src/page/dashboards/list/update.ts:412
Production impact
Telemetry this change adds and removes (3)
- ➕ span name
McpTool.createDashboard.convertImport·apps/ai/src/mcp/tools/create-dashboard.ts:329 - ➕ span name
HttpV2Dashboards.createImported·apps/api/src/routes/v2/dashboards.http.ts:314 - ➕ span name
GrafanaDashboardImport.convert·packages/backend/src/services/dashboards/grafana-dashboard-import.ts:248
What was checked
- Adjacent Grafana panels share
half(x)edges, andresolveOverlapspushes grown tiles down (grafana-import-layout.ts:40-70) importStatsisoptionalKey, so the Perses path'sstats: undefinedstill encodes (mcp-outputs/dashboards.ts:117)- The importer's 50-section cap equals
DASHBOARD_MAX_SECTIONS, so a big board cannot fail document decode
Observability coverage: 1 of 1 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
| POST /v2/dashboards/import/grafana | HTTP server route | yes | Declared beside the Perses import route in the same v2 router; apps/api traces the Hono app rather than per route, as every other v2 route does |
46d2253 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading