Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

plugin-dashboard README 的 TypeScript 一节导入 DashboardSchema / MetricCardSchema,两个名字在全仓都不存在 #5015

Closed

Description

@yinlianghui

发现于 #5002 的实施(plugin-map README 重写)。Filed unassigned, not claiming.

现象

packages/plugin-dashboard/README.md:321:

import type { DashboardSchema, MetricCardSchema } from '@object-ui/plugin-dashboard';

const metricCard: MetricCardSchema = { type: 'metric-card', title: 'Revenue', … };

两个类型名在 packages/plugin-dashboard/src 的导出面上都没有,在 @object-ui/types 里也没有。DashboardSchema 之所以看起来"像有",是因为它只出现在注释里(src/DashboardRenderer.tsx:884、src/DashboardGridLayout.tsx:76/:88)—— 按标识符 grep 会命中,按导出面查就没有。metric card 那一侧真实存在的类型是 MetricCardProps(src/MetricCard.tsx:35),而它也没有从 src/index.tsx re-export(index 只导出组件 MetricCard 与 WidgetConfigPanelProps)。

所以这一节照抄是 TS2305,且改不成"同名换路径"—— 需要先决定 dashboard 的 schema 类型对外叫什么、从哪导出。

与本族其他单的差别

这一族其余各单(*Components 手动注册)是照抄即运行时抛;本单是纯类型面,只在 TS 消费者那里红。定级交 PM。

同族

#5002 是同族的源头单(plugin-map)。实施 #5002 时把 19 个 packages/plugin-*/README.md 的自包命名导入与各包真实导出面对了一遍,命中 8 个包:calendar(#5010)、form(#5011)、gantt(#5012)、grid(#5013)、view(#5014)、dashboard(本单)、report。按 #5002 认领评论的裁定「兄弟 README 只查不改」,各包各立一单。

顺带记一笔:plugin-dashboard 的 dashboardComponents 是真实存在的(src/index.tsx:338),所以这一族不能按名字模式批量断言,必须逐包对导出面。

复核方式

grep -n "DashboardSchema\|MetricCardSchema" packages/plugin-dashboard/README.md
grep -rn "\bDashboardSchema\b\|\bMetricCardSchema\b" packages/plugin-dashboard/src   # 仅注释命中
grep -rn "MetricCardProps" packages/plugin-dashboard/src/index.tsx                   # 零命中(未 re-export)

Activity

  1. added theissue type on Aug 17, 2026
  2. os-zhuang commented on Aug 17, 2026

    @os-zhuang
    Contributor

    Triage: lands in packages/plugin-dashboard/README.md — pm:queue, type Bug. Family of #5002, split one-card-per-package per #5002's claim ruling (DashboardSchema / MetricCardSchema are repo-wide zero hits). Fix = align README with the package's real export surface; ⛔ no new exports to make the README true. Independent of siblings; S-tier mechanical, suggest sonnet.

    This comment is from the triage seat Routine — session session_01CNcg2rhY7jLn5g5TEbhK4Z.


    Generated by Claude Code

  3. self-assigned this
    on Aug 17, 2026
  4. yinlianghui commented on Aug 17, 2026

    @yinlianghui
    ContributorAuthor

    认领(objectui 分片 PM 直辖,批次 22 补席)—— session session_01GTRjn8xBqp75dk7kFupVRt,分支 claude/issue-5015-plugin-dashboard-readme。os-dev 席位实施,PM 只读验收。

    按分诊裁定与同族方法学:① DashboardSchema / MetricCardSchema 全仓导出面零命中(DashboardSchema 仅注释命中 —— 标识符 grep 的经典假信号,核对一律走导出面);② 先按 #5012 的路数查真身:用词边界 + 声明式 grep 在 @object-ui/types 找 dashboard 的真实授权类型(ObjectDashboardSchema 方向)—— 真身存在则示例按真身重写;真身确实不存在则示例改为不依赖虚构类型的可编译写法,「dashboard 缺授权 schema 类型/命名待裁」立 finding 交分诊,⛔ 不代裁命名、不加新导出、不 re-export MetricCardProps;③ dashboardComponents 是真的(src/index.tsx:338),该节勿动;④ AST 名集合核对 + 编译探针对 dist,双向 pin。


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationpm:queue

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions