docs(guide): 删掉 console-architecture 里不存在的 MSW Mock Mode,并按包归属校正组件 - #3544
Merged
Conversation
`MSW Mock Mode` 整节描述的能力不存在,且与 #3532 刚改写的 console.md:18 ("There is no bundled mock backend")直接矛盾 —— 而 console.md 的 See Also 正把读者往这一页送。实测 origin/main a2c8f2a:`MSWPlugin`/`msw` 在 apps/console 源码与 package.json 零命中,`apps/console/src/mocks/` 随 2b7435b(refactor: remove MSW mock server setup)删除。整节删除,换成一段 「没有内置 mock 后端、dev 与生产一样要连活服务器」的说明 + 指向 console.md Quick Start 的链接(不重复其内容);数据流图上的 `MSW / Real Server` 边标注 一并改成真实的 `ObjectStack server (HTTP, VITE_SERVER_URL)`。 第二类是组件归属漂移:页面按 `apps/console` 的口径点名的 ExpressionProvider / ConsoleLayout / AppHeader / ObjectView / RecordDetailView / ObjectDataPage 现均由 `@object-ui/app-shell` 导出, CreateAppPage / EditAppPage 由 `@object-ui/plugin-designer` 导出(逐项 `git grep -l` 复核)。按 role/package 口径校正,**不写死文件路径** (#3534 已证明路径树必漂移):开篇加一段总述说明 apps/console 只是薄壳, Routing 节点明表内组件的导出方,§3 把 "The console's ObjectView" 的主语 改成 shell 的 ObjectView,§4 改成 plugin-designer 端到端拥有。 图里 `AppSidebar` 改用角色措辞「sidebar nav」:它虽在 app-shell,但 ConsoleLayout 已改挂 `UnifiedSidebar`,直接点名会写下一句可证伪的话。 顺手修了 SchemaRendererProvider 那格的一格错位(纯空格,无内容变更)。 同页另发现三处过期陈述(objectstack.config.ts 顶层 box 与 console.md 同源、 已死的建应用入口、Routing 表不全),按文件面纪律只报不改,已立 #3543。 Fixes #3540 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 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 #3540
只动一个文件:
content/docs/guide/console-architecture.md。一、
MSW Mock Mode整节删除(前提已在 origin/maina2c8f2a29上重新实测)git grep -niE "mswplugin|msw" -- apps/console/package.json零命中(只剩.gitignore的一行注释、CHANGELOG.md的历史条目,以及不在本单面内的apps/console/docs/deployment.md)apps/console/src/mocks/2b7435b76refactor: remove MSW mock server setup and related configurations—— 确系那次删除即整节属于「文档描述不存在的能力」,且与 #3532 刚改写的
console.md:18("There is no bundled mock backend")当场矛盾 —— 而console.md的 See Also 正把读者往这一页送。与 #3532 同口径:整节删除。顺带澄清一个容易误判的信号:
msw仍是packages/plugin-form/packages/plugin-grid的 devDependency(单测里拦请求用),与「console 自带 mock 后端」无关,所以pnpm install输出里出现的msw@2.15.0不构成反证。替代内容(按单里的要求,一句话 + 指路,不重复 console.md):新开一节
## Development Mode,说明没有内置 mock 后端、dev 与生产一样由ObjectStackAdapter经VITE_SERVER_URL连活服务器、服务器不在则 discovery 失败因而侧边栏空,然后链到console.md的 Quick Start。数据流图里同源的边标注
MSW / Real Server一并改成真实的ObjectStack server (HTTP, VITE_SERVER_URL)。二、组件归属按 role/package 口径校正(逐项在 origin/main 上重新
git grep -l,未继承 #3539 的表)ExpressionProvider@object-ui/app-shellConsoleLayout/AppSidebar/AppHeader@object-ui/app-shellObjectView/RecordDetailView/ObjectDataPage@object-ui/app-shellCreateAppPage/EditAppPage/AppCreationWizard@object-ui/plugin-designerAppShell/useAppShellBranding@object-ui/layout—— 图里原本的标注是对的,保留未动⛔ 按单里的禁令,没有把任何文件路径写进正文。具体改法:
apps/console只是薄壳(拥有 Vite 构建、最外层路由树、插件注册),其余点名的东西都是包导出的组件而非apps/console下的文件 —— 后文因而不必逐句重复归属。App.tsx那格改成Console shell (@object-ui/app-shell);Routes一行注明由apps/console挂在/apps/:appName(实测App.tsx:348的path="/apps/:appName/*",内层路由在 app-shell 的AppContent里声明)。CreateAppPage/EditAppPage由 plugin-designer 懒加载外,其余均由 app-shell 导出。The console's ObjectView is a thin wrapper...的主语改成 shell 导出的那个ObjectView(该 wrapper 在 app-shell,不在 console;其文件头注释原文就是 "Thin wrapper around the plugin-view ObjectView",claim 本身成立,错的只是归属)。AppCreationWizard都由它导出),console shell 只负责懒加载挂路由。一处有意的偏离:
AppSidebar改用角色措辞图里原
AppSidebar (navigation tree)没有改成「AppSidebar,来自 app-shell」,而是改成角色措辞sidebar nav (app switcher + nav tree)。理由:AppSidebar确实在 app-shell,但ConsoleLayout已经改挂UnifiedSidebar(ConsoleLayout.tsx只 import 后者),在描述活组合的图里直接点名AppSidebar等于写下一句可证伪的话。单里给的口径本就是 role/package,角色措辞两头都不吃亏。该组件的挂载漂移已并入 #3543 报告。附带
修了
SchemaRendererProvider那格的一格错位(纯空格,零内容变更)—— 那一格宽 60、上下框线宽 59,渲染出来是歪的,而这张图本 PR 正在编辑。越界发现:只报不改,已立 #3543
同页另有三处过期陈述,均不属于本单的两类缺陷面,按
越界即停没有在本 PR 里改:objectstack.config.ts—— 全仓git ls-files零命中。特别注意:console.md的## Configuration节同源,只改这一页会让两页当场矛盾,而「两页一致」正是本单的验收条件,所以必须两页同修 → 出面。§4的 Entry Points 三条已死/存疑(AppSidebar的 Add App 菜单已不可达,且其注释写明 "Manual Create App is deprecated in favour of the AI-first builder ... Entry point removed";CommandPalette 里create-app零命中)。:objectName/new、record/:recordId/edit、metadata/*;console 另有整棵 auth 路由)。本 PR 只加了一句兜底说明这些是 object-facing 路由,未逐条补全。验证(预测先写,再跑)
node scripts/check-doc-links.mjs/docs/guide/console#quick-start的目标页与锚点都在)Docs links are valid.exit 0pnpm exec vitest run scripts/ --maxWorkers=2scripts/下对本页零引用,没有任何测试 pin 这页内容)Test Files 14 passed (14) / Tests 216 passed (216)node scripts/check-control-bytes.mjsOK (scanned 3695 tracked text file(s))grep -rn "MSW|msw" content/docs/guide/console-architecture.mdgrep -naP自扫控制字节(超出 gate 扫描面)重活按纪律走了
flock /tmp/os-heavy-verify.lock+NODE_OPTIONS=--max-old-space-size=4096。内容文档,无用户可见的代码变更 → 不加 changeset;
content/docs/releases/未触碰。🤖 Generated with Claude Code
https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt