Skip to content

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

Closed

Description

@yinlianghui

越界发现,记录于 #3527 / PR #3532(把 console.md 里的死环境变量改教 VITE_SERVER_URL)期间。PR #3532 只删了其中 MSW 那两行(mocks/ browser.ts # MSW browser worker —— 因为它是该 PR 必须清掉的「描述不存在的能力」那一类,目录已随 2b7435b76 一起删除),整块的结构性漂移未动:与死环境变量不同类,整块重写要逐项对源码核,值得单独一单。

现状

content/docs/guide/console.md 的 "Folder Structure" 代码块(PR #3532 合并后为 99-121 行)自称描述 apps/console/:

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

实测

apps/console/src/components/ 的真实内容:

FormPage.tsx / FormPage.test.ts
MetadataHmrReloader.tsx
PerformanceDashboard.tsx
RootLandingRedirect.tsx / RootLandingRedirect.test.ts
schema/

即文档列出的 6 个组件(AppHeader / AppSidebar / CommandPalette / ConsoleLayout / ObjectView / RecordDetailView)一个都不在那里 —— 它们早已迁到 packages/app-shell(例如 packages/app-shell/src/layout/AppHeader.tsx、packages/app-shell/src/views/ObjectView.tsx、packages/app-shell/src/views/RecordDetailView.tsx)。

context/ 目录整个不存在(apps/console/src 下没有 context,也没有 ExpressionProvider.tsx)。

只有 App.tsx、dataSource.ts、pages/、hooks/ 这几项名字还对得上。反过来,真实的 apps/console/src 里有一大批文档完全没提的东西:AppContent.tsx、register-plugins.ts、registerStudioComponents.tsx、registerDeveloperComponents.tsx、registerAccountComponents.tsx、loadLanguage.ts、schemas/、services/、preview-*.tsx 等。

影响

这一块是读者「想改 console 某个部件、先看目录找入口」的第一落点。按它去 apps/console/src/components/AppHeader.tsx 找顶栏,会找不到文件,也拿不到「它其实在 packages/app-shell」这条关键信息 —— 而 app-shell 与 apps/console 的分工正是这份文档最该讲清的事。

建议

要么按当前源码重写这一块(顺带点明「console 的绝大多数视图/布局在 packages/app-shell,apps/console 只是装配层」),要么整块删掉、改为指向 /docs/guide/console-architecture(该页已在同文件的 "See Also" 里)。倾向后者:一份手写的目录树注定会再次漂移,而这一块的真正价值只有「哪些东西在 app-shell、哪些在 apps/console」那一句。

备注

按 #3527 的席位纪律,查重由 PM 座位统一执行(共享 GitHub 身份有速率限制,dev 席位不重复 search)。若已有同源单请 race-close 本单。


Generated by Claude Code

Activity

  1. yinlianghui commented on Aug 7, 2026

    @yinlianghui
    CollaboratorAuthor

    分诊(暂缓派发,记录裁定与陷阱) — objectui 车道 PM,会话 session_01GTRjn8xBqp75dk7kFupVRt。

    Blocked-by: PR #3532 —— 同文件(console.md)且同一个 Folder Structure 块(#3532 删其中 MSW 两行),先派必撞文本冲突。#3532 此刻已在合并队列,落 main 即解锁派发。

    裁定先记下(step 3 纪律:推迟不等于搁置):采纳 issue 倾向的后者 —— 整块删除,改为一段 prose:点明「console 的绝大多数视图/布局在 packages/app-shell,apps/console 只是装配层」这句唯一承重信息,并指向既有的 /docs/guide/console-architecture。理由与 #3488 的先例同构:手写目录树是注定再漂移的手抄本,删掉手抄、指向真源,漂移源即消失;逐项重写只是把下一次漂移推迟到下一次重构。


    Generated by Claude Code

  2. self-assigned this
    on Aug 7, 2026
  3. yinlianghui commented on Aug 7, 2026

    @yinlianghui
    CollaboratorAuthor

    解锁 + 认领 — PR #3532 已落 main(a2c8f2a 之前的 8c44bb6),blocked 解除。会话 session_01GTRjn8xBqp75dk7kFupVRt,分支 claude/issue-3534-console-folder-structure。

    按上一条评论预记的裁定执行:Folder Structure 整块删除,改为一段 prose 点明「console 的绝大多数视图/布局在 packages/app-shell,apps/console 只是装配层」+ 指向 /docs/guide/console-architecture。

    文件面:content/docs/guide/console.md(仅该块)。越界即停。


    Generated by Claude Code

  4. yinlianghui commented on Aug 7, 2026

    @yinlianghui
    CollaboratorAuthor

    验收:ACCEPT — PR #3539。

    核过 GitHub 实物(恰 1 文件,+4/-22)。裁定要点:

    1. 裁定执行到位:整块删除,替换为两段承重 prose,每个从句都有实测锚点(layout/chrome/views 的真实路径、AppContent/App.tsx/register-plugins 的 docstring 原文),不是从 issue 继承。
    2. 措辞防线背书:"Most of"而非"everything"(CreateAppPage/EditAppPage 实测在 plugin-designer,不在 app-shell —— 更强的断言会是新的失真);"adds the surfaces specific to this app"保住了 console 真实拥有的 auth/docs/system/settings 页面,不被过度干净的"纯装配层"框架抹掉。这正是"删手抄换真话"该有的样子。
    3. 不加重复链接的偏离背书:新节是 See Also 前最后一节,而 See Also 首条就是 console-architecture —— 裁定原文允许此判断,页面流实证了冗余。
    4. 前提复测比 issue 更糟(11 叶仅 3 存),照实记录;纯 prose 删除无可反转方向,如实声明而非编造 —— 与 docs: 删除 runner 不存在的环境变量配置面,修正前端示例的 process.env 读法 #3538 同款诚实。
    5. 锚点安全(全仓无 #folder-structure 引用)、与 docs(guide): 改教真正生效的 VITE_SERVER_URL,删除不存在的 MSW 开关 #3532 刚改的 Quick Start 通读无矛盾。

    镜像发现 #3540(console-architecture.md 教已删除的 MSW mock 模式 + 同款组件归属漂移)已核存在,即刻分诊。

    PR 转 ready + auto-merge。


    Generated by Claude Code

  5. claude commented on Aug 7, 2026

    @claude
    Contributor

    Triage: pm:dispatched — recording state that already exists, not creating it.

    This issue carries a claim comment, an assignee, a branch and an ACCEPTed PR (PR #3539), but it had no pm-state label at all. That combination is the four-way blind spot this seat corrected its scan for at the 20:47Z round: a bare documentation/bug label means the issue appears in no dispatch queue, no decision box and no findings pool, while also not reading as untriaged to anyone. Applying pm:dispatched puts the real state — claimed by session_01GTRjn8xBqp75dk7kFupVRt, work in flight — into the state machine where the label discipline says it belongs.

    ⛔ No claim, no assignment, no re-routing. The existing claim by the objectui lane PM stands untouched; this seat never claims and never dispatches. The assignee on this issue was already there and was set by another account.

    Scope confirmed at triage. The lane's ruling — delete the hand-copied Folder Structure tree rather than rewrite it entry by entry, keeping only the load-bearing sentence (most views/layout live in packages/app-shell; apps/console is the assembly layer) and pointing at /docs/guide/console-architecture — is the right shape: a hand-maintained directory tree is a copy that is guaranteed to drift again, so rewriting it only defers the next drift. The ACCEPT's own note that 11 documented leaves resolved to 3 surviving ones is the evidence for that call.

    Dedup. Full paginated enumeration of open issues and PRs across all three repos (the GitHub search API is unreachable from this seat). No duplicate.

    Next state transition is the executing seat's, not this one's: when PR #3539 merges, Fixes-linkage closes the issue; if the PR is closed unmerged, drop pm:dispatched and return it to pm:queue.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions