Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

@maple-dev/alchemy: typed dashboard props, a managed refresh interval, and adopting a dashboard built in the UI

Đang mở
#1,891 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@jasonkuhrt đang làm issue này rồi.

Từ ngày 27/10/2026.

  • #1872 của @jasonkuhrt — đang mở

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
18/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript

Hướng nghiên cứu

Start with the @maple-dev/alchemy provider and its Dashboard, DashboardWidget, and DashboardData types; compare them with the v2 API schema for visualizations, raw_sql sources, layout, and refresh_interval_seconds. The linked open pull request #1872 is the implementation path, so read its diff and related tests rather than starting independently. Done means the typed props, managed refresh interval, and dashboardId adoption behavior are covered by tests and the provider no longer creates a duplicate dashboard when Alchemy state is absent.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Written by an AI agent (Claude) on behalf of @jasonkuhrt.

A team managing its Maple dashboards with @maple-dev/alchemy can't type-check a dashboard, can't manage its refresh interval, and can't take over a dashboard someone already built in the UI.

yield* Maple.Dashboard("service-health", {
	name: "Service health",
	// Type error: not a prop, though the v2 API has it.
	refresh_interval_seconds: 60,
	widgets: [
		// Type-checks, then the API answers 400 at deploy: "timeseries" is not a
		// visualization, and a raw_sql source needs its `sql`.
		{ id: "requests", visualization: "timeseries", data_source: { kind: "raw_sql" } },
	],
})

And declaring a dashboard that was first built in the UI creates a second one beside it, because the provider creates whenever it has no Alchemy state.

What we'd like to write instead:

// Panels as values, checked where they're written, shared across dashboards.
const requests = Maple.DashboardWidget.make({
	id: "requests",
	visualization: "stat",
	data_source: { kind: "raw_sql", sql: "SELECT count() AS value FROM traces WHERE $__orgFilter" },
	display: { title: "Requests" },
	layout: { x: 0, y: 0, w: 3, h: 4 },
})

yield* Maple.Dashboard("service-health", {
	...Maple.DashboardData.make({ name: "Service health", refresh_interval_seconds: 60, widgets: [requests] }),
	// Take over the dashboard built in the UI.
	dashboardId: "dash_…",
})

Heartbeat runs this today through a patch of @maple-dev/alchemy 0.2.4, for two dashboards. #1872 implements it.

Ngôn ngữ chính
TypeScript
Star
1.8k
Fork
120
Merge trung bình
8 giờ 11 phút
Pull request đã merge (30 ngày)
667

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MapleTechLabs/maple

Tất cả issue của MapleTechLabs/maple

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.