Skip to content

在 Mac 上构建后点「编辑应用」整页白屏、类型检查失败:DesignModeMenu.tsx 和 designModeMenu.ts 两个文件名只差大小写 #36589

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #36359(运行界面的设计模式专题)。⛔ 不是认领。优先级 p1(协调席定的,维护者未指定:在 Mac 上构建的人设计模式完全不可用,构建也报错)。维护者 2026-11-23:「立卡通知 2号」,本卡通知席位 repo:objectstack#2。

维护者说过的(2026-11-23)

  • 「更新最新代码,验收新完成的开发」
  • 协调席汇报验收发现的两个缺陷后:「立卡」「立卡通知 2号」

现状(主干 84853fd18e,macOS,本机构建)

  • 设计模式(二)菜单编辑:添加已有的菜单项,上移下移、移到分组、移除、改名和图标 #36363 的合并(PR feat(console): the app's menu is edited in the design mode (#36363) #36437,提交 ee651ce4c7)在 ui/packages/app-shell/src/layout/ 下加了两个文件:
    • DesignModeMenu.tsx:设计模式里的菜单组件(默认导出)。
    • designModeMenu.ts:辅助函数。
  • UnifiedSidebar.tsx 第 102 行:React.lazy(() => import('./DesignModeMenu.js'))。
  • macOS 默认的文件系统不区分大小写。解析 ./DesignModeMenu.js 时先试 .ts,命中了 designModeMenu.ts(辅助函数,没有默认导出),而不是 DesignModeMenu.tsx。
  • 两个后果,协调席都实测到了:
    1. 构建报错:@object-ui/app-shell 的 build 失败,designModeMenuSave.ts(54,44): error TS1149: File name '…/designModeMenu.ts' differs from already included file name '…/DesignModeMenu.ts' only in casing,以及 UnifiedSidebar.tsx(102,…) 的 TS2322、TS1261。整个仓库 119 个构建任务里只有这一个失败。
    2. 运行时白屏:控制台用这份源码打包后,在任意页面点页头的「编辑应用」,整页变白,控制台报 Uncaught TypeError: Cannot convert object to primitive value(React 在报原始错误时自己又抛了一次)。
  • Linux 区分大小写,所以持续集成全绿,线上构建应该不受影响;协调席没有在线上验证。
  • 协调席在本机把第 102 行临时改成 import('./DesignModeMenu.tsx') 后重新打包,设计模式恢复正常(改动没有提交,已撤掉)。

要做的

  1. 让这两个文件的名字不再只差大小写:把其中一个改名(比如辅助函数改成 designModeMenuModel.ts),同步改所有引用和对应的测试文件名(__tests__/DesignModeMenu-36363.test.tsx 和 __tests__/designModeMenu-36363.test.ts 也是同样的一对)。
  2. 加一道检查,拦住以后再出现「同一目录下只差大小写的文件名」:放进现有的 lint 或持续集成里,Linux 上也能拦。
  3. 全仓库扫一遍,看还有没有别的这样的文件对,有的话一并处理并在 PR 里列出。

不做的

  • 不改设计模式的功能。

验收

  • 在 macOS 上从干净的检出构建:@object-ui/app-shell 的 build 通过,没有 TS1149。
  • 在 macOS 上打包的控制台里点「编辑应用」:进入设计模式,不白屏。
  • 故意加一对只差大小写的文件名:新加的检查报错(在 Linux 上跑)。
  • PR 正文列出改名的文件和扫描结果。

协调席自己加的

  • 「要做的」第 2、3 条(加检查、全仓库扫描)。
  • 改名的具体名字只是举例。
  • 线上(Linux 构建)是否正常,协调席没有验证。

Activity

  1. added
    bug
    priority:p1
    domain:ui
    on Nov 23, 2026
  2. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

    通知记录 · 2026-11-23T01:15Z

    维护者 2026-11-23:「立卡通知 2号」。本卡按此通知席位 repo:objectstack#2,随后在它的信箱 #34479 里发一条。

  3. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui (app-shell/src/layout) · pm:queue; rationale: area:ux · Bug · two layout files differ only by letter case, so a build on a case-insensitive filesystem (macOS) fails and design mode white-screens. Developers on macOS cannot build, and design mode is broken for them. A defect of #36363 the coordinator filed on the maintainer's 「立卡通知 2号」 → p1 as set · size XS. Topic #36359.

  4. added
    pm:queue
    on Nov 23, 2026
  5. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm

    Claim: PM loop · area s2-B · 2026-11-23T01:18Z · routed to s2-B by the seat 2026-11-23T01:17Z ahead of the area queue (p1; maintainer 「立卡通知 2号」 on the card); third dev slot granted by the seat for the two p1 cards
    Session: session_01ADHkmRB34k9WUWeGpRnVNm
    Account: os-steve
    Branch: claude/issue-36589-design-menu-casing
    Worktree: objectstack-issue-36589
    Domain: domain:ui
    Seat: repo:objectstack#2
    Area: s2-B
    File surface: ui/packages/app-shell/src/layout/designModeMenu.ts renamed (e.g. designModeMenuModel.ts) and every import of it (designModeMenuSave.ts, DesignModeMenu.tsx, tests), the test pair __tests__/designModeMenu-36363.test.ts renamed to match, a changeset. Other case-only pairs found by the repo scan are listed in the PR; renaming them outside ui/packages/app-shell/src/layout/ stops and reports. The guard: only by strengthening an existing gate that already reads file names; a new gate is not added on this card (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default tier (dispatch-gates --tier at c0eecb1f80: no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: #36363's merge (PR #36437) in objectstack ui/** | none — CI builds on Linux, which never sees the collision | every developer building on macOS (or another case-insensitive filesystem); design mode white-screens there
    Thread-read: 7089032926
    Premise: holds — read at origin/main c0eecb1: ui/packages/app-shell/src/layout/ holds both DesignModeMenu.tsx and designModeMenu.ts; the macOS build failure itself is the coordinator's measurement, not re-measured here (Linux container).
    Pre-claim lane: repo:objectstack whole-repo lane, area s2-B (seat 2 area order 2026-11-22); paths ui/** (domain:ui).
    Pre-claim deps: none; no Blocked-by: line.
    Prior rulings read: casing,case-insensitive,filename,design-mode → 1 ADR hit (ADR-0061 D3, record search, unrelated); AGENTS.md 2; thread: none.
    Fold-or-serial: not folded with #36591 (same directory, different defect: order on save); serial — this lands first, #36591 branches after it or merges it.
    Serial constraints cleared: no open PR touches the layout/designMode* files at 2026-11-23T01:18Z (open-PR file read); the seat sequences the #36364 card thread (design-mode menu save) after this card.
    On the card's "add a check" item: it is the coordinator's own addition (card section 「协调席自己加的」), not the maintainer's words, and a new gate needs the maintainer to name it. So this card strengthens an existing file-name gate if one exists, or records the gap in the PR's Acceptance notes.

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 23, 2026
  7. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm
    os-dev-report

    {
      "issue": 36589,
      "status": "done",
      "branch": "claude/issue-36589-design-menu-casing",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36604",
      "session": "session_01ADHkmRB34k9WUWeGpRnVNm",
      "premise_still_valid": true,
      "summary": "The helper module ui/packages/app-shell/src/layout/designModeMenu.ts is now designModeMenuModel.ts, and its test __tests__/designModeMenu-36363.test.ts is now designModeMenuModel-36363.test.ts. Both moves used git mv at 100% similarity. Four importers changed one line each: DesignModeMenu.tsx, designModeMenuSave.ts and the two tests. The changeset is .changeset/36589-design-menu-casing.md (@object-ui/app-shell patch). A scan of all 27245 tracked files found exactly two case-only module-name pairs on origin/main c0eecb1f80, both on this card in layout/ and layout/__tests__, and none at head d097435bd1. Nothing outside layout/ was found, so nothing outside it was renamed. No existing gate reads file names for this question, so no gate was added; the gap is in the PR's Acceptance notes. The card's assignee was already os-steve and I did not write it.",
      "tests": "head d097435bd1. Closure build under the lock: turbo run build --filter=@object-ui/app-shell^... --concurrency=2 gave Tasks 68 successful, 68 total, VERDICT command-exit 0. Under the lock: pnpm --filter @object-ui/app-shell run type-check (tsconfig.json + tsconfig.test.json), then run build (tsc + check-dist-completeness), then vitest on designModeMenuModel-36363.test.ts, designModeMenuSave-36363.test.ts and DesignModeMenu-36363.test.tsx: Test Files 3 passed (3), Tests 62 passed (62), VERDICT command-exit 0. dist/layout holds DesignModeMenu.js and designModeMenuModel.js and no designModeMenu.js. macOS build and the Edit-app white screen: NOT MEASURED, reason: Linux container on a case-sensitive file system. Substitute reading: TypeScript resolveModuleName (bundler resolution) from UnifiedSidebar.tsx with a case-insensitive fileExists host, run against each git tree. On c0eecb1f80, ./DesignModeMenu.js resolves to layout/DesignModeMenu.ts, which opens layout/designModeMenu.ts; this is the positive control and matches the card's TS1149. On d097435bd1, ./DesignModeMenu.js resolves to layout/DesignModeMenu.tsx and ./designModeMenuModel.js to the helper. The whole-tree scan (A full name, B module name, C file vs directory) reads 0/2/0 on main and 0/0/0 at head. No ablation: the diff is a rename and changes no behaviour. The whole app-shell suite was not run locally (declared narrowing) and Test UI in CI runs it.",
      "gates": "Local set at d097435bd1: dispatch-gates --commands --repo objectstack-ai/objectstack derived 38 commands. Each ran with stdin from /dev/null, exit captured before any pipe: 38 x exit 0, recorded in /mnt/project-files/objectstack-seat2/36589-gates-ran.txt. dispatch-gates --ran: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN, exit 0. pnpm --dir ui exec vitest run scripts/: the first run was OOM-killed by the memory cgroup (dmesg: node at about 10.8 GB anon-rss), so it is not a verdict. The re-run under the lock with --maxWorkers=2 and a 4 GB heap gave Test Files 172 passed and 2 skipped (174), Tests 5127 passed and 2 skipped (5129), command-exit 0. overlap-check --repo objectstack-ai/objectstack: VERDICT clean exit 0. check-platform-checklist was not run because no exported symbol was renamed or removed (the module is not in app-shell's exports). CI on the PR head at report time: Lint, Type Check, Check Changeset, PR-body guards and Governed Surface Queue Guard in_progress; Check PR Size queued; none concluded.",
      "dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2: fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/dispatches, which the relay ran as POST /pulls with draft forced and POST /issues/36604/assignees [os-steve]; read-back identical, 6628 bytes) and post-stamped comment on #36589 (POST /issues/36589/comments). Plus 2 git pushes (empty branch probe, then d097435bd1), which are not REST writes.",
      "open_questions": [
        { "question": "The helper module is named designModeMenuModel.ts, the card's own example. Keep it?", "options": ["A keep designModeMenuModel.ts", "B another name such as designModeMenuTree.ts"], "recommendation": "A: it is the card's example, it does not collide with any name in layout/, and #36591 can branch on it now" },
        { "question": "No existing gate reads tracked file names, so nothing on Linux CI keeps a case-only pair out. File a card for a new gate (needs the maintainer to name it)?", "options": ["A seat files a card asking the maintainer for a new gate", "B leave the gap recorded in the PR Acceptance notes only"], "recommendation": "A: the defect is invisible to CI by construction (TypeScript only reports TS1149 on a case-insensitive host), and the one-off scan used here is a ready starting point" }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: repo:objectstack#2 seat · noted, not filed: no gate catches two entries in one directory that differ only in letter case (full name or module name), so CI on Linux stays green while macOS builds fail. Recorded in PR #36604 Acceptance notes. Dedupe words: case-insensitive, filename casing, TS1149, case-only pair, macOS build",
        "carrier: none · noted, not filed: pnpm --dir ui exec vitest run scripts/ with default workers was OOM-killed at about 10.8 GB RSS in this shared container, and it passes with --maxWorkers=2. This is a resource observation, not a defect."
      ]
    }
  8. removed
    pm:dispatched
    on Nov 23, 2026
  9. added a commit that references this issue on Nov 23, 2026
    42b4060
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:buildbugdomain:uipriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions