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-form README 教三个不存在的导入:formComponents 手动注册、FormSchema / FormField 从本包导入 #5011

Closed

Description

@yinlianghui

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

现象

packages/plugin-form/README.md 有三处从本包名导入的标识符,在本包导出面上都不存在:

README 实际
:41 import { formComponents } from '@object-ui/plugin-form' + :45 Object.entries(formComponents).forEach(...) 全包零命中。注册是 import 的副作用;真实导出在 src/index.tsx:18-65(ObjectForm、TabbedForm、WizardForm、SplitForm、DrawerForm、ModalForm、EmbeddableForm、MasterDetailForm、LineItemsPanel …)。照抄拿到 undefined,Object.entries(undefined) 直接抛 TypeError。
:408 import type { FormSchema, FormField } from '@object-ui/plugin-form' 两个类型都存在但不在本包:FormSchema 在 @object-ui/types(packages/types/src/form.ts:1055),FormField 同包(:898)。plugin-form 只 import 它们、不 re-export,所以按 README 写的路径导入是 TS2305。

两处的修法不同(前者是删虚构、后者是改导入路径),所以分别记在上表里。

同族

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

复核方式

grep -n "formComponents\|FormSchema, FormField" packages/plugin-form/README.md
grep -rn "formComponents" packages/plugin-form/src   # 零命中
grep -n "FormSchema\|FormField" packages/plugin-form/src/index.tsx   # 零命中(未 re-export)

分级

交 PM 分诊。包内 README 的 API 断言今天没有门禁看得到(check-doc-links 只解析链接,check-doc-component-types 只扫 content/docs),这正是这一族能长期存活的原因。

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-form/README.md — pm:queue, type Bug. Family of #5002, split one-card-per-package per #5002's claim ruling. Two distinct fixes as the card's own table records: delete the fabricated formComponents snippet (registration is an import side-effect), and re-point the FormSchema / FormField import to @object-ui/types where they actually live. ⛔ Do not add re-exports to make the README true — contract expansion needs its own card. Independent of siblings #5010/#5012–#5016; 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-5011-plugin-form-readme。os-dev 席位实施,PM 只读验收。

    按分诊裁定与同族方法学(#5010/#5016/#5012/#5015 四单已验收,方法学见 PR #5059/#5069):① 删虚构 formComponents 手动注册节,改教真实机制(import 副作用 + 真实导出面 + 实际 register 键);② FormSchema / FormField 真身在 @object-ui/types(form.ts:1055/:898),改导入路径 —— ⛔ 不加 re-export;③ AST 名集合核对(#5043 规格,词边界防子串)+ 编译探针对 dist 双向 pin;④ 同文件同性质漂移一并修单列,不同性质立 finding。注意:同包 src 侧 #5049(EmbeddableForm)在飞,⛔ 只动 README + changeset,零触碰 src。


    Generated by Claude Code

  5. yinlianghui commented on Aug 17, 2026

    @yinlianghui
    ContributorAuthor

    实施完成,draft PR #5079(分支 claude/issue-5011-plugin-form-readme,基线 origin/main @ e6cd3c26c9ee3c64d76b5e18ab8b41a4aaa09c97)。os-dev 席,session session_01GTRjn8xBqp75dk7kFupVRt。

    卡面两条读数复测都成立(premise_still_valid: true),行号与卡面一致;零命中按 #5010 的教训用邻近词 ObjectForm 反查过扫描器。名集合核对改前 MISSING COUNT: 3 → 改后 0(导出面取自 dist/index.d.ts,走 checker.getExportsOfModule);编译探针改前三条 TS2305、改后全消。⛔ 未加任何 re-export,⛔ src 一行未碰(#5049 在飞)。

    同节复核揪出第三处同性质漂移并一并修::156 散文说 isRuntimeDefault「(re-exported here)」,而它只由 src/schemaDefaults.ts:78 为包内自用 re-export,包又只发布 "." 一个 export —— 单独小探针实测 TS2305。留着它会与本 PR 新增的 "Public exports" 清单在同一文件里自相矛盾。

    同文件不同性质的两处未夹带,已分别立卡:#5075(键面漂移,其中 validation: 数组拼法会让校验静默失效)、#5076(文档站上未修的 content/docs/plugins/*.mdx 家族镜像)。均未认领。


    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