docs(guide): 删掉 console.md 已整体过期的 Folder Structure 目录树 - #3539
Merged
Conversation
那一块自称描述 apps/console/,但列出的 11 个叶子条目里只有 3 个还对得上 (App.tsx、dataSource.ts、hooks/useBranding.ts)。6 个组件早已迁到 packages/app-shell,useObjectActions.ts 同样,CreateAppPage/EditAppPage 去了 packages/plugin-designer,而 context/ExpressionProvider.tsx 这个路径在 apps/console 下根本不存在。 不逐项重写:手写目录树是注定再次漂移的手抄本(#3488 先例——删手抄,指真源)。 整块删掉,换成一段实测过的 prose,只保留唯一承重的那条信息——console 的绝大 多数视图/布局在 packages/app-shell,apps/console 只是装配层。深入阅读由紧随 其后的 See Also 里既有的 Console Architecture 链接承接,不重复贴同一个 URL。 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 7, 2026
yinlianghui
marked this pull request as ready for review
August 7, 2026 04:05
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 #3534
背景
content/docs/guide/console.md的 "Folder Structure" 代码块自称描述apps/console/,但已整体漂移。PR #3532 只删了其中 MSW 那两行,结构性漂移未动。复核实测(基于 origin/main
a2c8f2a29,已含 #3532 的8c44bb661)原块共 11 个叶子条目,只有 3 个还对得上:
App.tsx、dataSource.ts、hooks/useBranding.ts。其余:components/AppHeader.tsxpackages/app-shell/src/layout/AppHeader.tsxcomponents/AppSidebar.tsxpackages/app-shell/src/layout/AppSidebar.tsxcomponents/CommandPalette.tsxpackages/app-shell/src/chrome/CommandPalette.tsxcomponents/ConsoleLayout.tsxpackages/app-shell/src/layout/ConsoleLayout.tsxcomponents/ObjectView.tsxpackages/app-shell/src/views/ObjectView.tsxcomponents/RecordDetailView.tsxpackages/app-shell/src/views/RecordDetailView.tsxcontext/ExpressionProvider.tsxpackages/app-shell/src/providers/ExpressionProvider.tsx(apps/console/src/context/这个目录不存在)hooks/useObjectActions.tspackages/app-shell/src/hooks/useObjectActions.tspages/CreateAppPage.tsxpackages/plugin-designer/src/pages/CreateAppPage.tsxpages/EditAppPage.tsxpackages/plugin-designer/src/pages/EditAppPage.tsx比 issue 记的还多两处:
useObjectActions.ts也迁走了,而CreateAppPage/EditAppPage去的是plugin-designer而不是 app-shell —— 所以新 prose 没有把「全都在 app-shell」写死。改法(PM 裁定,与 #3488 先例同构)
不逐项重写目录树:手写的目录树是注定再次漂移的手抄本,逐项重写只是把下一次漂移推迟到下一次重构。整块删掉,换成一段 prose,只保留唯一承重的那条信息 —— console 的绝大多数视图/布局在
packages/app-shell,apps/console只是装配层。新 prose 的每条断言都有源码依据,不是继承来的:
apps/console/src/AppContent.tsx自己的注释:"The full inner-SPA shell (ConsoleLayout, CommandPalette, ObjectView etc.) lives in @object-ui/app-shell as DefaultAppContent … third-party hosts that don't need those routes use DefaultAppContent directly."apps/console/src/App.tsx注释:"Owns the full route tree including unauthenticated auth surfaces…"apps/console/src/register-plugins.ts:"Console plugin registration — the SDUI block layer."dataSource.ts转出ObjectStackAdapter,配合本文上一节的VITE_SERVER_URLapps/console/src/pages/{auth,system,settings}/、pages/Docs*.tsx关于链接:没有重复贴 URL
裁定要求指向
/docs/guide/console-architecture。该链接已经是紧随其后的 "See Also" 第一条 —— 新段落是 See Also 之前的最后一节,两行之隔再贴一次同一个 URL 是可见的冗余。因此段落以「先去packages/app-shell找」这条可执行结论收尾,深入阅读交给既有的 See Also 条目承接,See Also 一字未动。验证
node scripts/check-doc-links.mjs→Docs links are valid.,exit 0pnpm exec vitest run scripts/ --maxWorkers=2→ 14 passed (14) / 216 passed (216)。跑前预测「保持绿」:没有任何测试读console.md的正文(check-doc-links.test.ts是在临时目录里造合成仓库,不读真实 guide 文件);实测与预测一致。node scripts/check-control-bytes.mjs→ OK(3695 个文本文件),另对本文件单独grep -naP自检控制字节,干净。VITE_SERVER_URL的说法),与上方 Key Features 表里的 Command Palette 等条目一致。#folder-structure锚点全仓无引用,删标题不会产生死链。纯 content 文档改动,按仓库约定不加 changeset;未触碰
content/docs/releases/。🤖 Generated with Claude Code
https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
Generated by Claude Code