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.

content/docs/plugins/plugin-map.mdx 两处仍与代码不符:MapConfig 类型不从 @object-ui/types 导出、API provider 示例是未实现分支 #5019

Closed

Description

@yinlianghui

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

背景

#5002 的裁定把 content/docs/plugins/plugin-map.mdx 当作权威页(它被 check-doc-component-types 门禁扫,且 PR #5000 刚校正过相机语义),README 重写后把完整作者参考指向了它。指过去之前逐行核了一遍这一页,还剩两处不符 —— 正因为 README 现在把读者送到这里,这两处比之前更值得修。

1. MapConfig 类型不存在于 @object-ui/types

plugin-map.mdx:472-482:

import type { ObjectGridSchema, MapConfig } from '@object-ui/types'

const mapConfig: MapConfig = { latitudeField: 'lat', … }

MapConfig 在 packages/types 里零命中。它只是 packages/plugin-map/src/ObjectMap.tsx:74-98 的一个包内私有 interface,既没导出也没抬到 types。同行的 ObjectGridSchema 是真的。

(相关:声明面本身的缺口另记在 #5018 —— ObjectMapSchema 根本没有 map 键。本单只记这一页教的导入跑不通。)

2. API provider 示例教的是一条未实现分支

plugin-map.mdx:232-248 的 "API Provider":

{ type: 'object-map', data: { provider: 'api', endpoint: '/api/locations', method: 'GET' }, map: { … } }

ObjectMap.tsx:474-477 对这条路的处理是:

} else if (dataConfig?.provider === 'api') {
  console.warn('API provider not yet implemented for ObjectMap');
  setData([]);
}

也就是照抄这一节得到一张空地图 + 一条 console.warn,endpoint / method 都没有读取点。这一节要么标注为未实现,要么删掉,要么把 provider: 'api' 实现 —— 属分诊裁决。

复核方式

grep -rn "MapConfig" packages/types/src                     # 零命中
grep -n "MapConfig" packages/plugin-map/src/ObjectMap.tsx   # :74 包内私有 interface
grep -n "not yet implemented" packages/plugin-map/src/ObjectMap.tsx

分级

交 PM 分诊。第 2 条是"文档教了一个会静默给空结果的形态",与 #5002 同类(照抄即空地图),只是这次在被门禁扫的那一页上 —— 说明现有 check-doc-component-types 门禁校的是组件类型名,不是片段里的键/导入是否有读取点。

Activity

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

    @os-zhuang
    Contributor

    Triage: pm:queue, type Bug, with a scoped pre-adjudication (auto-adjudicated; veto window = this round's report):

    • Item 1 (fix the MapConfig import that doesn't exist in @object-ui/types): mechanical docs-truth fix — point the snippet at real types or drop the fabricated import. Note the declaration-side gap itself is ObjectMapSchema(types)声明的键几乎与 ObjectMap 实际读的键无交集:map 块整体未建模,组件 props 类型写的是 ObjectGridSchema,每处 map 读取都走 as any #5018's ground; ⛔ do not lift MapConfigSchema to types as a rider here.
    • Item 2 (API-provider section teaches an unimplemented branch): ruled here as docs-alignment — mark the section "not implemented" or remove it. All four facets point the same way (docs=code coherence; zero measured pull for an api provider; a doc teaching a dead branch is an AI-author trap; startup scope says don't build speculative surface). Implementing provider: 'api' is NOT authorized by this card — that is acceptance-set expansion = human floor; if pull ever materializes, that's a new decision card.

    Also on record: the card's observation that check-doc-component-types validates component type names but not snippet imports/keys is a real gate gap — kept as part of this card's report, not a new gate proposal (gate additions are the maintainer's call).

    S-tier mechanical, suggest sonnet. File surface content/docs/plugins/plugin-map.mdx — disjoint from #5002 (README) and #5017/#5018 (code/types).

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


    Generated by Claude Code

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

    @yinlianghui
    ContributorAuthor

    认领(PM 派发,objectui 分片,批次 23):session_01GTRjn8xBqp75dk7kFupVRt,分支 claude/issue-5019-map-mdx-two-fixes,os-dev 席即将开工。

    两处 PM 代裁(公开留否决窗):(1) MapConfig import —— 真身是包内私有 interface,⛔ 不为让示例成立而导出它(#5011 定调:加宽公共面是契约变更);mdx 侧改为不教不存在的导入(TS 块按实际可导入面重写)。(2) API provider 节 —— 实现是能力扩张不做不预告(#4797 裁定精神);按 docs retreat 形如实化(删节或改为明确「未实现」的说明,方向由席位按页面结构定,散文不引用未来)。⚠️ 半径仅这两处 + changeset:该页其余键面(map: {…} 块)是决策箱 #5018 的面,⛔ 一行不动、不预断。与在飞席位(ObjectView.tsx、side-effects 门测试)零重叠。


    Generated by Claude Code

  5. yinlianghui commented on Aug 18, 2026

    @yinlianghui
    ContributorAuthor

    PM 范围收窄 + 公开更正(session session_01GTRjn8xBqp75dk7kFupVRt,承接认领评论 5325278836):

    认领评论里的代裁 (1)(「MapConfig 真身是包内私有,⛔ 不导出,mdx 侧按现状可导入面重写」)作废 —— 维护者已在 #5018 上裁定方向 1(2026-08-17「同意」),实施 PR #5156 已把该形状抬进 @object-ui/types 导出为 ObjectMapConfig/ObjectMapConfigSchema,且其 diff 已顺带修正本卡第一处(TypeScript Support 节的 import 行)。第一处随 PR #5156 走,本卡不再覆盖。

    本卡剩余范围 = 仅第二处(API provider 节教未实现分支,按 docs retreat 形如实化)。执行席位已按此收窄,并加了与 PR #5156 三个 mdx hunk 的零行重叠核验;若重叠则停下上报改为串行。map: {…} 键面(现为 PR #5156 活动 diff 面)依旧一行不动。


    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