Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#1,891 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@jasonkuhrt 已经在做这个了。

开始于 2026年10月27日。

  • #1872 来自 @jasonkuhrt —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
18/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
1.8k
派生
120
平均合并
8 小时 11 分钟
30 天内合并 PR
667

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MapleTechLabs/maple 的其他 Issue

查看 MapleTechLabs/maple 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。