docs(console): 清掉 objectstack.config.ts 幽灵、重写已死的建应用入口、诚实框定 Routing 表 - #3580
Open
yinlianghui wants to merge 1 commit into
Open
docs(console): 清掉 objectstack.config.ts 幽灵、重写已死的建应用入口、诚实框定 Routing 表#3580yinlianghui wants to merge 1 commit into
yinlianghui wants to merge 1 commit into
Conversation
…ation entries, and the routing-table overreach 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 #3539 precedent the fix is to point at the two declaring route trees instead of growing a hand-copy that cannot stay current. 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. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 7, 2026 14:19
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 #3543
在 #3544 / #3539 合并后的主干(
b785a77b3)上逐条复核了三项前提再动手,复核详情见 issue 上的复核评论。一条前提已过期,一条归因需修正,其余成立。(一)
objectstack.config.ts幽灵 —— 两页一次清console 没有任何本地元数据/配置文件,但两页都在教一个:数据流图顶框写着
objectstack.config.ts (defineStack → apps, objects, views),console.md 的## Configuration还配了整段defineStack示例。该文件git ls-files零命中。关键修正:这个文件名并非全无所指 —— 它是 ObjectStack 服务端项目的配置文件(见
objectos-integration.mdx,以及 i18n 里 manifest 冲突提示「请先从 objectstack.config.ts 中移除」)。所以两页都不写成「此文件不存在」,而是写成「它不属于 console」,并指向服务端。替换成实测到的真实启动输入(按角色写,不按路径):
VITE_SERVER_URL—— 唯一由 console 自己拥有的设置apps/console/src/main.tsx:63、.env.development;喂给 adapter 的baseUrl与 runtime-config 取数main.tsx挂载前initRuntimeConfig(SERVER_BASE)→runtime-config.ts:160→GET /api/v1/runtime/configAdapterProvider.tsx:62-80造ObjectStackAdapter({ baseUrl: VITE_SERVER_URL })并connect()(一次/api/v1/discovery,按 baseUrl 缓存),再由 MetadataProvider 按需拉取越界一处,请复核:文件面写的是 console.md「仅 Configuration 段」,但实测发现同一页
console.md:24的 Key Features 表里还有第三处同源幽灵(「Switch between apps defined inobjectstack.config.ts」)。只清 Configuration 段会让这一页自相矛盾 —— 正是本单要求「两页一起改」所要避免的失败模式,只是缩到了一页之内。因此一并修正(单行、同缺陷类、同文件),在此显式声明。apps/console/tsconfig.json的死 include 条目一并删除。(二)§4 Entry Points —— 三条入口全部不通
add-app-btn/edit-app-btn仍在AppSidebar.tsx:395,401,但ConsoleLayout只挂UnifiedSidebar—— 组件整体无挂载点createApp/create-app/Create New App在CommandPalette.tsx均零命中,该命令从未注册AppContent.tsx:577),但跳转目标断链 —— 另见下文归因修正:原单引用
AppSidebar.tsx的「Entry point removed」注释作为 sidebar 入口被撤的依据。实测该注释在AppSidebar.tsx:326-328,位于系统导航项列表的items.push(...)内,管辖的是那份系统导航,并不管 395/401 行的应用切换器下拉菜单(其代码仍在)。两条事实指向同一结论(入口不可达),但真实原因是组件没被挂载,不是「入口已从组件里删掉」。文档按后者口径写。改写后按 AppSidebar 注释的产品口径给出真实路径:AI-first builder(
/home的 Build with AI,依服务端是否部署 build agent 而定)、Studio,以及作为 legacy deep link 保留的 wizard 路由。空态 CTA 未写进新的入口清单,因为它在 console 里是断的(见下)。(三)Routing 表 —— 选「诚实框定」,不逐条补全
原单点名的「a simple flat route structure」一句已在 #3544 中消失,这半条前提已过期。剩余的「表不全」成立并已量化:
packages/app-shell/src/console/AppContent.tsx:47 个Route(34 个去重路径)apps/console/src/App.tsx:42 个Route(38 个去重路径)逐条补全等于把 70+ 条路由手抄进 markdown,下次改路由必然立刻过期。按 #3539「删手抄、指真源」先例,明确选择诚实框定:声明该表是 object-facing 的精选子集而非清单,并点名两处真源路由树各自负责什么。表内 7 行已逐条复核,全部存在且路径正确,予以保留(它们是「元数据如何变成页面」的最小可读集)。
验证
预测:三项门禁改动前后都应为绿(纯文档 + 一条惰性 tsconfig 条目);tsconfig 那条的预期方向是「什么都不动」,这与常见的「把删掉的分支放回去看它变红」相反 —— 该条目是 glob-less 且匹配不到文件的字面量,tsc 静默忽略,所以「无变化」本身就是它可安全删除的证据。实测与预测一致:
tsconfig 惰性性质的反向验证(先预测后跑):把幽灵条目放回一个临时 tsconfig,对比
tsc --listFilesOnly的文件清单 —— 预测「完全相同」,实测 472 行 vs 472 行,diff 为空。该 include 条目确实不影响任何编译输入。两页改后通读:彼此一致(同一套 VITE_SERVER_URL + 服务端下发配置 + HTTP 取元数据的说法,且都指向 objectos-integration 讲服务端形态),与 #3532 / #3539 / #3544 的既有措辞一致。
无 changeset:纯文档 + dev-only 的 tsconfig include 清理,无用户可见运行时变更(
changeset-guard只由.changeset/**触发,ci.yml/lint.yml把**/*.md列入 paths-ignore)。未触碰content/docs/releases/。越界发现(只报不改)
已另立 #3573:空态「Create Your First App」CTA 在
apps/console里断链 ——AppContent.tsx:577走navigate('/create-app')(绝对路径),而App.tsx根路由树没有/create-app,末尾path="*"把它重定向回/。因此文档原列三个入口实际三个都不通(原单判断为「至少两个」)。属代码侧缺陷,不在本单文件面内。原单记录的 observation-class「
AppSidebar仍导出但无挂载点」按分诊要求未修、未另立单,继续留在 #3543 里待下轮定去留。🤖 Generated with Claude Code
https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
Generated by Claude Code