chore(integrations/grafana): get rid of AI generated SDK#15222
Conversation
|
| Filename | Overview |
|---|---|
| integrations/grafana/definitions/dashboard-schemas.ts | Removed import and two satisfies z.ZodType<Partial<…>> constraints; schemas now standalone with no compile-time link to the TypeScript types in client.ts |
| integrations/grafana/grafana-api/GrafanaDashboard.ts | Deleted AI-generated SDK file; all referenced types are now either inlined in client.ts or no longer needed |
| integrations/grafana/src/client.ts | Replaced the external Panel/TextPanel/TimeSeriesPanel import with identical locally-defined types; functional behaviour is unchanged |
Reviews (1): Last reviewed commit: "chore(integrations/grafana): get rid of ..." | Re-trigger Greptile
| id: z.number().optional().title('ID').describe('Numeric panel ID (assigned by Grafana)'), | ||
| gridPos: gridPosSchema.optional().title('Grid Position').describe('Position and size of the panel in the grid'), | ||
| }) satisfies z.ZodType<Partial<TextPanel>> | ||
| }) |
There was a problem hiding this comment.
Compile-time schema/type sync check removed
Dropping satisfies z.ZodType<Partial<TextPanel>> (and the TimeSeriesPanel counterpart) removes the only compile-time guard that kept the Zod schemas aligned with the TypeScript types. Those types now live in client.ts as pure TypeScript, but nothing links them back to the schemas. A future contributor could add a field to TextPanel/TimeSeriesPanel in client.ts without updating the Zod schema, and the mismatch would silently pass the type checker. Consider extracting the shared types to a small types.ts file that both dashboard-schemas.ts and client.ts can import, so the satisfies constraint can be restored without circular dependencies.
No description provided.