Skip to content

docs(guide): 删掉 console.md 已整体过期的 Folder Structure 目录树 - #3539

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-3534-console-folder-structure
Aug 7, 2026
Merged

docs(guide): 删掉 console.md 已整体过期的 Folder Structure 目录树#3539
yinlianghui merged 1 commit into
mainfrom
claude/issue-3534-console-folder-structure

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes#3534

背景

content/docs/guide/console.md 的 "Folder Structure" 代码块自称描述 apps/console/,但已整体漂移。PR #3532 只删了其中 MSW 那两行,结构性漂移未动。

复核实测(基于 origin/main a2c8f2a29,已含 #35328c44bb661)

原块共 11 个叶子条目,只有 3 个还对得上:App.tsxdataSource.tshooks/useBranding.ts。其余:

文档里写的实际位置
components/AppHeader.tsxpackages/app-shell/src/layout/AppHeader.tsx
components/AppSidebar.tsxpackages/app-shell/src/layout/AppSidebar.tsx
components/CommandPalette.tsxpackages/app-shell/src/chrome/CommandPalette.tsx
components/ConsoleLayout.tsxpackages/app-shell/src/layout/ConsoleLayout.tsx
components/ObjectView.tsxpackages/app-shell/src/views/ObjectView.tsx
components/RecordDetailView.tsxpackages/app-shell/src/views/RecordDetailView.tsx
context/ExpressionProvider.tsxpackages/app-shell/src/providers/ExpressionProvider.tsx(apps/console/src/context/ 这个目录不存在)
hooks/useObjectActions.tspackages/app-shell/src/hooks/useObjectActions.ts
pages/CreateAppPage.tsxpackages/plugin-designer/src/pages/CreateAppPage.tsx
pages/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."
  • 「owns the route tree」← apps/console/src/App.tsx 注释:"Owns the full route tree including unauthenticated auth surfaces…"
  • 「registers the plugin set」← apps/console/src/register-plugins.ts:"Console plugin registration — the SDUI block layer."
  • 「wires the backend connection」← dataSource.ts 转出 ObjectStackAdapter,配合本文上一节的 VITE_SERVER_URL
  • 「console 专属界面(auth / docs portal / system / settings)」← 实测 apps/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.mjsDocs links are valid.,exit 0
  • pnpm exec vitest run scripts/ --maxWorkers=214 passed (14) / 216 passed (216)。跑前预测「保持绿」:没有任何测试读 console.md 的正文(check-doc-links.test.ts 是在临时目录里造合成仓库,不读真实 guide 文件);实测与预测一致。
  • node scripts/check-control-bytes.mjs → OK(3695 个文本文件),另对本文件单独 grep -naP 自检控制字节,干净。
  • 全文通读:与 docs(guide): 改教真正生效的 VITE_SERVER_URL,删除不存在的 MSW 开关 #3532 刚改过的 Quick Start 不冲突(未触及 mock backend / 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

那一块自称描述 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
@vercel

vercelBot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectuiIgnoredIgnoredAug 7, 2026 3:21am

Request Review

@yinlianghui
yinlianghui marked this pull request as ready for review August 7, 2026 04:05
@yinlianghui
yinlianghui added this pull request to the merge queueAug 7, 2026
Merged via the queue into main with commit 60f3affAug 7, 2026
6 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-3534-console-folder-structure branch August 7, 2026 04:06
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Aug 10, 2026
…ion (objectstack-ai#3577) (objectstack-ai#3616)
三类结构性虚构,均对 origin/main 逐条复核后处理。范围是整页 8 处锚点,
不是正文列的 3 处 —— 只修 Directory Structure 会让全页继续自相矛盾。
1. 幽灵目录。`packages/runner/src` 下实测只有 App.tsx / LayoutRenderer.tsx /
main.tsx / index.css / lib/ / 测试文件,没有 `schemas/`、没有 `components/`,
包根也没有 `public/`。按 objectstack-ai#3534/objectstack-ai#3539 先例(删手抄目录树,指真源)整块删掉
Directory Structure,换成一段实测过的 prose,并把承重信息落在唯一真实的
元数据目录 `src/app-data/` 上 —— 它由 `.gitignore` 排除、新检出下不存在,
布局与解析顺序由本页自己的 Metadata Loading 一节(objectstack-ai#3581 补)承接。
其余 5 处 `src/schemas/` 引用(Use Cases 两处、Add Custom Schemas、
Best Practices 目录树)一并按 Metadata Loading 的真实契约改写为
`src/app-data/pages/*.json`;页文档形状取 App.tsx 兜底页的
`{ type: 'page', title, body: [] }`,与本页 Metadata Loading 表格里
「the page document (PageNodeSchema)」一致。
2. 「内置示例 schema」。这个包一个 schema 文件都不带:承载它们的
`src/app-data/` 在 `packages/runner/.gitignore:1` 里,缺该目录时
LocalBundleLoader 三个 `import.meta.glob` 编译为 `{}`,`/` 渲染内置兜底
`No index page found.`。What's Included 下那节列七类「Runner 包含的示例
schema」整节改写为读者实际要做的事(往 `src/app-data/` 放 JSON,或用
`?api=` 指后端);下方 `## Example Schemas` 改题为 Schemas to Start From,
并说明这些例子活在文档里、不在包里。
3. Package Information。`Version: 0.3.1` 直接删除,不改成 17.3.0 ——
`@object-ui/runner` 在 `.changeset/config.json` 的 fixed 组里随 39 包同发,
手抄版本号必然再次漂移(分诊亦持此意见);当前版本改为指向 npm 页。
`Type: Application (not published to npm)` 与实测相反:package.json 是
`"private": false` + `publishConfig.access: "public"`,registry 上
`dist-tags.latest = 17.3.0`。改为不随版本漂移的措辞:已发布,但它是应用
不是库 —— package.json 不声明 main/module/exports/types,没有可 import 的
东西(与 PR objectstack-ai#3602 刚给 README 定下的说法一致)。
`src/components/` 保留一处 —— Add Custom Components 的 `// src/components/
MyComponent.tsx`。那是让读者自己建的文件(下方注册片段的相对 import 必须与它
对齐),已在上一句明写「包里不带组件,这个目录你自己加」,不再是「它存在」的
断言。
越界发现另行开单,不在本 PR 修:Features 的「All official plugins included」、
Best Practices 的环境变量小节(objectstack-ai#3538 删了 Environment Variables 整节却漏了它)、
Add Custom Routes 的 react-router-dom(runner 不依赖它,路由是手写
history.pushState)。objectstack-ai#3604 是 README 的另一件事,未触碰。
Fixesobjectstack-ai#3577
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Aug 10, 2026
) (objectstack-ai#3651)
原展示块给出的 `server: { port: 5173, open: true }` 在
`packages/runner/vite.config.ts` 里根本不存在 —— 5173 是 Vite 的默认端口
(`"dev": "vite"`,无 `--port`/`--open`),自动开浏览器纯属无中生有。与此同时,
真实文件里唯二承重的两块被完全隐去:`resolve.alias` 传递闭包表(objectui#3575
的硬不变量,漏一个 specifier 会让 dev server 对整条 import 链返回 HTTP 500)
与 `build.modulePreload: false`(1776 个 asset / ~1761 个图标微 chunk 的防预载)。
照抄该块去替换真实文件会直接复现 objectstack-ai#3575 的故障形态,所以这里不换一份"更准的
代码块"——按 §Where the Code Lives(objectstack-ai#3539)的先例改为说明形态:链接到真实
文件(该 blob/main URL 受 check-doc-links 机械校验,文件挪走即红),点名两个
不许删的面及其原因,并明确写出真实文件"没有 server 块"这一否定事实。
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Aug 10, 2026
…ation entries, and the routing-table overreach (objectstack-ai#3580)
The console has no local metadata/config file. Both guide pages taught one:
the data-flow diagram's top box named `objectstack.config.ts` and console.md's
`## Configuration` section carried a `defineStack` example. The file has zero
hits in `git ls-files` — it is an ObjectStack *server* project file, not a
console one — so both pages are rewritten to the measured boot inputs:
VITE_SERVER_URL, the server-pushed runtime config resolved before mount, and
metadata fetched over HTTP via the adapter's discovery + metadata client.
console.md's Key Features row repeated the same ghost and is corrected too, so
the page does not contradict itself.
`apps/console/tsconfig.json` listed the same nonexistent file in `include`.
The entry is inert (a glob-less literal that matches nothing is ignored):
`tsc --listFilesOnly` yields an identical 472-file list with and without it,
so removing it is pure cleanup.
Section 4's Entry Points listed three ways to reach app creation; none are
reachable. The sidebar's "Add App"/"Edit App" items live in AppSidebar, which
ConsoleLayout no longer mounts (it renders UnifiedSidebar); the command
palette never registered a create-app command. Rewritten to the real story —
AI-first builder, Studio, and the wizard routes as legacy deep links.
The routing table stays a curated subset rather than being completed: the real
tree is ~34 shell paths plus ~38 console paths against 7 documented rows, so
per the objectstack-ai#3539 precedent the fix is to point at the two declaring route trees
instead of growing a hand-copy that cannot stay current.
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

console.md 的 Folder Structure 代码块整体过期:列出的 8 个文件/目录有 7 个已不存在

2 participants

@yinlianghui@claude