docs(readme): 用真实的 examples 目录替换 4 个已删除的示例条目 - #3485
Merged
Merged
Conversation
README.md:59-62 推荐了 examples/crm、todo、kitchen-sink、msw-todo 四个目录,
它们都不存在。git 历史确认这是「被删」而非「移仓」或「计划未建」:四个目录
(@object-ui/example-{crm,todo,kitchen-sink,msw-todo})在同一个提交 12b287d
"refactor: remove example Todo application and related files"(2026-05-02)中
被整体删除,该提交没有新增任何目录,也没有触碰 README.md —— 这就是漂移的来源。
- 删掉四条幽灵条目,补上真实存在但一直没被提及的 hello-world 与 schema-catalog,
描述取自它们各自的 README/package.json,未作臆测。
- "Running Examples as API Servers" 整节已经完全失效:根 package.json 没有任何
serve:* 脚本,现存四个示例也都没有 serve 脚本,且该节点名的三个示例均已删除。
替换为真实可用的 Vite dev 流程。
- examples/README.md 表格漏了 schema-catalog,补上;它自称"不是可运行应用",
因此单列一节而非塞进 Runnable 表格。同时修正对 hello-world 不成立的
`cd examples/<name> && pnpm dev` 通用说明。
Fixes #3480
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Aug 6, 2026
yinlianghui
marked this pull request as ready for review
August 6, 2026 13:51
This was referenced Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3480
README.md:59-62 以肯定语气推荐了四个不存在的示例目录。按 issue 要求,先查清「去向」再决定修法。
每个目录的历史判定
四个都是 被删,不是移仓,也不是计划未建。证据是同一个提交:
examples/crm@object-ui/example-crm12b287d8b中删除(72 个文件)examples/todo@object-ui/example-todoexamples/kitchen-sink@object-ui/example-kitchen-sinkexamples/msw-todo@object-ui/example-msw-todo提交
12b287d8b— "refactor: remove example Todo application and related files"(Jack Zhuang, 2026-05-02)。关键的三点:git show --diff-filter=A --name-only 12b287d8b输出为空 —— 该提交没有新增任何目录,所以不存在「移到别处」。git show --name-only 12b287d8b | grep '^README.md$'计数为 0 —— 没有同步更新 README,这正是漂移的来源。refs/remotes+refs/heads逐个git cat-file -e均未命中)。排除「移仓」的交叉验证: 兄弟仓库
objectstack确实有examples/app-crm、examples/app-todo,但它们的首个提交是1a758d042(2026-02-03),早于本仓库删除动作三个月,且包名为@objectstack/example-*、入口是objectstack.config.ts—— 那是后端 metadata 示例,与这里被删的@object-ui/example-*前端示例是各自独立的东西,不是迁移目的地。kitchen-sink/msw-todo在objectstack现存目录中也没有对应物。因此不改绝对链接,直接删除四条。改动
README.md
hello-world与schema-catalog,描述全部取自它们各自的 README 与 package.json(未作臆测)。package.json中不存在任何serve:*脚本(serve:crm/serve:todo/serve:kitchen-sink全是死命令);serve脚本(byo-backend-console、console-starter是dev/build/lint/type-check/preview;hello-world只有lint;schema-catalog是build/test/...);examples/README.md(issue 要求一并对齐)
schema-catalog。补上 —— 它自己的 README 明确写着"不是可运行应用,是 data package + smoke tests",所以单列一节,而不是塞进 "Runnable examples" 表格里谎称可运行。cd examples/[示例名] && pnpm dev这条通用说明:对hello-world(无 dev 脚本)和schema-catalog(data package)都不成立。验证
lychee 二进制在本环境不可用(未安装,
npx lychee亦无),因此写了一个等价的离线检查器复现它那一类 File-not-found 判定,并先声明预期方向再运行:origin/main 的 README.md 应恰好报 4 个错(59-62 行),examples/README.md 应本来就是 0 —— 实测与预期一致。其余检查:
node scripts/check-doc-links.mjs→Docs links are valid.(注:该脚本只扫content/docs/,不覆盖 README,故为回归确认而非本改动的证据)pnpm check:control-bytes→OK (scanned 3673 tracked text file(s); skipped 85 binary)grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]' README.md examples/README.md→ 无命中无 changeset —— 纯文档改动。
范围外发现(未在本 PR 修改)
examples/hello-world/README.md:31-32同样指向被删目录(../crm/、../todo/),但该文件不在本次派发的文件围栏内,已另行记录。content/docs/**下的同类链接由另一个派发负责。ROADMAP.md与CHANGELOG.md中的提及属历史记录,不应改动。