From 26e363de6cdeddce4f47849558fb333282606ede Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 03:20:42 +0000 Subject: [PATCH] =?UTF-8?q?docs(guide):=20=E5=88=A0=E6=8E=89=20console.md?= =?UTF-8?q?=20=E5=B7=B2=E6=95=B4=E4=BD=93=E8=BF=87=E6=9C=9F=E7=9A=84=20Fol?= =?UTF-8?q?der=20Structure=20=E7=9B=AE=E5=BD=95=E6=A0=91=20(#3534)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 那一块自称描述 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 Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt --- content/docs/guide/console.md | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/content/docs/guide/console.md b/content/docs/guide/console.md index 2829781aa..f7658dc7e 100644 --- a/content/docs/guide/console.md +++ b/content/docs/guide/console.md @@ -97,29 +97,11 @@ export default defineStack({ Leave it empty (`VITE_SERVER_URL=`) to use the same origin — the right setting when an ObjectStack server serves the console itself. 2. The console will use the ObjectStack client to discover metadata and perform CRUD operations against the server. -## Folder Structure +## Where the Code Lives -``` -apps/console/ - src/ - App.tsx # Root component + routing - dataSource.ts # ObjectStackAdapter wrapper - components/ - AppHeader.tsx # Top navbar (breadcrumbs, connection status) - AppSidebar.tsx # Left sidebar (app switcher, navigation tree) - CommandPalette.tsx # ⌘+K command bar - ConsoleLayout.tsx # AppShell wrapper - ObjectView.tsx # Object list view (wraps plugin-view) - RecordDetailView.tsx # Single-record detail view - pages/ - CreateAppPage.tsx # App creation wizard page - EditAppPage.tsx # Edit existing app page - context/ - ExpressionProvider.tsx # Expression evaluation context - hooks/ - useBranding.ts # Delegates to @object-ui/layout - useObjectActions.ts # CRUD action handlers -``` +Most of what you see in the console does not live in `apps/console`. The shell and layout, sidebar, header, command palette, object list and record detail views all ship from **`packages/app-shell`** (`@object-ui/app-shell`), so any host application can mount the same experience; the heavier view surfaces (grid, kanban, calendar, charts, designer) come from the `@object-ui/plugin-*` packages. + +`apps/console` is the assembly layer on top: it owns the route tree, registers the plugin set, wires the backend connection, and adds the surfaces specific to this app (auth pages, the docs portal, system and settings pages). So when you want to change something you *see* in the console, look in `packages/app-shell` first. ## See Also