Skip to content

feat(console): the app's menu is edited in the design mode (#36363) - #36437

Merged
os-zhuang merged 13 commits into
mainfrom
claude/project-thread-iqvhau
Nov 22, 2026
Merged

os-zhuang merged 13 commits into
mainfrom
claude/project-thread-iqvhau

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

repo:objectstack#7 · zhuangjianguo · session_01QsR2jSr8sNCnJrK6Q9kEF5

Fixes #36363

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:管理员进入设计模式后,左侧菜单变成可编辑:每个分组底部有「添加菜单项」,点了先在那个位置占一行虚线框,再弹出选择面板(搜索框,按对象、视图、仪表盘、报表、页面、链接分类,只列已经存在、还不在菜单里的);每一项鼠标移上去右边有「⋮」:上移、下移、移到分组、在前面或后面加一项、改名和图标、从菜单移除;也可以直接拖动。改动都等设计模式的「保存」一起写入并发布,所有成员都能看到;「取消」全部丢掉。安装来的应用(只读包)现在也能进入设计模式,改动存为本环境的定制。保存写的是应用存储的菜单,不是当前用户看到的那份:中文界面下保存不会把中文名写进菜单,管理员看不到的条目也原样保留,只改动管理员动过的那几项。改名只在部署的默认语言下开放(且该项显示名就是存储名),其他语言下名称框禁用并提示「菜单名称需在应用的源语言下修改」;新增、移动、图标在任何语言下都能改。其他包追加进菜单的条目(例如 HotCRM 收入模块的报价、产品)在这里不能移动、改名或移除,「⋮」里会说明要到那个包里改。有未保存的菜单改动时,切到别的应用、关闭或刷新页面会先弹出外壳原有的未保存提示(留在这里 / 放弃并离开),选「留在这里」改动还在;没有改动时照常直接切换。
  • 为什么做:维护者要求菜单在运行界面里直接改,不再去 Studio;这是设计模式这条线的第二张卡。
  • 出错会怎样:最坏情况是保存后菜单顺序或条目不是管理员想要的,再进设计模式改回即可;「移除」只是不在菜单显示,东西本身不删;若同一应用在 Studio 里有未发布的草稿,保存会拒绝并说明原因,不会覆盖别人的草稿。
  • 要你做什么:无。翻译名称的写入(在非默认语言下改名)和服务端声明应用源语言是后续卡 design mode: a menu rename in a non-source language is stored as that language's translation (console translation write path + source locale on /i18n/locales) #36504,本 PR 不做。一处与 ADR-0146 D5 不同的地方已由席位记入修订卡:安装来的应用,管理员页头的入口从「在 Studio 中查看」变成「编辑应用」(进入设计模式),这是本卡第 7 条的要求。这只是过渡:按你新定的 设计模式入口搬到左上角应用名菜单;页头的「编辑应用」「在 Studio 中查看」两个按钮去掉,自建应用和安装来的应用一样 #36485,设计模式入口会移到左上角应用名菜单,页头这两个按钮会去掉,由那张卡来做;本 PR 只改了现有按钮的一个判断,没有新做按钮。

What changes

While the design mode (#36362) is on, the sidebar draws the app's menu with its editor (layout/DesignModeMenu.tsx), instead of the plain menu.

  • Add menu item. Each group, and the menu's top level, ends with 「Add menu item」. Pressing it holds a dashed row 「Choose a menu item…」 at that place and opens a picker: a search box over every kind, then the kinds Objects, Views, Dashboards, Reports, Pages and Link. A kind lists what exists and is not in the menu yet (designModeMenu.ts targetKeyFor / entryForTarget, one key per thing the menu opens); a record page is never offered. Picking one puts it in the held row.
  • The entry's 「⋮」 menu: move up, move down, move to group (a submenu of the other groups and the top level), add an item before or after, rename and icon, remove from the menu. Removing takes the entry off the menu only; the picker offers it again.
  • Rename only in the source language (seat ruling (4) on review 7081226692). The name field of 「Rename and icon」 is open when the session language is the deployment's default (GET /api/v1/i18n/locales, the descriptor marked isDefault; compared case-insensitively, en matching en-US) and the entry's shown label equals its stored label. Otherwise it is disabled with the hint 「Menu names are changed in the app's source language」, and only the icon is written. Adding, moving and the icon stay open in every language. The stored labels are taken to be in the default language because the server states no source language of its own: /i18n/locales exposes isDefault only, not i18n.sourceLocale. That gap, and the console's write path for a translation, are follow-up design mode: a menu rename in a non-source language is stored as that language's translation (console translation write path + source locale on /i18n/locales) #36504.
  • Another package's entry (its manifest's navigationContributions, appended to the app when it is served, found live on HotCRM) is not in the app's stored menu. Its 「⋮」 says 「Another package adds this item. It is moved, renamed or removed there.」, its move, rename and remove items are disabled, and it is not dragged; adding an item before or after it stays open. No entry is moved past it either: 「Move up」 or 「Move down」 into its place is off, and a drop onto it does nothing (its place is that package's). Such entries close their group when the app is served, so an own entry added or moved at or past them is stored and served before them; the editor draws it there too: the group's 「Add menu item」, 「Add an item after」 on such an entry, 「Move to group」 and a drop on the group's end land before them (L1-e review 7083961269 item 1). This holds once the editor's stored-menu read has landed, in a group the app's own menu holds; a group another package adds (N9) and the moment before that read (N10) are on follow-up design mode menu save: id-less twins, a 404 stored read, moves into a contributed group, and no version pin #36538. The click a drag ends with opens nothing (item 2, and review 7084606001): once a pointer drag is active, dnd-kit stops that click in the document's capture phase without cancelling it, so after a drop the editor refuses (onto another package's entry, which leaves the dragged link under the pointer) the link's default ran as a full page load and the mode was lost. The editor cancels that click on the window in the capture phase, which runs before dnd-kit's listener. An entry's link is also not natively draggable. The drag's end is also stamped from the pointer's own release on the window, and a new press clears it, because dnd-kit reports an end only after the start has rendered and a fast flick could otherwise leave every link shut (review 7085270448 S3). The save holds the same rule on its own, so it stands when the editor's stored read failed. Without this, a moved contributed entry would have been written into the app's menu and then served twice (the contribution is appended again, with no de-duplication), and a removed one would silently stay.
  • Drag moves an entry within its group or to another group (dnd-kit, pointer and keyboard). In the mode, Enter or Space on a focused entry picks it up for a keyboard move (dnd-kit's keyboard sensor) rather than opening its page; a click opens it.
  • Staged with the mode. Every edit is staged under one key (app-menu:<app>); 「Save」 writes it, 「Cancel」 drops it. The picker tells what is already in the menu by one key per thing it opens, spelled kind/name (object/crm_lead, view/…); they are compared only with each other and are no cache key.
  • The save writes the stored menu, never the served one (review 7081226692). The served app is translated for the reader (translateApp) and pruned of entries the reader may not open (filterNav), so writing it back would store the reader's language on every label and drop what the reader was not shown. The save reads the app as stored (the layered read, /layers?package=…, which serves a caller who may write the app its stored version, unpruned and untranslated: effective ?? code) and replays the edits on its navigation by entry id (designModeMenu.ts rebaseMenuEdits): an entry removed is removed; an entry added is put after the entry before it in the edited menu; an entry moved (to another group, or out of the order its group's other entries kept, found as the longest common run per group, so a removal beside an entry does not move it) is taken out and put back after the entry before it; an entry whose own keys changed has only those keys written. Every other stored entry, an entry the reader was never shown included, is the same object. A stored entry is matched to its served copy by id only when both name the same thing (type and target); otherwise, and for a stored entry without an id, by its group, type and target, in order (the editor gives served entries without an id the first free nav_item_<n> of what the reader was shown, which a stored entry pruned from the reader can already hold). Nothing the stored menu does not hold is ever written from its served copy: an entry another package contributes, or one that has left the stored menu since it was read, is not moved, patched or written, and takes no part in the order comparison; only an entry the served menu does not hold is an addition, and one whose id a stored entry holds is written under a fresh nav_item_<n> (the picker also mints ids against the stored menu). An entry naming no target is left out (navPayloadOf, as Studio's nav save).
  • Where the save (designModeMenuSave.ts) writes the app with its new navigation is where Studio's menu editing writes it (objectstack#30059, ADR-0146 D2/D3): the app's own package when the server lists it writable, else its paired customization package (asked of the ensure door, which creates it on first use), the body declaring the override at the base's listed version. The base's version is checked before the ensure door is asked, and a pair the server answers not writable is refused before anything is written to it. It is written by the runtime's confirmed-save rule: a draft with the first-write pin (a draft already pending, from Studio say, is refused and said, never overwritten nor published), then publish; a refused publish discards the draft this save wrote. A landed publish refreshes the console's metadata, so the menu re-reads.
  • Installed apps enter the mode (ShellPageActions.tsx): in the read-only (view) posture, 「Edit app」 now enters the mode where the customization door takes the caller; where it is walled off (a walled deployment, caller not the platform operator) the eye 「Open APP in Studio」 stays. This is kept, and kept minimal: one condition on the existing header button (about 10 lines), with no new button. The maintainer has since moved the mode's entry to the app-name menu and retired the header's 「Edit app」 and 「Open in Studio」 under 设计模式入口搬到左上角应用名菜单;页头的「编辑应用」「在 Studio 中查看」两个按钮去掉,自建应用和安装来的应用一样 #36485 (card comment 7080271489). That later PR owns the installed-app path through the new entry; this PR lands first, so an installed app can enter the mode until then.
  • Leaving with unsaved menu changes asks first (the card's added requirement, comment 7079728193). Switching app from the app menu, a link out of the app, a reload or a tab close asks first while a menu change is staged; with nothing staged, nothing asks. This is the shell's one unsaved-changes prompt (chrome/unsavedEdits.ts: confirmUnsavedLeave and the beforeunload hold), which the design mode registers for every staged change since 设计模式(一)模式本身:页头「编辑应用」进入,顶上一条栏只有「设计模式」和取消、保存,跨页面保持 #36362. The menu editor stages through the mode, so no code change was needed; the new tests pin it for the menu. That prompt offers two choices: stay, or leave and drop the changes. It has no 「Save」. The comment asks for the shell's prompt where one exists, so no three-button dialog was added.
  • Outside the mode the menu is as before: no 「Add menu item」, no editor 「⋮」.
  • An app whose menu is split in areas keeps its menu unedited in the mode (the picker and the moves work on one menu tree).
  • New i18n keys under designMode.menu in every hand-written locale, zh-Hant generated.

Read first, by risk:

  1. ui/packages/app-shell/src/layout/designModeMenu.ts rebaseMenuEdits / staysInOrder / storedKeyer: the edits replayed on the stored menu.
  2. ui/packages/app-shell/src/layout/designModeMenuSave.ts: the stored read, the check order, where the write goes, and the pending-draft refusal.
  3. ui/packages/app-shell/src/layout/DesignModeMenu.tsx nameOpen / contributed: the rename rule and another package's entries.
  4. ui/packages/app-shell/src/layout/ShellPageActions.tsx: the read-only posture entering the mode, and the wall.

Tests

  • New layout/__tests__/designModeMenu-36363.test.ts: move up/down stop at the group's ends; move to a group appends, never into itself; a drop lands before/after by direction; insert clamps; rename and icon patch; one key per thing; ids are unique. Added for the review: a view named without its object is keyed as that object's view (S1); no edit returns the stored menu itself; a removal beside an entry does not move it; a move to another group takes the stored entry there; a group the stored menu lacks puts the entry at the top level's end; an id-less stored entry is matched by its target. Added for review 7082970423: a move beside another package's entry (down past it, it up past one, it to the top) returns the stored menu itself (M1); an entry moved after it left the stored menu is not written back (M1); an added entry whose id a hidden stored entry holds is written under a fresh id, the hidden one kept (S2); a served entry given the id a hidden stored entry holds is matched by its target, so removing it removes it and not the hidden one (S2). All five were red against the previous designModeMenu.ts.
  • New layout/__tests__/designModeMenuSave-36363.test.ts: writable package saved and published; read-only package saved into its customization package declaring the override at the base's version; a base with no version refused before writing; an unlisted package refused; a pending draft not overwritten nor published; a refused publish discards the draft. Added for the review: a base with no version is refused before the ensure door is called (the calls are the layered read alone) (N1); a pair answered not writable is refused before anything is written to it; a move under a zh-CN-translated menu writes the stored English labels and the untouched entries as the same objects; an entry pruned from the reader stays where it was stored; a rename writes the one key it changed; id-less stored entries are matched and written without an id; an entry naming no target is left out (N3); the session language against the default one. Added for review 7082970423: a move beside another package's entry writes none of that package's entries (M1).
  • New layout/__tests__/DesignModeMenu-36363.test.tsx: 「Add menu item」 per group and the top level, 「⋮」 per entry; 「Move up」 staged and saved; 「Move to group」; the held row and a picker offering only what exists and is not in the menu; search over every kind, no record page; remove and offer again; rename; 「Cancel」 after three edits leaves the menu and writes nothing. Added for comment 7079728193: a moved entry not yet saved makes the app switch ask, staying keeps the move, and leaving goes on and writes nothing; a reload or a tab close is held while the move is unsaved, and released once it is saved; with nothing changed, switching asks nothing. Without the mode's registration, the first two go red. Added for the review: under zh-CN with English the default, the rename's name field is disabled with the hint, and the icon alone is saved, the stored English label kept; in the default language, an entry shown under a label other than its stored one is not renamed; adding and moving stay open under zh-CN; another package's entry says where it is changed and its move, rename and remove are disabled; dropping an entry on another group's end moves it there, dropped on an entry elsewhere it takes that place, and the save writes the result (N4, through DndContext's onDragEnd). Added for review 7082970423: 「Move down」 above another package's entry is off and a drop on it does nothing; when the editor's stored read failed on entry (so another package's entry looked movable), moving it still writes none of it (M1). Added for review 7083961269: 「Add menu item」 at the end of a group that ends with another package's entry holds the row, and puts the pick, before it, and the save stores it there; 「Add an item after」 on that entry and 「Move to group」 into its group land before it; a drop on that group's end lands before it; an entry's link has draggable="false", the browser's own drag of it is refused (dragstart default prevented), and after a drag refused on another package's entry the click it ends with leaves the address as it was, while a plain click still opens the entry's page. All four were red against the previous DesignModeMenu.tsx. Added for review 7084606001, on the real event order through dnd-kit's own pointer sensor: pointerdown on the link, moves past the 5 px activation distance, pointerup, then a click on the link; the click is stopped in the document (as in the browser) and its default is cancelled. It was red against d1522bf's DesignModeMenu.tsx, whose React click handler that click never reached. Its closing plain click now asserts that the entry's page opens (N11). Added for review 7085270448 S3: a drag whose end dnd-kit never reports, then the pointer's release, leaves the links open; red against effe780.
  • ShellPageActions-36111.test.tsx: a read-only package enters the mode; under the wall it keeps the eye; a writable package under the wall still enters.
  • UnifiedSidebar.favoritesMenu-12427.test.tsx: outside the mode no 「Add menu item」 and no editor 「⋮」.
Readings at 71c8835
  • The touched test files and the 设计模式(一)模式本身:页头「编辑应用」进入,顶上一条栏只有「设计模式」和取消、保存,跨页面保持 #36362 pins beside them: 78/78 passed.
  • Related-test sweep (every test file naming UnifiedSidebar, ShellPageActions, DesignModeMenu, designModeMenu or useAppStudioEntry, 84 files): 715 passed, 1 red: sidebarGroupLabel.callSites-12795 wants every SidebarGroupLabel call site to declare the icon-mode hiding constant. Fixed in this PR (the editor's group label declares and passes it); the file re-run: 7/7.
  • type-check for @object-ui/app-shell and @object-ui/i18n: exit 0 (one new Error(message, { cause }) under the package's ES2020 lib fixed first).
  • dispatch-gates.mjs --commands derived 41 gates (the same 41 at this head). 40 exit 0 at 4bc9854d3, this tree less three fixes in ui/. pnpm --dir ui exec vitest run scripts/ was killed for memory on its first run; run alone it found 7 reds in three gates, all fixed here: a menu-kind i18n key built from a template (check-i18n-call-site-keys, check-i18n-dead-keys; now each key written whole) and a test mock binding the gate could not read as inheriting (check-vi-mock-inherit). The three files re-run: 381/381. The whole gate re-run at this head with two workers: 5,127 passed, 2 skipped, exit 0. --ran reconciliation: 41 derived, 41 run, 0 not measured, every line with its exit code.
  • overlap-check.mjs: origin/main and 10 open PRs sharing files (fix(app-shell): ⌘B / Ctrl+B does what the sidebar's expand / collapse button does #36391 shares UnifiedSidebar.tsx; the rest share locale files) all merge cleanly.

At 6516005 (the follow-up fix): the i18n pack pins counted the new keys. The German icon hint quotes its example with „“ (de-quote-pairing-3876), the Korean picker's 로딩 중… is the pack's one rendering, and the Loading group counts designMode.menu.loading (ellipsis-glyph-3878).

At 02d1fe6 (origin/main merged in, the PR was dirty): one conflict, the de quote-pair counts. Main's #36286 took 124, so the menu editor's icon hint is the 125th pair. In the i18n package at the merge, 1,625 tests ran and all passed, the count pins included. 18 files could not load in the side worktree, because workspace packages were not linked there; CI runs them. overlap-check.mjs at the merge: origin/main and 7 open PRs sharing files all merge cleanly.

At 1c271b1 (comment 7079728193, the leave prompt): DesignModeMenu-36363.test.tsx gains three cases: a moved entry asks when the app is left (stay keeps the move, leave goes on), the browser's reload or close is held while unsaved, and an untouched menu asks nothing. Each was checked red against its mutation (the registration taken out) before it went green.

At def2f64 (CI red, viewCacheInvalidation.guard): the guard forbids a view:-prefixed template anywhere in app-shell. The menu editor's target keys, which are only an identity for "this entry is already in the menu" and no cache key, are now spelled kind/name. The four touched test files, the guard included: 33/33 passed. dispatch-gates.mjs --commands at this head derives the same 41 gates. --ran: 41 derived, 41 run, 0 not measured. 40 exit 0. One exits 1: pnpm --dir ui exec vitest run scripts/ (two workers; the default run is killed for memory in this container), with 2 failures, both in date-only-zone-pins-10183. The child's case "control: an instant formats in the viewer's zone, 2026-09-01 03:00 here" in FormulaFunctions.dateOnlyZone-10866 read 11:00, the Asia/Shanghai hour. That file run alone in the forked child passes 39/39. The child's node project runs with isolate: false, the pins set process.env.TZ and never put it back, and the suite-zone case passes no zone, so it reads whichever zone an earlier pin file in the same worker left. This PR touches no date, formula or zone code; it is an order dependence among the pins, filed as #36492, not this change. overlap-check.mjs: origin/main and 5 of 6 open PRs sharing files merge cleanly; #36411 conflicts only on the de quote-pair count line (both add a pair), which whichever lands second recounts.

At aed9f08 (the rework for reviews 7081226692 and 7081253549, and ruling (4)): type-check for @object-ui/app-shell: exit 0 (after the workspace's dependency dists were rebuilt, turbo run build --filter=@object-ui/app-shell^..., 68 tasks). The three menu test files: 49 passed. packages/i18n/ and packages/app-shell/src/layout/ together: 261 files, 3,191 passed, 13 skipped. dispatch-gates.mjs --commands derives the same 41 gates. --ran: 41 derived, 41 run, 0 not measured. 40 exit 0. pnpm --dir ui exec vitest run scripts/ (run as derived, default workers, completed this time) exits 1 with the same 2 failures in date-only-zone-pins-10183 (#36492, the TZ order dependence), and nothing else: 5,125 passed. The two changeset gates and check:closed-ceremony-text were run again after the changeset text changed: exit 0. overlap-check.mjs: origin/main merges cleanly; #36351 merges cleanly; #36411 conflicts only on the de quote-pair count line, as before.

At 11b0e58 (CI's Type Check UI red at aed9f08): designModeMenu-36363.test.ts(161,49) TS7053. A new pin indexed STORED[3].children, which the test project types as {}. Only the package's main tsconfig had been run locally. The pin now casts it to Menu, as its siblings do. The package's whole pnpm run type-check (main and test tsconfigs) exits 0, and the file passes 29/29. The 41 derived gates were re-run at this head: --ran shows 41 of 41 accounted for, 40 exit 0, and vitest run scripts/ exits 1 on #36492 only. All 16 Test UI shards were green at aed9f08. overlap-check.mjs is unchanged.

At 5279122 (review 7082970423, M1 and S2): the three menu test files pass 56/56. The five new pure and save cases were run against the previous designModeMenu.ts first, and all five were red. packages/app-shell/src/layout/ passes: 155 files, 1,219 tests. The package's whole pnpm run type-check (main and test tsconfigs) exits 0. dispatch-gates.mjs --commands derives the same 41 gates. --ran: 41 of 41 accounted for, 40 exit 0, and vitest run scripts/ exits 1 on #36492 only. overlap-check.mjs: origin/main, #36529, #36525 and #36351 all merge cleanly; #36411 conflicts on the de quote-pair count line only, as before.

At d1522bf (L1-e review 7083961269, items 1 and 2): DesignModeMenu-36363.test.tsx passes 22/22; the four new cases were run against the previous DesignModeMenu.tsx first, and all four were red. packages/app-shell/src/layout/ passes: 155 files, 1,224 tests. The package's whole pnpm run type-check exits 0. dispatch-gates.mjs --commands derives the same 41 gates. --ran: 41 of 41 accounted for, 40 exit 0, and vitest run scripts/ exits 1 on #36492 only (2 failures in date-only-zone-pins-10183, 5,125 passed). overlap-check.mjs: origin/main, #36525 and #36351 merge cleanly; #36411 conflicts on the de quote-pair count line only, as before.

At effe780 (L1-e review 7084606001 item 2, and the changeset sentence from review 7084744396): DesignModeMenu-36363.test.tsx passes 23/23; the new real-event-order case was red against d1522bf's DesignModeMenu.tsx. packages/app-shell/src/layout/ passes: 155 files, 1,225 tests. The package's whole pnpm run type-check exits 0. dispatch-gates.mjs --commands derives the same 41 gates. --ran: 41 of 41 accounted for, 40 exit 0, and vitest run scripts/ exits 1 on #36492 only (2 failures in date-only-zone-pins-10183, 5,125 passed). overlap-check.mjs: origin/main, #36525 and #36351 merge cleanly; #36411 conflicts on the de quote-pair count line only, as before.

At f68c14b (review 7085270448 S3 and N11): DesignModeMenu-36363.test.tsx passes 24/24; the new flick case was red against effe780's DesignModeMenu.tsx. packages/app-shell/src/layout/ passes: 155 files, 1,226 tests. The package's whole pnpm run type-check exits 0. dispatch-gates.mjs --commands derives the same 41 gates. --ran: 41 of 41 accounted for, 40 exit 0, and vitest run scripts/ exits 1 on #36492 only (2 failures in date-only-zone-pins-10183, 5,125 passed). overlap-check.mjs: origin/main, #36525 and #36351 merge cleanly; #36411 conflicts on the de quote-pair count line only, as before.

At c0eb5d6 (CI's Lint UI red at f68c14b, object-ui/no-synthetic-event-trigger, ADR-0054 C1): the three new dispatchEvent(new MouseEvent(...)) lines of DesignModeMenu-36363.test.tsx are fireEvent.click and fireEvent.pointerUp(window), asserting the same. Only that test file changed. eslint over the PR's ui files: 0 errors (warnings as on main). The menu tests pass 24/24, and the flick case is still red against effe780's DesignModeMenu.tsx. The package's whole pnpm run type-check exits 0. The derived gate sweep was not re-run: no source file changed since f68c14b's sweep; it does not include ESLint, which is why it missed this red.

Acceptance notes

Verification

HotCRM, zh-CN, at this head (review 7081226692 item (3)). HotCRM 6.5.0 (pnpm dev, a fresh database, pnpm demo:staff) on port 4001, this branch's console (Vite) proxied to it, a Chromium context in zh-CN, signed in as the seeded admin. GET /api/v1/i18n/locales marks en default. HotCRM's package app.objectstack.hotcrm is listed read-only.

  • The design mode drew the zh-CN menu (首页, 销售主页, 销售 › 线索, 客户, …, 35 entries). 「⋮ → 改名和图标」 on 线索: the name field disabled, the hint 「菜单名称需在应用的源语言下修改」. 「⋮」 on 报价 (the revenue module's contribution): 「此菜单项由另一个包添加,请在那个包中移动、改名或移除。」
  • Edits: 「⋮ → 上移」 on 客户 (above 线索); 「添加菜单项」 under 数据洞察, 对象, picked 活动参与者 (crm_event_attendee). Saved; the bar went.
  • Network, in order: GET /api/v1/i18n/locales 200; GET /api/v1/meta/app/crm_enterprise/layers?package=app.objectstack.hotcrm 200 (on mount, and again in the save); POST /api/v1/packages/app.objectstack.hotcrm/ensure-customization 201; PUT /api/v1/meta/app/crm_enterprise?mode=draft&package=app.objectstack.hotcrm.custom 200; POST /api/v1/meta/app/crm_enterprise/publish?package=app.objectstack.hotcrm.custom 200. Every request carried Accept-Language: zh-CN.
  • The PUT body: overrides: {package: app.objectstack.hotcrm, basedOn: 6.5.0}; its navigation holds no CJK character; 34 stored entries plus the one added; none of the 8 contributed entries (报价, 产品, 价格表, 产品目录, 知识库, 回款节点, 收入手册, 订单与回款手册) written; no entry's own keys differ from the stored one; 销售 reads nav_account, nav_lead, … and 数据洞察 ends with {id: nav_item_1, type: object, objectName: crm_event_attendee}.
  • The stored menu after the save (layered read) equals the PUT body, and, with the two edits undone, equals the stored menu before, byte for byte.
  • An English reader (admin, Accept-Language: en): the served menu after the save, with the two edits undone, equals the served menu before, byte for byte. Labels read Accounts, Leads, Contacts, …
  • A member (na.rep@objectos.ai, demo staff): served in English and in zh-CN, 销售 starts with 客户 / Accounts then 线索 / Leads, and 数据洞察 ends with the added entry. Screenshot hotcrm-06-member-zh-CN.png shows the moved order in the member's sidebar.

Files in the project files at repo-objectstack-7/shots/36363/: hotcrm-01-design-mode-zh.png, hotcrm-02-rename-closed-zh.png, hotcrm-03-contributed-zh.png, hotcrm-04-edited-zh.png, hotcrm-05-saved-zh.png, hotcrm-06-member-en-US.png, hotcrm-06-member-zh-CN.png, and the recorded requests hotcrm-network.json.

Earlier, on the showcase (before the review):

Live run against a fresh local backend and the console (Vite), signed in as the seeded admin, on the showcase app (an installed, read-only package), at 1440 px:

  • 「Edit app」 was shown (no eye) and entered the mode; the menu drew each entry with 「⋮」 and 9 「Add menu item」 rows.

  • 「⋮」 on an entry opened the menu with 「Move to group」's submenu; 「Add menu item」 held the dashed row and opened the picker; 「Objects」 offered 11 objects not in the menu (Announcement, Client Brief, Expense Line, …); picking Announcement put it in the row.

  • 「⋮ → Move up」 on Page Authoring moved it above Capability Map; 「Save」 was on, saved, and the bar went.

  • After a reload the menu read Page Authoring, Capability Map, My Work, Approvals, New Project (Wizard), Settings, Announcement, Projects: both edits kept, written into the showcase's customization package.

  • Added for comment 7079728193, on the same setup: entering the mode and 「⋮ → Move down」 on Capability Map, without saving, moved it below Page Authoring. Picking Setup from the app menu raised the browser's prompt 「Leave design mode? Your unsaved changes will be lost.」. Choosing to stay kept the address, the bar and the moved menu (Page Authoring, Capability Map, My Work, …). 「Cancel」 then left the mode. The run was on this branch's head with 设计模式(四)页头按钮:选哪些动作固定在页头、哪些收进「更多」,可以拖动排序 #36366's commits stacked on it in the same tree; the leave prompt has not changed since 设计模式(一)模式本身:页头「编辑应用」进入,顶上一条栏只有「设计模式」和取消、保存,跨页面保持 #36362. Screenshot leave-app-menu.png shows the app menu with the change staged. The browser's own prompt does not appear in a page screenshot.

Screenshots are in the project files at repo-objectstack-7/shots/36363/: m-design.png (the editor), m-actions.png (the entry menu), m-picker-kinds.png and m-picker-objects.png (the picker), m-staged.png, m-after-reload.png. The card's 「PR 正文附截图」 is met by those files: a cloud container cannot upload images to the PR.

Two minutes: as a workspace admin, open HotCRM, press 「Edit app」; under a group press 「Add menu item」, pick an object, press 「Save」; reload: the entry is there. Enter again, 「⋮ → Move up」 on an entry, then pick another app from the app menu: the prompt asks; stay, and the move is still there. 「Cancel」: the menu is as it was.

🤖 Generated with Claude Code

Add menu item per group with a picker of existing objects, views,
dashboards, reports, pages and links; a per-entry menu (move up/down,
move to group, add before/after, rename and icon, remove); drag to move.
Save writes the app where Studio's menu editing writes it and publishes;
an installed app enters the mode and saves into its customization package.

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 22, 2026
…tions (#36363)

The German icon hint quotes its example with „“, the Korean picker's
Loading… is the pack's one rendering, and the de quote-pairing and
Loading-group pins count the new keys.

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
One conflict, the de quote-pair counts: main's #36286 took 124, so the
menu editor's iconHint is now the 125th pair.

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
The card's added requirement (comment 7079728193): with a menu change
staged and not saved, switching app asks first in the shell's one
unsaved-changes prompt, and staying keeps the change; a reload or a tab
close is held until it is saved; with nothing changed, switching asks
nothing. The design mode's registration (#36362) already does this for
every staged change; these pins hold it for the menu editor's.

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
…6363)

The picker's one-key-per-thing keys read `view:${name}`, the spelling the
structural guard (viewCacheInvalidation.guard, objectui#4373) reserves for
the data adapter's view cache keys. They are no cache key: they are
compared only with each other. They are now `kind/name`, so they never
read as one.

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH

席位核对

REWORK — head def2f649. L1 per references/l1-review-checklist.md (origin/main). CI green on this head (48 success, 17 skipped; the Check Changeset cancelled row is superseded by a success on the same head, not a red). Two correctness defects in the save path, and the card's live acceptance is not yet met.

1. The menu save writes the served navigation, so translations get baked into the stored app

  • DesignModeMenu.tsx (≈160–169) seeds the editor from the sidebar's activeApp.navigation, i.e. the served document, and commit hands the whole navigation to saveAppMenu.
  • designModeMenuSave.ts saveAppMenu then writes { ...served, name, navigation } into the app (or its .custom pair).
  • The served navigation has gone through translateApp (packages/spec/src/system/i18n-resolver.ts ≈2180), which replaces each node's label with apps.<app>.navigation.<id>.label for the session's locale.
  • Consequence: a zh-CN admin who adds one entry stores Chinese labels on every existing entry. Those slots now diverge from the packaged base, so under ADR-0029 D9.2a the deployment catalog no longer applies to them, and an English reader sees Chinese from then on. Studio's nav save (StudioDesignSurface, ≈3700–3765) avoids this by saving its stored appDraft.

2. The served navigation is pruned per caller, so a whole-tree save can drop entries

  • packages/rest/src/meta-item-read-gate.ts:1105 filterNav removes entries the caller may not open before the document is served.
  • Saving that tree whole stores the pruned tree: entries the editing admin cannot open (another app's object, a permission-gated page) are silently removed for everyone.

Fix asked for (1 and 2): compose the save from the stored navigation (client.get of the stored document, not the served one), applying the staged edits (add / move / rename / remove) by entry id; leave untouched entries byte-identical. Pin two cases: a translated-label case (served label differs from stored → stored label survives the save) and a pruned-entry case (an entry absent from the served tree survives the save).

3. Live acceptance owed

The PR records the live run in English on the showcase only ("HotCRM itself was not run here"). The card's acceptance is HotCRM in zh-CN: one add and one move, saved. Please run that once on the fixed head and show, from the network: the stored body's labels (untranslated, unchanged for entries you did not touch), an English reader's menu unchanged apart from the edit, and a member seeing the change.

4. Question for the seat (not a ruling)

A rename made in a non-source language is stored as a plain string on label, not as a locale entry, so it becomes every language's label. If that is the intended behaviour, say so in the PR body; if not, it is a card, not part of this rework.

Re-request L1 on the new head; the review will be a delta on items 1–3.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: TIER_DEFAULT
Head-sha: def2f649cf8c9a378603d9c813452433b12c3cdb
Local-runs: none

Inputs read: card #36363 (body and all five comments, including the added leave-prompt requirement 7079728193 and the entry move 7080271489), PR #36437 (body, 24-file list, net diff against main), and the check-runs on the head. Code outside the diff was read at def2f649 only to judge the diff.

Gates: every completed check-run on the head is success or skipped. Test UI 12/16 went red on its first attempt on the known main flake #36500 (plugin-form, a file this PR does not touch) and its second attempt is success. One Check Changeset run is cancelled as a superseded duplicate; two other Check Changeset runs on the head are success. Test Core and Build Core are skipped because the diff touches no core path, which is right for a ui/-only diff.

① Derived judgments

  • Accept set. The diff adds the design-mode menu editor (DesignModeMenu.tsx), its pure tree edits (designModeMenu.ts) and its write (designModeMenuSave.ts); swaps the sidebar's plain menu for the editor only when the mode is on, in the sidebar, in an app, with no areas (UnifiedSidebar.tsx); and lets a read-only package's 「Edit app」 enter the mode (ShellPageActions.tsx). Right: every visible change is gated on designMode, and the outside-the-mode test in UnifiedSidebar.favoritesMenu-12427.test.tsx pins that no 「Add menu item」 and no editor 「⋮」 appear otherwise (card acceptance item 8).
  • Where the edits are saved. Right. saveAppMenu writes the app document with its new navigation into the app's own package when the server lists it writable, else into the paired customization package from the ensure door, with overrideDraftBody declaring the override at the base's listed version. That is the customization layer Studio's nav save writes (StudioDesignSurface.tsx around line 3730), never the installed package's source. designModeMenuSave-36363.test.ts pins both targets and the override declaration.
  • Who may save. Right. Entering the mode is gated by useAppStudioEntry / useStudioEntryGate (a workspace administrator holding manage_metadata, on a listed, non-kernel package). The new read-only branch adds the wall check !postureHasOrgWall(posture) || user.isPlatformAdmin, which matches the server's ensure door (packages-ensure-customization.test.ts: under isolated and group a tenant administrator is refused 403 and the operator admitted; under single a manage_metadata holder is admitted). The server's write gate stays the authority. ShellPageActions-36111.test.tsx pins the read-only entry, the walled eye, and the writable package under the wall.
  • Refusal and undo on a bad save. Right. The draft is written with ifNoneMatch: '*', so a pending Studio draft is refused with the localised pendingDraft sentence and nothing is published; a refused publish resets the draft this save wrote and passes the refusal on. The mode's own rule (设计模式(一)模式本身:页头「编辑应用」进入,顶上一条栏只有「设计模式」和取消、保存,跨页面保持 #36362) keeps the failed change staged and the mode on. 「Cancel」 drops everything, and nothing staged was written. The tests pin the pending-draft refusal, the publish-refused discard, and Cancel after three edits writing nothing.
  • Editor and runtime sidebar read the same order. Right. The editor reads activeApp.navigation and gives ids only to entries without one, without reordering. The sidebar reads the same activeApp.navigation through withoutUnreadableObjectEntries and applyPins, and both filter or flag entries without reordering them. A landed publish calls emitMetadataRefresh, so the app and its menu are read again.
  • Leave prompt (comment 7079728193). Right as the comment allows. The menu stages through the mode, which registers the shell's one unsaved-edits prompt. The comment says to use the shell's prompt where one exists, so its two choices (stay, leave) are acceptable in place of the three the coordinator suggested. Three component tests pin it: the app switch asks, staying keeps the move, and a reload or close is held only while the change is unsaved.
  • Picker offers only what is not in the menu (card item 2). Partly wrong. See S1.
  • Tests against the card's acceptance list. Add, move up, move to group, remove and offer again, rename, cancel, outside the mode, and the leave prompt each have a component test. Drag is pinned only through the pure moveEntry placement tests; the onDragEnd wiring has none (N4). Cross-account visibility and HotCRM are live checks for the coordinator after merge, as the card's comment 7079728193 says.
  • Public surface. No new export from @object-ui/app-shell (the editor is a lazy default import inside the package). New @object-ui/i18n keys under designMode.menu: 36 lines in each of the eleven locales, with the de quote-pair and ellipsis pins recounted.

S1 (should-fix): The picker's "already in the menu" test misses views that the menu names in the short form. targetKeyOf turns an object entry with viewName: 'my_projects' into view/my_projects, while the picker keys its rows by the listed view's name, which is always the qualified object.key (ViewItemNameSchema), for example view/crm_project.my_projects. The two never match, so any view the app's menu names in the short form is offered again as "not in the menu", and picking it adds a duplicate entry. The short form is the authored form in practice: HotCRM's psa.app.ts and crm.app.ts "My Work" entries, examples/app-todo, and the spec's own example. Every test uses only the qualified form (designModeMenu-36363.test.ts, crm_opportunity.mine), so nothing catches it. Fix: in targetKeyOf, qualify a viewName that has no dot with the entry's objectName (the same normalisation ObjectView applies to a requested view), and add a test with a short-form viewName.

N1 (nit): saveAppMenu asks the ensure door, which creates the customization package on first use, before it checks for the base version, so the noVersion refusal can come after a package write. The dashboard path (resolveDashboardEditTarget / ensureDashboardSaveTarget in runtime-metadata-persistence.ts) checks the version first and also refuses an ensured pair that is not writable; this save does neither. The test "refused before anything is written" only rules out save calls, not ensure. In practice the server's ensure door refuses a base with no SemVer version itself, so the effect is small.

N2 (nit): The designMode.tsx docblock still says who may enter is "a workspace administrator holding manage_metadata on a writable package". After this PR a read-only package's app enters too, so that sentence no longer holds. Separately, while the tenancy posture is still being read, postureHasOrgWall(undefined) is false, so a walled deployment can briefly show 「Edit app」 to a tenant administrator. The server still refuses the save with 403.

N3 (nit): Studio's nav save sends navPayloadOf(editorNav), which leaves out entries that name no target for their type. The design-mode save writes the served navigation unfiltered, so an app whose served menu holds such an entry could be refused here where Studio's save is accepted.

N4 (nit): Card acceptance item 3 (drag an entry to another group and save) has no component test of the onDragEnd wiring. Only the pure placement function underneath it is pinned.

② Semver level

The changeset .changeset/36363-design-mode-menu-editing.md takes patch for @object-ui/app-shell and @object-ui/i18n. Both lines are present and line-initial in the PR body and in the changeset body: Clause-②: yes (widening) and Metadata-protocol: none.

  • Clause-②: yes (widening) is right. The diff adds new published @object-ui/i18n keys and a new console capability, and removes or narrows nothing a consumer reads. The read-only posture now shows 「Edit app」 instead of the eye for a customization-capable caller, which widens what such a caller can do.
  • Metadata-protocol: none is right. The save writes only keys the spec already accepts (navigation entries of the existing object, dashboard, report, page and url types, label, icon, id, and overrides from the existing customization body). It adds no authorable key, accepted value or metadata type.
  • Level. Under AGENTS.md Post-Task Checklist item 3, a non-protocol change ships patch, widening included. patch on both moved packages is right.

③ Boundary flags

  • ADR-0146 D5 (a read-only package's app shows the eye into Studio). The PR changes this for a caller the customization door admits, because card item 7 asks for it. Item 7 is in the card's "要做的" list and not among the items the coordinator says it added. The PR says the seat recorded the D5 row on ADR revision card ADR revisions, week of 2026-11-21: rolling checklist of ADR text out of step with main (one governed PR) #36086. That card is outside this review's inputs, so the record could not be checked here. The diff touches no ADR file, so no governed surface is hit. Answered by the card; the D5 row is left to ADR revisions, week of 2026-11-21: rolling checklist of ADR text out of step with main (one governed PR) #36086.
  • Entry moved to the app-name menu (设计模式入口搬到左上角应用名菜单;页头的「编辑应用」「在 Studio 中查看」两个按钮去掉,自建应用和安装来的应用一样 #36485, comment 7080271489). The comment says whichever of the two cards merges second makes the installed-app path work through the new entry. This PR lands first and keeps the change to one condition on the existing button. Answered.
  • Leave prompt with three choices (comment 7079728193). The shell's two-choice prompt is used, as the comment allows. Answered.
  • An app whose menu is split into areas is drawn unedited in the mode. The card edits navigation, and the PR says neither the showcase nor HotCRM has such an app. Declared, and acceptable for this stage.
  • The card's "没有核对的" items. Whether the runtime can call Studio's save is answered: it writes the same document through the same doors. Whether an installed app's customization survives a package upgrade is not measured by this PR. It is the ADR-0146 D3 override mechanism Studio already uses, and stays the coordinator's live check. Whether a view menu entry is the same kind of thing as a favorited view is not addressed. The editor leaves personal favorites alone, as the card's out-of-scope list says.
  • open_questions: the PR declares none beyond the above.
  • SQL push-down (Prime Directive 5). Not applicable. The diff adds no data query, no id materialisation and no in-app join over records. The picker's lists are metadata-registry reads (client.list per kind and per package, at most ten, run one after another), and the "not in the menu" filter is a set difference over the menu tree, which no SQL query could do.
  • Out of scope: 设计模式(四)页头按钮:选哪些动作固定在页头、哪些收进「更多」,可以拖动排序 #36366, the card's later stage, was not reviewed.

Implemented-by: claude/project-thread-iqvhau
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

… the served one (#36363)

The served app is translated for the reader (translateApp) and pruned of
entries the reader may not open (filterNav). Writing it back stored the
reader's language on every label and dropped what they were not shown.
The save now reads the app as stored (the layered read, which serves a
caller who may write the app its stored version) and replays the menu
edits on it by entry id: removals, additions and moves (an entry out of
the order its group kept), and only the own keys an entry changed. Every
untouched entry is the same object. An entry naming no target is left
out (navPayloadOf).

The base version is checked before the customization package is asked
for, and a pair the server answers not writable is refused before
anything is written to it. A view named without its object is keyed as
that object's view.

A rename is offered only in the deployment's default language (GET
/i18n/locales) while the entry shows its stored label; otherwise the name
field is closed with a hint. Adding, moving and the icon stay open in
every language. An entry another package contributes to the menu is not
in the stored menu: it says so and is not moved, renamed or removed.

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
…6363)

Type Check UI's test project reads `STORED[3].children` as `{}` under the
spec's loose entry type; the pin now casts it to `Menu`, as its siblings do.

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH

席位核对

ACCEPT (delta L1 since REWORK 7081226692) at head 11b0e584.

  • l1-face is CLEAN: 47 success, 15 expected skip, 0 failed, 0 pending.
  • The delta is aed9f080 (the save-path rework and ruling (4)) and 11b0e584 (a test-typing fix for TS7053).

Items 1 and 2: the save writes the stored menu, not the translated or pruned served one. Closed.

  • saveAppMenu now reads the stored app through the layered read, layered('app', name, { packageId }), taking effective ?? code. It no longer uses client.get.
  • It replays the editor's edits on the stored navigation with rebaseMenuEdits(served, navigation, stored), then passes the result through navPayloadOf, as Studio's nav save does.
  • The patch is computed per entry id from served-before against edited. A label the reader did not touch therefore produces no patch, and the stored value, language map or source string, stays as it is.
  • Removed entries are dropped. Added and moved entries are placed after their nearest edited predecessor. Order is kept by a longest-common-subsequence run per group, so a neighbour's removal does not count as a move.
  • Every other stored entry is written back as the same object. That includes entries filterNav pruned from the reader. An id-less stored entry is matched to its served copy's assigned id by group, type and target.
  • Pins added in designModeMenuSave-36363: a zh-CN move writes the stored English labels; a pruned entry stays where it was stored; a rename writes only the key it changed; id-less entries are matched and written without an id; an entry with no target is left out.
  • The order is also right now: overrideDraftBody and its version check run before ensureCustomization, and a pair that comes back not writable is refused before anything is written.

Item 3: the live run on HotCRM in zh-CN. Closed.

The run used HotCRM 6.5.0 on a fresh database, with this branch's console, signed in as admin. /i18n/locales marks en as the default.

  • The edits were one move (客户 above 线索) and one add (活动参与者 under 数据洞察). The network shows the layered read, then ensure-customization, then PUT …?mode=draft&package=…hotcrm.custom, then publish.
  • In the PUT body, navigation contains no CJK character. It holds the 34 stored entries plus the 1 added. None of the 8 contributed entries is written, and no untouched entry's own keys differ from what is stored.
  • With the two edits undone, the stored menu after the save equals the stored menu before, byte for byte. The same holds for the menu served to an English reader.
  • A member, in both en and zh-CN, sees the moved order and the added entry. The files are in repo-objectstack-7/shots/36363/, along with hotcrm-network.json.

Item 4: ruling (4) as the seat gave it. Read.

Also read

  • Contributed entries. Entries from another package's navigationContributions are not in the stored menu. Their move, rename and remove are disabled with a hint. Without that, a moved contributed entry would be written into the menu and served twice. This is in-surface, found live, and pinned.
  • View keys. targetKeyOf now qualifies a bare viewName with its object, matching HotCRM's viewName: 'my_projects' form.
  • Changeset. The added sentences, read one by one against the diff, are all true: composed from the stored app, replayed by entry id, untouched entries written as they were, rename in the default language only, add, move and icon open in every language, contributed entries not editable here.
  • The scripts/ gate red. The only red in vitest run scripts/ is date-only-zone-pins-10183, a TZ order dependence this PR does not touch. ui scripts vitest: date-only-zone-pins-10183 fails after a test that writes process.env.TZ without restoring it (isolate false order dependence) #36492 carries it, and it does not block this PR.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 11b0e584c5201c457664774fcc248576eab75c2f
Local-runs: probe — one node run of the pure rebaseMenuEdits (the head's designModeMenu.ts, copied to scratch, no build and no test suite) on four small menus, to confirm M1 and S2 before a FAIL was written on them

Delta review of the record at def2f649 (comment 7081253549). Inputs read: card #36363 (body and all five comments), PR #36437 (body, both comments: the L1 REWORK 7081226692 and the earlier record, the 25-file list, the net diff against main), the two new commits aed9f08072a and 11b0e584c52, and the check-runs on the head. Code outside the diff was read at the head only to judge the diff. The seat ruling (4) on renames is not written on the card or the PR; it was read from the PR body and from follow-up card #36504, which state it the same way.

Gates: every check-run on the head is success or skipped. Type Check UI is success, all 16 Test UI shards are success, both Check Changeset runs are success. Test Core shards and Build Core are skipped, which is right for a ui/-only diff. The #36492 red the PR body names is a local run of vitest run scripts/; no check-run on the head is red.

① Derived judgments

  • Save path, the normal case. Right. saveAppMenu no longer writes the served menu. It reads the app as stored (client.layered, effective ?? code), replays the edits on the stored navigation by entry id (rebaseMenuEdits), and writes { ...stored, name, navigation }. The server's layered view serves a caller who may write the app its stored version, unpruned (meta-item-read-gate.ts, the author-exempt rule). An untouched entry is the same object, a patch writes only the keys that changed, and a stored entry the reader was never shown stays in place. Pinned in designModeMenuSave-36363.test.ts: the translated-label case and the pruned-entry case the L1 rework asked for, the one-key rename, and id-less stored entries.
  • Save path, another package's entries. Wrong. See M1. The save can still write a served, localized entry into the stored menu.
  • The stored menu changed under the editor. Mostly right. The stored menu is read at save time, so the edits land on the newest stored version and another administrator's published changes are kept. A draft left pending is refused by the first-write pin. Two gaps: an entry the editor moved that has since left the stored menu is written back from its served copy (M1, same line of code), and nothing pins the stored version between the read and the draft write (N6).
  • Rename rule, as ruled. Right. nameOpen opens the name field only when the session language is the deployment's default (GET /api/v1/i18n/locales, isDefault, en matching en-US) and the entry's shown label equals its stored label. Otherwise the field is disabled with the hint, and onDone writes the icon alone. It fails closed: while the default language or the stored menu is still being read, or when either read fails, the field is disabled. Adding, moving and the icon stay open in every language. Pinned by the zh-CN case, the differing-label case in the default language, and isSameLanguage. The translation write path is design mode: a menu rename in a non-source language is stored as that language's translation (console translation write path + source locale on /i18n/locales) #36504, not this PR.
  • Who may enter the mode and save. Right, and unchanged since def2f649. ShellPageActions.tsx and UnifiedSidebar.tsx did not change in the two new commits. Entry is still useAppStudioEntry plus, for a read-only package, !postureHasOrgWall(posture) || user.isPlatformAdmin. The new stored read goes through the server's own read gate, and the write still goes through the server's write and ensure doors. No permission is widened.
  • Check order before the write. Right. The base's version is read before the ensure door is asked, and a pair answered not writable is refused before anything is written to it. Both are pinned.
  • Public surface. No new export from the @object-ui/app-shell package index. @object-ui/i18n gains three more keys under designMode.menu in each of the eleven locales (the rename hint, the contributed-entry sentence, the not-writable refusal).

Earlier findings, by id:

S1: closed. targetKeyOf now qualifies a viewName without a dot with the entry's objectName, and designModeMenu-36363.test.ts pins the short form.

N1: closed. overrideDraftBody and the version check run before ensureCustomization, a pair that is not writable is refused, and a test pins that the only call before the refusal is the layered read.

N2: open in part. The designMode.tsx docblock now says a read-only package's app enters too. The other half stands: while the tenancy posture is still being read, a walled deployment can briefly show 「Edit app」 to a tenant administrator. The server still refuses the save.

N3: closed. The save sends navPayloadOf(...), as Studio's nav save does, and a test pins that an entry naming no target is left out.

N4: closed. A component test now drives DndContext's onDragEnd for a drop on another group's end and a drop on an entry elsewhere, and checks the saved result.

New findings:

M1 (must-fix): One 「Move down」 writes another package's entry into the app's stored menu. Contributed entries are appended at the end of their group or of the top level (registry-apps.ts applyNavContributions), so the last own entry of such a group has 「Move down」 enabled (canMoveBy does not look at fixed). Pressing it swaps the entry with the first contributed one. In rebaseMenuEdits, staysInOrder breaks the tie of a swap by treating the later entry in the served order as the moved one, which here is the contributed entry. It is not in the stored menu, so taken.get(id) is empty and the line const entry = taken.get(id) ?? now.entry writes its served copy. Probe result for stored [lead, account], served [lead, account, quote(contributed, label 报价)], after one 「Move down」 on account: the menu written is [lead, quote{label: 报价}, account]. The contributed entry is now stored, with the reader's localized label, and it is served twice from then on, because the contribution is appended again with no de-duplication. That is the harm the PR body and the changeset say cannot happen ("it is not moved, renamed or removed here"), and it breaks the rule the L1 rework set: never write the served or localized menu. It is one ordinary click on HotCRM, the card's acceptance app, whose 销售 group ends with contributed entries. The same fallback also writes a served copy when the mount-time stored read failed (then no entry is treated as contributed and its controls are open), and when an entry the editor moved has left the stored menu in the meantime (probe: the entry comes back with its zh-CN label). No test covers a move next to a contributed entry; the one contributed-entry test only checks that its own controls are disabled. Fix: in rebaseMenuEdits, never write the served copy of an entry that served holds and stored does not (skip it; only an entry absent from served is an addition), keep such entries out of the order comparison in staysInOrder, and stop 「Move up」, 「Move down」 and a drop from crossing a contributed entry. Add a save-level test: a move beside a contributed entry writes no contributed entry.

S2 (should-fix): A new entry's id is minted against the served menu, not the stored one. newEntryId(menu) and withEntryIds(served) take the first free nav_item_N in what the reader was shown. A stored entry the reader was not shown (pruned by filterNav, or an empty group) can already hold that id. Then the save matches the two by id. Probe: stored [lead, nav_item_1(hidden)], the reader adds an object and it gets nav_item_1; the menu written is the stored one unchanged, so the add is dropped while the bar reports a save. In the id-less variant the edit lands on the wrong entry. Probe: stored [lead (no id), nav_item_1(hidden)], the shown lead is given nav_item_1, the reader removes it; the menu written is [lead], so the hidden entry is removed for everyone and the one the reader removed stays. nav_item_N ids are what this editor itself writes, so they will be common. Fix: mint or re-mint added ids against the stored menu at save time, and give id-less served entries ids that cannot collide with a stored id.

N5 (nit): A link added in a language other than the default stores the typed label as the entry's base label for every language. The ruling covers renames, so this is outside its letter, but the reason behind it applies. It fits #36504.

N6 (nit): Nothing pins the stored version between the layered read and the draft write. A publish by someone else that lands in that short window is overwritten by this save. The first-write pin only refuses a pending draft.

② Semver level

The changeset .changeset/36363-design-mode-menu-editing.md still takes patch for @object-ui/app-shell and @object-ui/i18n. Clause-②: yes (widening) and Metadata-protocol: none are present and line-initial in the PR body and in the changeset.

  • Clause-②: yes (widening) is right. The delta adds three published @object-ui/i18n keys per locale and removes or narrows nothing a consumer reads. The rename field closing in a non-default language narrows only a control this same PR introduces, which no release has shipped.
  • Metadata-protocol: none is right. The save writes only keys the spec already accepts on navigation entries and the existing overrides body. It adds no authorable key, value or type.
  • Level. patch on both packages is right for a non-protocol change (AGENTS.md Post-Task Checklist item 3).
  • Changeset text. One sentence is not true of the tree: "An entry another package puts into the menu ... is not moved, renamed or removed here." M1 shows a path that moves and stores it. The text becomes true once M1 is fixed; it needs no rewording then.

③ Boundary flags

Implemented-by: claude/project-thread-iqvhau
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: FAIL

…ks (#36363)

Review 7082970423 M1: a move beside another package's menu entry (its
navigationContributions, appended when the app is served) could write that
entry's served, localized copy into the app's stored menu, after which it
was served twice. rebaseMenuEdits now writes no served entry the stored
menu does not hold (a contributed one, or one that left the stored menu
since it was read), and judges moves by the order of stored entries only.
The editor also moves no entry past a contributed one.

S2: the ids the editor gives entries are minted against what the reader
was shown, which a stored entry pruned from the reader can already hold. A
stored entry is now matched to its served copy by id only when both name
the same thing, else by its group and target; an added entry whose id a
stored entry holds is written under a fresh nav_item_<n>; and the picker
mints ids against the stored menu as well.

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 52791229d7b4cf5d76e94fbd6f355589cbb8906c
Local-runs: probe — one node run of the pure rebaseMenuEdits (the head's designModeMenu.ts, copied to scratch, no build and no test suite) on small menus, to try to break the M1 and S2 fixes before a verdict was written on them

Delta review of the record at 11b0e584 (comment 7082970423). Inputs read: card #36363 (body and all six comments, the seat ruling 7082976224 included), PR #36437 (body, its four comments, the 25-file list, the net diff against main), the one new commit 52791229d7b, and the check-runs on the head. Code outside the diff was read at the head only to judge the diff.

Gates: every check-run on the head is success (47) or skipped (15); none is red. Type Check UI, all 16 Test UI shards, Lint UI and both Check Changeset runs are success. The skipped runs are the core shards, right for a ui/-only diff.

① Derived judgments

  • Save path, another package's entries. Right now. rebaseMenuEdits calls an entry foreign when the served menu holds it and no stored entry is matched to it. A foreign entry is never placed, never patched and never written, and staysInOrder leaves it out of both orders. The old fallback taken.get(id) ?? now.entry is gone: a placed entry is written only from the stored entry lifted for it, or, when the served menu does not hold its id, from the edited menu as an addition. Probe results: one 「Move down」 beside a contributed entry writes the stored menu unchanged; a contributed entry moved into a group and given an icon, removed, or dragged to the front of two adjacent contributed entries writes nothing; an own entry moved past two contributed entries lands at the end of its stored group; an entry added at the very end after a contributed tail lands after the last stored entry of that group.
  • Save path, the stored menu changed since mount. Right. An entry another administrator removed is foreign at save time: a move and an icon on it write nothing and it does not come back (probe). A swap of two other entries in that state still lands. An entry another administrator added stays where it is.
  • Save path, a failed stored read. Right. saveAppMenu awaits the layered read before it composes anything, so a read that throws refuses the save. Nothing is written from the served menu in any branch. One gap is graded below (N8).
  • Save path, mixed edits. Right. A rename plus a move of one entry across groups writes the entry once, in the new group, with the stored keys plus the changed ones (probe). A move to the front of the top level lands there. With no edit the function answers the stored menu itself.
  • Editor. Right. 「Move up」 and 「Move down」 are off when the neighbour is a contributed entry, and a drop onto one does nothing. The picker mints ids against the staged menu and the stored menu together. The function holds the rule on its own, so it stands when the mount-time stored read failed and no entry was marked contributed.
  • Matching stored entries to served copies. Right for menus the spec accepts. A stored id matches the served entry of that id only when both name the same type and target; a stored entry with no id is matched by group, type and target, in order. The spec requires id on every navigation entry but the separator, so the id-less paths serve separators and stored documents the spec would reject. Their weak spot is graded below (N7).
  • Who may enter the mode and save. Right, and unchanged. The new commit touches DesignModeMenu.tsx, designModeMenu.ts and three test files only. ShellPageActions.tsx, UnifiedSidebar.tsx, designMode.tsx and designModeMenuSave.ts are byte-identical to the earlier head. No permission is widened.
  • Public surface. Unchanged since the earlier record: no new export from the package index, the same designMode.menu keys in eleven locales.

Earlier findings, by id:

M1: closed. The served copy of an entry the stored menu lacks is no longer written on any of the three paths the earlier record named (the tie-break of a swap, a failed mount-time read, an entry gone from the stored menu). Pinned by the new pure cases and a save-level case; the PR body says they were red on the previous file.

S2: closed. An added entry whose id a stored entry holds is written under a fresh nav_item_N that neither menu holds (probe: the add lands, the hidden entry keeps its id and place). A hidden stored entry holding the id the editor gave an id-less shown entry of another target is no longer matched to it (probe: the shown entry is removed, the hidden one stays). The same-type-and-target remainder is N7.

N2: open in part, accepted as left. The body now states the reason: the posture hook answers undefined both while reading and where no wall exists, so closing the button there would close the mode on deployments without a wall, and the server refuses the save behind a wall.

N5: carried to #36504, as before.

N6: open, accepted as left. The body states it: no version pin between the layered read and the draft write, a window of one request. It is a declared limit, not a hidden one.

New findings:

N7 (nit): Matching by group, type and target picks the wrong stored entry when two id-less stored entries of one group name the same type and target (or both name no target, as separators and form or record entries do) and the earlier one is hidden from the editor. Probe: stored [lead L1 (hidden), lead L2], the reader removes the shown one; the menu written keeps L2 and drops L1. The same holds for a hidden stored group that holds the nav_item_N an id-less shown group was given: an add into the shown group lands in the hidden one. Both need id-less entries, which the spec allows on separators only. Comparing the other own keys would close it.

N8 (nit): MetadataClient.layered answers a 404 as an empty but successful view, and storedApp then reads an empty app. The save does not refuse: it composes { name, navigation } with only the added entries. Nothing served is written, and AppSchema requires label, so the server should refuse the body, but the client should refuse first when the layered read holds neither effective nor code.

N9 (nit): An own entry moved or added into a contributed group lands at the end of the stored top level (probe), because the stored menu holds no such group, while the bar reports a save. 「Move to group」 still lists contributed groups. Leave them out of that list.

② Semver level

The changeset .changeset/36363-design-mode-menu-editing.md is unchanged in the delta: patch for @object-ui/app-shell and @object-ui/i18n. Clause-②: yes (widening) and Metadata-protocol: none are present and line-initial in the PR body and in the changeset.

  • Clause-②: yes (widening) is right. The diff adds published @object-ui/i18n keys and removes or narrows nothing a consumer reads. The new commit adds no key and no export.
  • Metadata-protocol: none is right. The save writes only keys the spec already accepts on navigation entries and the existing overrides body.
  • Level. patch on both packages is right for a change outside the metadata protocol (AGENTS.md Post-Task Checklist item 3).
  • Changeset text. The sentence the earlier record called untrue of the tree is true now: a contributed entry is not moved, renamed, removed or written here.

③ Boundary flags

Implemented-by: claude/project-thread-iqvhau
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: TIER_DEFAULT
Head-sha: d1522bfb87c034f0ab44a34791b4756aa23752c1
Local-runs: none

Delta review of the record at 52791229 (comment 7083821939). Inputs read: card #36363 (body and all six comments), PR #36437 (body, its six comments, the L1 REWORK 7083961269 included, the 25-file list), the one new commit d1522bfb8 (3 files, +152/−10) and the check-runs on the head. Code outside the delta was read at the head only to judge it: designModeMenu.ts, designModeMenuSave.ts and the server fold packages/objectql/src/registry-apps.ts applyNavContributions.

Gates: every check-run on the head has finished. 46 are success, 15 are skipped, none is red. Type Check UI, Lint UI, all 16 Test UI shards, Build & E2E UI, Live E2E UI and both Check Changeset runs are success. One PR-body guards run was cancelled by its own re-run, which is success. The skipped runs are the core shards, right for a ui/-only diff.

① Derived judgments

  • What the server serves. applyNavContributions pushes each contribution's items onto the end of the group it names, or onto the end of the top level. So in a served menu the entries of other packages are always the closing run of their group. A group with such entries in the middle is not served.
  • L1 item 1, drawn order equals stored and served order: closed for the case L1 reported, with the limits named below. ownEndOf counts back over the closing run of contributed entries. Each insertion path now goes through it:
    • 「Add menu item」 at a group's end and at the top level: startAdd clamps the index to ownEndOf, so the dashed row and the picked entry sit before the run. rebaseMenuEdits puts the entry after the nearest entry before it that the stored menu holds, which is the last own entry. Served: own entries, the new one, then the run. Equal.
    • 「Add an item before」 and 「Add an item after」 on a contributed entry: the same clamp. Equal.
    • 「Move to group」 and a drop on a group's end zone: moveToOwnEnd reads the own end after the entry has left its old place, which is the index moveEntry expects. Equal, and right when the entry already sits in that group.
    • A drop on an own entry, and 「Move up」 or 「Move down」: unchanged. An own entry is never after the run, 「Move down」 is off beside a contributed entry, and a drop on a contributed entry is refused, so none of them can pass the run.
    • A group of only contributed entries, whose group the stored menu holds: the own end is 0, the entry is drawn first, stored as the group's only entry and served first. Equal.
    • The top level: a contributed entry or a contributed group closing the top level is counted back over in the same way. Equal.
    • Contributed entries not all at the end: this needs a served entry that has left the stored menu since it was served (another administrator removed it). The own end is then the last own entry. The stale entry is still drawn, but the own entries are drawn in the order they are stored and served, because the save places an entry after the nearest stored entry before it.
  • L1 item 2, a refused drop no longer leaves the page: closed. Both link shapes of MenuLeaf (the router link and the external anchor) carry draggable=false and a dragstart handler that prevents the default, so the browser has no link drag to finish. dnd-kit's attributes and listeners are spread after and hold none of these three keys, so nothing overrides them. A contributed entry's link gets them too.
  • The click suppression is narrow. Right.
    • It is onClickCapture on the entry's own link only, and it only prevents the default. It adds no document listener, so no link outside the editor is touched.
    • It fires while a dnd-kit drag is under way, or within 300 ms of onDragEnd or onDragCancel. With no drag the stamp is 0, so a plain click navigates. A press that moves less than the pointer sensor's 5 px starts no drag and navigates.
    • Preventing the default in the capture phase is enough for both shapes: the router's link skips its own navigation when the event is already prevented, and the external anchor does not open.
    • Keyboard: the commit changes nothing. On an own entry Enter and Space were dnd-kit's pick-up keys at the earlier heads and still are; that keydown is prevented, so no click follows. On a contributed entry (sortable off) Enter still opens the link.
    • dragging cannot stay set: dnd-kit ends every drag with one of the two callbacks, and both clear it.
  • Save logic. Unchanged, as stated. designModeMenu.ts and designModeMenuSave.ts are byte-identical to 52791229. The delta touches the changeset, DesignModeMenu.tsx and its test file only.
  • Tests. Four new cases pin the group-end add (with the saved body), 「Add an item after」 on a contributed entry, 「Move to group」, the end-zone drop, the native drag refusal on an own and a contributed link, and the click after a refused drop, with a plain click as the control. They drive onDragStart and onDragEnd directly; the browser's own drop is beyond jsdom and stays L1's live re-run.
  • Who may enter the mode and save; public surface. Unchanged. No new export, no new i18n key.

Earlier findings, by id: M1 and S2 stay closed (the save files did not change). N6, N7, N8 and the rest of N2 are as the earlier record left them; the body places N6 to N9 on #36538 and N5 on #36504.

N9: still open, carried on #36538, and wider than first written. In a group another package contributes, the own end is 0, so 「Add menu item」 there draws the entry first in that group, while the save puts it at the end of the stored top level. 「Move to group」 into such a group does the same. The changeset's new sentence is not true of that group.

New findings:

N10 (nit): The own end rests on the mount-time stored read. While that read is still out, or when it failed, no entry is marked contributed, so ownEndOf is the group's length and the old drawing is back: an entry added at the end is drawn after the run and stored before it. An add pressed before the read lands keeps its unclamped place. Nothing wrong is written. Closing the add and move paths until the read lands, or when it failed, would close it. Fit for #36538.

No other finding in the delta.

② Semver level

The changeset .changeset/36363-design-mode-menu-editing.md gained one sentence; its frontmatter is unchanged: patch for @object-ui/app-shell and @object-ui/i18n. Clause-②: yes (widening) and Metadata-protocol: none each start a line in the PR body and in the changeset.

  • Clause-②: yes (widening) is right. The delta removes or narrows nothing a consumer reads: no export, no prop of a public component, no i18n key changes. justDragged is a prop of the file-local MenuLeaf.
  • Metadata-protocol: none is right. No save logic changed.
  • Level. patch on both packages stays right.
  • The new sentence: "Such entries are added after the app's own entries when the app is served, so an entry added or moved to the end of their group is drawn before them, where everyone will see it." The first half is true of the server fold. The second half is true of the tree for every group the stored menu holds and for the top level, once the stored read has landed. It is not true in a contributed group (N9) nor before the read lands (N10).

③ Boundary flags

Implemented-by: claude/project-thread-iqvhau
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

Seat note: L1-e's live trace 7084606001 shows item 2 still open in a real browser, because dnd-kit's document-capture click listener stops propagation before React's onClickCapture. The live reading outranks this tree reading, so the next head owes the fix.

…other package's entries (#36363)

Review 7084744396: the sentence did not hold for a group another package
adds, nor before the editor's stored-menu read lands (follow-up #36538).

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: TIER_DEFAULT
Head-sha: effe780b20ad832a5f571993ee497ef724e87e23
Local-runs: none

Delta review of the record at d1522bfb (comment 7084744396). Inputs read: card #36363 (body and comments), PR #36437 (body, comments, the L1 REWORK 7084606001 and its correction 7084619688 included, the 25-file list), the two new commits 34aa7f17e and effe780b2 (3 files, +66/−14) and the check-runs on the head. Code outside the delta was read only to judge it: DesignModeMenu.tsx and its test file at the head, and the installed @dnd-kit/core 6.3.1 (PointerSensor, KeyboardSensor, DndContext).

Gates: the check-runs on the head have NOT all finished. At the last read 17 are success, 15 are skipped and 27 are still running; none is red. Still running: Type Check UI, Lint UI, all 16 Test UI shards, Build & E2E UI, Live E2E UI and the Lint and Type Check families. Both Check Changeset runs and PR-body guards are success. This verdict judges the tree; it stands only if the running checks end green.

The red the dev reports is not a check-run. It is the dev's own local vitest run scripts/: 2 failures in date-only-zone-pins-10183, the subject of the open issue #36492 (a test that writes process.env.TZ and does not restore it). It is not this PR's: the PR touches no file under scripts/ and no date code, its 25 files are the changeset and files of ui/packages/app-shell and ui/packages/i18n, and every check-run on the previous head d1522bfb was green.

① Derived judgments

  • The cause L1 found is real in the installed dnd-kit. Once a pointer drag is active, PointerSensor.handleStart adds a click listener on the document, in the capture phase, that only stops propagation. It is taken off 50 ms after the drag ends. A click stopped there never reaches React's root, so the old onClickCapture could not run, and the anchor's default went ahead.
  • The fix runs before it. The editor now listens for click on window in the capture phase. Window capture comes before document capture whatever the order of registration, so the default is cancelled before dnd-kit stops the click. Right.
  • The listener is added and removed correctly. Right.
    • One useEffect with an empty dependency list adds it at mount and removes it at unmount, with the same function and the same capture flag.
    • A remount, and a StrictMode double mount, add one and remove one each time. There is no duplicate and no leak.
    • It reads two refs, so it never goes stale and never needs re-adding.
    • With the editor not mounted there is no listener at all.
  • The cancel is narrow. Right, with the two limits named in S3 and N12.
    • It only calls preventDefault. It stops no propagation and touches no other event.
    • It acts only when the click's target is inside an element carrying data-design-menu-link. That attribute is set in one place, on the two link shapes of MenuLeaf. A link outside the editor, a group header, the 「⋮」 button (a sibling of the link) and 「Add menu item」 are never cancelled.
    • It acts only while a drag is under way or within 300 ms of its end. With no drag the stamp is 0 and the flag is false, so a plain click navigates. A press that moves less than 5 px starts no drag and navigates. The earlier case keeps a real control for this: a plain click changes the router location.
    • Keyboard. Unchanged. On an own entry Enter and Space are dnd-kit's pick-up and drop keys; the drop's keydown is prevented by the sensor, so no click follows. On another package's entry (sortable off) Enter makes a click with no drag behind it, and it opens the link.
    • draggable=false and the dragstart guard stay on both link shapes.
  • The 300 ms window. Within 300 ms of a drop, a refused drop or a cancelled drag, a click on ANY entry link of the editor is cancelled. For the first 50 ms dnd-kit also stops it. From 50 to 300 ms it reaches React with its default prevented: the router link does not navigate and the external anchor does not open. Nothing is shown and nothing is written. The user clicks again and it works. A deliberate click that soon after a release is not likely, so this is acceptable.
  • The earlier record said the dragging flag cannot stay set. That was wrong; see S3. It was already so at d1522bfb, where the same flag fed onClickCapture.
  • The pin exercises the real path. Right.
    • The test file wraps DndContext only to capture two props, then renders the real one. Sensors and listeners are dnd-kit's own.
    • The new case dispatches pointerdown on the link, two pointermove on the document (past 5 px), pointerup, then a native click on the link.
    • A bubble listener on the document does not fire. That shows dnd-kit's real capture listener was attached and stopped the click, as in the browser.
    • click.defaultPrevented is then true. Nothing below the document ran, so only a window-capture listener can have done it. At d1522bfb that listener did not exist, so the dev's "red before" is consistent with the tree.
    • A real browser drag onto another package's entry stays L1's live re-run.
  • Save logic. Unchanged. designModeMenu.ts (rebaseMenuEdits) and designModeMenuSave.ts are byte-identical to d1522bfb. The delta touches the changeset, DesignModeMenu.tsx and its test file only.
  • Who may enter the mode and save; public surface. Unchanged. No new export, no new i18n key. justDragged was a prop of the file-local MenuLeaf and is gone.

Earlier findings, by id: M1 and S2 stay closed. N6 to N10 are open and carried on #36538, N5 on #36504, as the body states. The changeset no longer contradicts N9 or N10.

New findings:

S3 (should-fix): The dragging flag can stay set, and then every entry link in the editor stops opening. dnd-kit calls onDragStart as soon as the pointer passes 5 px. It calls onDragEnd or onDragCancel only if its own start render has committed by then (createHandler reads sensorContext.current.active, which a layout effect sets). If the pointer is released before that render, as in a fast flick where the move past 5 px and the release arrive back to back, neither callback runs. dragging stays true and the window listener cancels every later click on an entry link, silently, until a full drag ends or the mode is left and entered again. Nothing is written and no data is at risk. This is reasoned from the dnd-kit source, not observed; L1 can try a fast flick on an entry. A fix: also stamp the end from a window pointerup and pointercancel listener in the same effect, or clear the flag on the next pointerdown.

N11 (nit): The new case's closing block ("a plain click afterwards is a click again") asserts only that the design bar is still drawn. It does not assert that the plain click's default was left alone, so it would stay green with a stuck flag. Asserting plain.defaultPrevented is false, or the router location, would make it a control.

N12 (nit): A pointer drag cancelled with Escape while the button is still held, then released over the same link more than 300 ms later: the click is outside the window, dnd-kit's listener is gone, and the link opens as a plain in-app click. No full page load, nothing lost. Same at d1522bfb. Fit for #36538.

No other finding in the delta.

② Semver level

The changeset .changeset/36363-design-mode-menu-editing.md changed one sentence; its frontmatter is unchanged: patch for @object-ui/app-shell and @object-ui/i18n. Clause-②: yes (widening) and Metadata-protocol: none each start a line in the PR body (lines 8 and 9) and in the changeset.

  • Clause-②: yes (widening) is right. The delta removes or narrows nothing a consumer reads: no export, no prop of a public component and no i18n key changes. The data-design-menu-link attribute is new markup inside the editor, not a published surface.
  • Metadata-protocol: none is right. No save logic changed.
  • Level. patch on both packages stays right.
  • The qualified sentence is now true of the tree. It reads: once the editor has read the app's stored menu, an entry added or moved to the end of a group the app itself holds is drawn before the other package's entries; a group another package adds, and the moment before that read lands, are not handled this way yet. The two named gaps are N9 and N10. A failed read is covered by "once the editor has read". The top level is also handled; the sentence does not say so, and does not say otherwise.

③ Boundary flags

Implemented-by: claude/project-thread-iqvhau
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

Seat note: S3 is a stuck-flag risk reasoned from the dnd-kit source, already present at d1522bf, and not yet seen live. The seat asks the dev for the cheap fix on the next head (clear the flag on the next pointerdown, or stamp the end from a window pointerup or pointercancel) with N11's assertion, so the editor cannot lose its links. N12 goes to #36538.

…e menu's links (#36363)

Review 7085270448 S3: dnd-kit reports a drag's start at 5 px but its end
only after the start has rendered, so a flick released before that left the
editor's drag flag set and every entry link cancelled until a full drag
ended. The flag is now also cleared by the next press, and the drag's end
stamped from the pointer's own release or cancel on the window. N11: the
real-event-order pin's closing plain click now asserts that it opens the
entry's page, and a flick with no end reported is pinned.

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH

席位核对

ACCEPT at head effe780b (delta L1 since REWORK 7084606001). CI, read just before posting: 47 success, 15 expected skip, 0 failed, 0 pending, mergeable clean.

Item 2: closed, measured live

The run was on HotCRM 6.5.0 in zh-CN, with this head's console under Vite. The log is in project files repo-objectstack-7/l1e-live-36437/effe780b-drag-click-enter-log.txt. A page marker and a load counter told a full document load from a same-document change.

  • Code. A window capture click listener cancels the default only on [data-design-menu-link], while a drag is active or within 300 ms of its end. That listener runs before dnd-kit's document-capture stopPropagation. draggable={false} stays. The test now dispatches the click on the real event order.
  • a. Own entry dropped on a contributed entry (nav_contract onto nav_product), after a staged 「下移」 on nav_lead. The URL is unchanged, with 0 full loads and the same document. The mode bar stays, the order is unchanged, and the staged move is kept. No beforeunload.
  • b. Own entry dropped on the page body. No navigation, 0 loads, and the mode stays.
  • c. Own entry dropped back on itself. No navigation, and the order is unchanged.
  • d. Own entry dropped on another own entry (nav_contact onto nav_opportunity). It moves, with no navigation.
  • e. Plain click on 客户. It opens /crm_account in-app, with 0 full loads, and the mode stays.

Item 1: still closed

The placeholder and the saved position were measured at d1522bfb. This round's code moves neither. The changeset sentence now limits the claim to groups the app itself holds, once the stored menu has been read, and that is true to ownEndOf, which waits on storedById.

Notes (not blocking)

  • Enter on a focused entry in the mode does not open its page. It starts dnd-kit's keyboard move: KeyboardSensor's default keyboardCodes.start is [Space, Enter], and its activator prevents the keydown. Escape cancels it, and the URL and order stay unchanged. This has been true since the keyboard sensor came in with the DnD, not this round. A plain click and the 「⋮」 menu cover opening and moving. If the seat wants Enter to open, pass keyboardCodes: { start: ['Space'], … }. One line in the body is enough otherwise.
  • A drop far from any entry still moves the entry next to the nearest one (b moved nav_sales_order below nav_contract). This is closestCenter doing what it does, and it was not changed in this round.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: TIER_DEFAULT
Head-sha: f68c14b359f2e015c5eac97c1ce0d419c21d2bbd
Local-runs: none

Delta review of the record at effe780b (comment 7085270448). Inputs read: card #36363 and PR #36437 (bodies, and the comments since that record: the L1 ACCEPT 7085492409 only), the one new commit f68c14b359f (2 files, +58/−6) and the check-runs on the head. Code outside the delta was read only to judge it: DesignModeMenu.tsx and its test file at the head, and the installed @dnd-kit/core 6.3.1.

Gates: the check-runs on the head have NOT all finished. At the last read 12 are success, 15 are skipped and 16 are still running; none is red. Still running: Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, one Check Changeset, Plan Test UI shards (so the Test UI shards have not started yet) and the Lint and Type Check families. PR-body guards and the other Check Changeset are success. This verdict judges the tree; it stands only if the running checks end green.

The red the dev reports is not a check-run. It is the dev's own local vitest run scripts/: 2 failures in date-only-zone-pins-10183, the open issue #36492. It is not this PR's: the commit touches two files under ui/packages/app-shell/src/layout/ and nothing under scripts/.

① Derived judgments

  • S3 is closed. Right.
    • The same effect now adds three more window listeners in the capture phase. pointerdown clears the dragging flag. pointerup and pointercancel clear it and stamp the end time, and do nothing when the flag is not set.
    • A flick whose end dnd-kit never reports now ends at the release itself. The flag does not stay set. The click that follows the flick falls inside the 300 ms window and is cancelled, as a drag's click should be. Later clicks open.
    • A release the page never sees is covered too: the next press clears the flag.
  • N11 is closed. Right. The pin's closing plain click now asserts that the router location changes. With a stuck flag the click would be cancelled, the location would stay, and the case would be red.
  • The new case is a real control. Right. It calls the captured onDragStart with no end, dispatches a pointerup on the window, waits 350 ms (past the window), clicks the home link and asserts the location left /apps/crm. On effe780b nothing cleared the flag, so the click was cancelled. The dev's "red before" is consistent with the tree.
  • The listeners are added and removed correctly. Right.
    • One useEffect with an empty dependency list adds four listeners and its cleanup removes the same four, each with the same function and the same capture flag.
    • A remount, and a StrictMode double mount, add one set and remove one set. There is no duplicate and no leak.
    • The handlers read and write two refs only. They never go stale.
    • With the editor not mounted there is no listener.
  • A pointerup that ends a real drag still cancels the click after it. Right. The item-2 fix holds.
    • On a real drag the window pointerup runs first: flag off, end stamped. dnd-kit's onDragEnd then stamps again through endDrag. The click arrives milliseconds later, inside the 300 ms window, and the window click listener cancels it before dnd-kit stops it.
    • The stamp moves earlier by at most the same event turn. The cancel is not weaker anywhere.
    • The real-event-order pin still asserts click.defaultPrevented is true after a real pointer drag, on this head's listeners.
  • A pointerdown that starts a new drag does not break that drag's click cancel. Right. The press clears the flag before any move. dnd-kit calls onDragStart synchronously on the move past 5 px, so the flag is set after the press, and the release stamps the end as above.
  • A second pointer during a drag (a second finger, say). Acceptable. Its press clears the flag, or its release stamps early. If dnd-kit reports the end, endDrag stamps again and the click is cancelled. Only a second pointer together with an unreported end loses the cancel, and then the flag is not stuck.
  • A keyboard move still behaves. Right, with the one edge in N14.
    • Enter or Space picks up, arrows move, Enter or Space drops. No pointer event fires, so the new listeners do nothing. onDragEnd and onDragCancel end it as before. The sensor prevents the keydown, so no click follows.
    • Enter on another package's entry (sortable off) makes a click with no drag behind it and no pointer event. It opens the link, as before.
  • Nothing outside the editor is affected. Right.
    • The three new handlers call no preventDefault and no stopPropagation. They only write the editor's two refs.
    • The click cancel is unchanged: only a click inside an element carrying data-design-menu-link, an attribute set in one place in this file.
  • Save logic. Unchanged. designModeMenu.ts (blob ad45602e) and designModeMenuSave.ts (blob 1a67c611) are byte-identical at effe780b and at this head, as are their two test files. The commit touches DesignModeMenu.tsx and its test file only.
  • Public surface. Unchanged. No new export, prop or i18n key.

Earlier findings, by id: M1, S2, S3 and N11 are closed. N12 is unchanged and fit for #36538. N6 to N10 stay on #36538 and N5 on #36504, as the body states.

New findings:

No must-fix, no should-fix.

N13 (nit): The new case pins the pointerup path only. The pointerdown clear and the pointercancel path have no case of their own. Removing either line would leave every test green.

N14 (nit): During a keyboard move (picked up, not yet dropped) a mouse press now clears the flag. A mouse click on an entry link then opens it while the move is still held. Before this commit that click was cancelled. dnd-kit starts no second drag while one is active, nothing is written, and the move can still be dropped or cancelled by key. Fit for #36538.

② Semver level

The changeset .changeset/36363-design-mode-menu-editing.md is unchanged in this commit: patch for @object-ui/app-shell and @object-ui/i18n. Clause-②: yes (widening) and Metadata-protocol: none each start a line in the PR body (lines 8 and 9) and in the changeset (lines 8 and 9).

  • Clause-②: yes (widening) is right. The delta removes or narrows nothing a consumer reads. It adds listeners inside one component and changes no export, prop or key.
  • Metadata-protocol: none is right. No save logic changed.
  • Level. patch on both packages stays right. The delta publishes a bug fix only.
  • The body's new sentence (line 26) is true of the tree: in the mode, Enter or Space on a focused own entry is the keyboard sensor's pick-up key and does not open the page; a click opens it. It holds for an entry the app owns. Another package's entry is not sortable, so Enter opens it; the body says elsewhere that such an entry is not dragged.

③ Boundary flags

Implemented-by: claude/project-thread-iqvhau
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

Seat note: #36538 already holds an N13 and an N14 (from L1 7085492409), so this record's N13 and N14 are filed there as N15 and N16. The seat lands on green checks and the L1 delta.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH

席位核对

REWORK — CI only. L1-e delta at f68c14b3 (diff effe780b..f68c14b3, 2 files). The code is right, and I confirmed it live on HotCRM (zh-CN). What blocks landing is a red Lint UI on this head, caused by the new test lines.

The red

ui/packages/app-shell lint fails with object-ui/no-synthetic-event-trigger (ADR-0054 C1) at DesignModeMenu-36363.test.tsx 536:37, 556:28 and 562:36. All three are dispatchEvent(new MouseEvent(…)) lines added in this commit: two link clicks and one pointerup on window. The previous head passed with the click built into a variable first. Testing Library's fireEvent.click(linkOf(…)) / fireEvent.pointerUp(window) should satisfy the rule without changing what the test asserts. When I read it, Test UI was still running (17 pending).

Live (Vite restarted clean on this head, served module checked to contain the new listeners)

I entered design mode on crm_enterprise, flicked a menu entry, and then plain-clicked another link (商机). I ran four kinds of flick: a one-step 8 px move, a one-step 60 px move, a two-step 40 px move with no wait, and a same-task burst (pointerdown, two pointermoves, pointerup).

  • After every flick, the plain click opened /crm_opportunity in-app: no full load, and the design bar stayed.
  • The burst reproduces the case this commit names. A temporary local console probe (reverted) logged dragStart, then release true, and no endDrag from dnd-kit. The window pointerup stamped the end, and the next click opened the page.
  • On effe780b, the same burst left every link shut: later plain clicks stayed defaultPrevented.
  • The click that is part of the burst is still cancelled, as before.

Non-blocking: onPress clears the flag on any pointerdown, including one during a keyboard drag. A link clicked in the middle of a keyboard drag would then open. That is an edge case and not a reason to hold this.

To land: a head that changes only the three test lines, with CI green. I will re-read that head's diff and CI; it needs no new live run.

Evidence: /mnt/project-files/repo-objectstack-7/l1e-live-36437/f68c14b3-* (four flick shots + log).

…ADR-0054 C1 asks (#36363)

Lint UI's object-ui/no-synthetic-event-trigger refused the three new
dispatchEvent(new MouseEvent(...)) lines. They are fireEvent.click and
fireEvent.pointerUp(window) now, and assert the same: the plain click opens
the entry's page, and a flick's release opens the links again.

Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH

席位核对

ACCEPT — L1-e delta at c0eb5d6c. This is the test-only follow-up to REWORK 7085915468.

  • Diff (f68c14b3..c0eb5d6c): one file, DesignModeMenu-36363.test.tsx, +3/−9. The three flagged dispatchEvent(new MouseEvent(…)) calls are now fireEvent.click(linkOf('leads')), fireEvent.pointerUp(window) and fireEvent.click(linkOf('home')). The assertions are unchanged, and no product code is touched.
  • CI at this head: 46 success, 15 expected skip, 0 pending. Lint UI and Test UI are green. The one cancelled PR-body guards run has a success on the same head, so it is not a red.
  • Live: the product code is identical to f68c14b3, which I ran live on HotCRM in 7085915468. Four flick shapes, including the case where dnd-kit never reports the end, each left the next plain click opening the page in-app. No new run is owed.

Non-blocking note carried from 7085915468: a pointerdown during a keyboard drag clears the flag.

Routing: the PR is 3,467 lines, over the 3,000-line size limit, so it goes to the maintainer as Tier H and not straight to the queue. That is the seat's call.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: TIER_DEFAULT
Head-sha: c0eb5d6c31669f4fdec99d7c0f91c8e9aead2fa0
Local-runs: none

Delta review of the record at f68c14b3 (comment 7085793985). Inputs read: card #36363 and PR #36437 (bodies, and the one comment since that record: the seat's REWORK for CI only, 7085915468), the one new commit c0eb5d6c316 and the check-runs on the head. The commit's parent is f68c14b3. It touches one file, ui/packages/app-shell/src/layout/__tests__/DesignModeMenu-36363.test.tsx, +3/−9. Code outside the delta was read only to judge it: DesignModeMenu.tsx at the head, the lint rule no-synthetic-event-trigger, and the installed @testing-library/dom 10.4.2 and @testing-library/react.

Gates: every check-run on the head has finished. There are 62: 46 success, 15 skipped, 1 cancelled, none red and none running. The cancelled one is a PR-body guards run (137359088142, started 21:19:26Z). A second PR-body guards run (137359237002, started 21:19:57Z) replaced it and is success. Lint UI, the check that was red on f68c14b3, is success. So are Type Check UI, Build & E2E UI, Live E2E UI, Plan Test UI shards, all 16 Test UI shards and their roll-up, and both Check Changeset runs. The condition on the earlier verdict (the running checks must end green) is met on this head.

Size: the PR is 3,449 added and 18 removed lines over 25 files. It is over the 3,000-line limb, so it goes to the maintainer as Tier H.

① Derived judgments

  • Nothing but three test lines changed. Right. The diff f68c14b3..c0eb5d6c is one test file. DesignModeMenu.tsx, designModeMenu.ts, designModeMenuSave.ts, the changeset and every other file are byte-identical to the last reviewed head.
  • The plain-click line in the real-pointer-drag case asserts what it did. Right.
    • Before: linkOf('leads').dispatchEvent(new MouseEvent('click', { bubbles, cancelable, button 0 })) inside act. Now: fireEvent.click(linkOf('leads')).
    • fireEvent.click builds a real MouseEvent with bubbles: true, cancelable: true and button: 0, and calls dispatchEvent on the same link. React Testing Library wraps the call in act. The event is the same in every property the code under test reads.
    • The assertion after it is unchanged: the router location is not what it was before the click. A stuck drag flag would make the window click listener cancel the click, the router link would not navigate, and the case would be red. The control holds.
    • The earlier half of the case (the drag played with real pointer events, and the click whose defaultPrevented is asserted) is untouched.
  • The flick case still exercises the window pointerup path. Right.
    • Before: window.dispatchEvent(new MouseEvent('pointerup', { bubbles: true })) inside act. Now: fireEvent.pointerUp(window).
    • fireEvent.pointerUp(window) does reach a window capture listener. Testing Library accepts the window as the node (getWindowFromNode takes the node.window branch), builds an event of type pointerup and calls window.dispatchEvent(event). The window is the event's target. A listener added on the target fires whatever its capture flag, so the onRelease listener added with window.addEventListener('pointerup', onRelease, true) runs.
    • onRelease reads nothing from the event. It reads and writes the two refs only. Whether jsdom builds a PointerEvent or falls back to a plain Event makes no difference.
    • The case's order is unchanged: onDragStart called with no end, the release on the window, a 350 ms wait (past the 300 ms window), a click on home, and the assertion that the location left /apps/crm. Without the pointerup listener the flag stays set, the click is cancelled and the case is red. The control holds.
  • The closing click of the flick case asserts what it did. Right. fireEvent.click(linkOf('home')) replaces the same hand-built click, as in the first case.
  • The rule is met, not dodged. Right.
    • The rule flags dispatchEvent(new MouseEvent(...)), new KeyboardEvent and new PointerEvent as a direct argument. The three flagged lines are gone.
    • The file's remaining dispatchEvent calls pass an event held in a variable. They are unchanged from effe780b, where Lint UI was green, and Lint UI is green on this head.
    • No disable comment and no rule change was added.
  • Every judgment of the record at f68c14b3 carries forward unchanged: S3 and N11 closed, the listeners added and removed correctly, a real drag's click still cancelled, a new press not breaking the next drag, the second-pointer and keyboard cases, nothing outside the editor affected, save logic unchanged, public surface unchanged.

Earlier findings, by id: M1, S2, S3 and N11 are closed. N13 and N14 are unchanged and stay open as recorded at f68c14b3; this commit neither fixes nor worsens them. N12 is unchanged and fit for #36538. N6 to N10 stay on #36538 and N5 on #36504, as the body states.

New findings:

No must-fix, no should-fix.

② Semver level

The changeset .changeset/36363-design-mode-menu-editing.md is unchanged in this commit: patch for @object-ui/app-shell and @object-ui/i18n. Clause-②: yes (widening) and Metadata-protocol: none each start a line in the PR body (lines 8 and 9) and in the changeset (lines 8 and 9).

  • Clause-②: yes (widening) is right. The delta is test-only. It removes or narrows nothing a consumer reads.
  • Metadata-protocol: none is right. No save logic changed.
  • Level. patch on both packages stays right. A test-only commit publishes nothing new.

③ Boundary flags

Implemented-by: claude/project-thread-iqvhau
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Seat record (2026-11-22T21:44Z) on head c0eb5d6c31669f4fdec99d7c0f91c8e9aead2fa0. This PR is 3467 changed lines (+3449/−18), over the 3000-line human-merge line, so it lands only after an account in GOVERNED_APPROVERS approves it.

维护者速读

席位核对

ACCEPT · Tier H (size limb: 3467 changed lines over the 3000-line human-merge line; Clause-②: yes (widening), Metadata-protocol: none)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Tier H hand-off (2026-11-22T21:45Z): this PR is 3467 changed lines, over the 3000-line human-merge line, so it waits for an approving review from GOVERNED_APPROVERS. Head c0eb5d6c31669f4fdec99d7c0f91c8e9aead2fa0. The seat record above (7086284648) carries the 维护者速读: seat ACCEPT, L1-e ACCEPT 7086258354, L2 delta PASS 7086271690. After an approving review the seat runs the pre-landing checks and enqueues it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 22, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 22, 2026 22:17
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit ee651ce Nov 22, 2026
67 of 68 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-iqvhau branch November 22, 2026 22:45
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
…led locked chip (objectstack-ai#36529)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9GPJ8pmbK219Pay95x25Uno)_
Fixes objectstack-ai#36507
Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:在仪表盘或报表上按「客户行业」这类关联字段钻取后,弹出列表顶部那枚锁定的条件标签,从「所属客户:= [object
Object]」变成「所属客户的行业:科技」(英文界面为「Account › Industry: Technology」)。
- 为什么做:属于「报表与仪表盘」专题,补上钻取弹窗那张卡留下的另一半,让读者看懂这份名单是按什么筛出来的。
- 出错会怎样:只影响这枚标签的文字,列表里筛出的记录不变;读不到关联对象的定义时退回显示原始字段名,可直接撤回。
- 要你做什么:无。

## What changes

- `ui/packages/plugin-list/src/conditions/conditionModel.ts` —
`readViewConditions` reads the nested-relation form (a lookup whose
condition is one related field equal to one scalar), as written and as
lowered to the triple `[lookup, '=', { field: V }]`, into one locked
chip whose `field` is the path `lookup.field` and whose operator is
`equals`. A plain-object value in a triple is never printed any more: a
nested condition the chip cannot say as one equality (several fields, an
operator map, a deeper relation, a non-`=` operator) reads as the
field-less 「View filter」 chip, which the model's header already promised
for any shape it does not read. New module-internal helper
`relationPathOf` (not exported from the package barrel). The
plain-object test is `isPlainRecord` imported from
`@objectstack/spec/data`, not a local copy (`check:spec-symbols` refuses
a local declaration under a spec export's name).
- `ui/packages/plugin-list/src/conditions/ListConditionControls.tsx` —
`viewChipText` labels a path chip as `relationPath(lookup label, related
field label)` + the value through `describeConditionValue` on the
related field, so a select's option label shows. New hook
`useRelatedConditionFields` reads the related object's definition
(`getObjectSchema(referenceTo)`, one read per distinct target, only
while such a chip is on screen, keyed on the target names) and
translates the field and option labels with `useSafeFieldLabel`
(`fields.OBJECT.FIELD`, `fieldOptions.OBJECT.FIELD.VALUE`), falling back
to the declared label, then the raw name. No record-name read is made
for a path chip.
- `listConditions.chips.relationPath` added to the default translations
and to all eleven locale packs, each in its own word order (`{{lookup}}
› {{field}}` in en/de/es/fr/pt-BR, `{{lookup}}的{{field}}`
zh-Hans/zh-Hant, `{{lookup}}の{{field}}` ja, `{{lookup}}의 {{field}}` ko,
`{{field}} ({{lookup}})` ru/ar).
- `.changeset/36507-drill-relation-chip.md` — patch,
`@object-ui/plugin-list` and `@object-ui/i18n`.

No new public ListView prop, no objectql change, no change to the
filter's execution shape: the chip is locked, as the card rules.

**Request count:** a list whose view filter carries a relation-path
condition makes one more `getObjectSchema` call per related object (the
HotCRM drill: `crm_account`, once). The ObjectStack adapter serves it
from its `metadataCache`. Lists with no such condition make no new call
(pinned by the CONTROL case).

**Shape measured:** PR objectstack-ai#36461's `drillConditions.ts` (read at its head
`5af2f6e3`) keeps the nested relation part as the list's base `filter`
(`{ crm_account: { industry: V } }`). `ListViewBlock`'s
`ElementDataSourceGate` lowers it through `toFilterNode` →
`convertFiltersToAST`, whose nested-relation arm writes `[field, '=',
condition]`. So the list's `readViewConditions` receives the triple,
which matches the card's measured chip (`data-field=crm_account`,
「所属客户:= [object Object]」). Both that triple and the card's written form
are read.

## Tests

Pins live in the shared harness
`ui/packages/plugin-list/src/conditions/__tests__/listConditions.test.tsx`
as a new top-level `describe` (AGENTS.md: a new pin for a component that
already has a shared harness file goes into that file), not in new
per-card files:

- model: the triple, the written object, the array element; two
unreadable nested shapes read as the field-less chip; CONTROL
`['amount', '>=', 10]` unchanged.
- en: chip reads `Account › Industry: Technology`,
`data-field="crm_account.industry"`, one
`getObjectSchema('crm_account')`, no `find`.
- zh-CN (I18nProvider, app bundle with `fields.crm_account.industry` and
`fieldOptions.crm_account.industry.technology`): chip reads
`所属客户的行业:科技`, the aria-label too.
- fallbacks: lookup not among the list's fields ⇒ `crm_account ›
industry: equals technology`, no read; definition read rejects ⇒
`Account › industry: equals technology`.
- CONTROL: a same-object view condition reads `Amount: >= 10`,
`data-field="amount"`, and reads no definition.

Existing tests changed: none.

## Acceptance notes

- The fallback chip text when the related definition cannot be read
keeps the operator word (`equals technology`): that is
`describeConditionValue`'s existing wording for an unknown field, the
same a same-object chip on an unknown field gets.
- A relation-path condition inside an `and` AST node at the top (a drill
whose base filter keeps two or more parts, e.g. a nested relation plus
an `$or`) still reads as one 「View filter」 chip: the model reads `and`
nodes that way for every condition, and the card names only the single
nested form. Not changed here.
- Latin-script packs (de/es/fr/pt-BR) carry the same format string as
en; the non-Latin packs carry their own word order, which
`untranslated-identity-4376.test.ts` asks for.

## Verification

Two-minute check: `pnpm --dir ui exec vitest run
packages/plugin-list/src/conditions/__tests__/listConditions.test.tsx -t
"related record"` ⇒ 6 passed.

Read first: `conditionModel.ts` `tripleChip` (the plain-object arm),
`ListConditionControls.tsx` `useRelatedConditionFields`, then
`viewChipText`.

<details><summary>Test and gate readings</summary>

All readings at head `6db1538b` (base origin/main `316f7571`).

- Patch round: `Type Check UI` was red at `749ddb3e` on
`check:spec-symbols`: `conditionModel.ts` declared a local
`isPlainRecord`, a name `@objectstack/spec/data` exports. `6db1538b`
imports the spec's (same predicate) and deletes the local copy. That
job's script steps rerun locally at `6db1538b` after the spec closure
build: `check:phantom-deps`, `check:self-import`,
`check:unreferenced-sources`, `check:doc-example-readers`,
`check:handler-key-reads`, `check:metadata-write-doors`,
`check:published-tsconfig-exclude`, `check:side-effects-array`,
`check:element-data-source-declaration`, `check:esm-specifiers`,
`check:spec-symbols`, `check:action-forward-parity`,
`check:designer-field-key-parity`, `check:icon-record-names`,
`check:i18n-keys`, `check:i18n-drift` ⇒ every one exit 0. The job's
turbo type-check over all ui packages is left to CI; the two packages
this diff touches were type-checked below.
- Dependency closure: `pnpm --workspace-concurrency=2 --filter
'@object-ui/plugin-list^...' build` under the verify lock ⇒ `VERDICT
command-exit 0`.
- Package tests: `vitest run packages/plugin-list/ packages/i18n/` at
the first commit ⇒ 290/291 files, 1 failed:
`untranslated-identity-4376.test.ts` flagged the new key byte-identical
to en in zh/ja/ko/ru/ar. Fixed by giving those packs their own word
order (third commit). At `6db1538b`: `vitest run
packages/plugin-list/src/conditions/ packages/i18n/` ⇒ `Test Files 108
passed (108)`, `Tests 2046 passed | 13 skipped`, `VERDICT command-exit
0`.
- At `6db1538b`: `pnpm --filter @object-ui/plugin-list run type-check`
and `pnpm --filter @object-ui/i18n run type-check` ⇒ `VERDICT
command-exit 0` (the harness file is in `tsconfig.test.json`'s program,
`--listFilesOnly` count 1).
- Ablation (committed fix first; `scripts/ablation-replace.mjs`, anchor
x1 → x0, blob `cfa314f0` → `87ab0641`): the plain-object arm of
`tripleChip` removed ⇒ 5 of the 6 new cases red, the CONTROL green; the
zh-CN case received `所属客户:= [object Object]`, the card's measured chip.
Restored: blob == HEAD `cfa314f0`, `git diff HEAD` empty.
- Derived gates (`dispatch-gates.mjs --commands`, 41 families, same list
at `6db1538b` as at `749ddb3e`): every one run untimed, every one `exit
0`. `--ran` reconciliation: 41 derived, 41 run, 0 NOT-MEASURED (a
derived zero).
- `pnpm --dir ui exec vitest run scripts/` under the lock at `6db1538b`
⇒ `Test Files 172 passed | 2 skipped`, `VERDICT command-exit 0`.
- `node scripts/pm/overlap-check.mjs
--branch=claude/issue-36507-drill-relation-chip` at `6db1538b` ⇒
`VERDICT clean exit 0` (merges cleanly with origin/main and with objectstack-ai#36437,
objectstack-ai#36411, objectstack-ai#36351, which share the locale files).

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- signed: repo:objectstack#2 · os-steve ·
session_01ADHkmRGDrq6JSytBsNFabU -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
…enu, and a lane statistic (objectstack-ai#36411)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbCxiFE11rsKwyNffJZKYqJs)_

repo:objectstack#7 · zhuangjianguo · session_01QsR2jRKaa4gJCNNF5QMd8t

Fixes objectstack-ai#36370

Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: carried by objectstack-ai#36422

Claim: 7076741092

## 维护者速读

- 改了什么:看板视图的「视图设置」换成看板自己的一套——分列字段(只列单选/单选按钮字段)、显示哪几列(「5 /
7」,可拖动排序、可隐藏)、卡片上显示的字段(拖动排序、隐藏、「+ 添加字段」)、「显示字段名」「隐藏空字段」两个开关、列底统计(无 / 计数
/ 数字字段求和);表格的「显示的列 / 分组 / 行高 / 行颜色」在看板上不再出现。每列表头加「+」(新建并预填该列的值,空列另有「+
新建」行)和「⋯」(折叠这一列、隐藏这一列)。
- 规则:除折叠外,所有改动沿用 objectstack-ai#35955 的草稿规则——立即生效、出现「放弃 /
保存」、保存前不写任何东西;「保存到这个视图」「另存为我的视图」都带上看板设置。折叠只记在本浏览器,按「用户 : 对象 :
视图」分开(localStorage 键 `objectui:kanban-lanes-collapsed:<用户 id>:<对象>:<视图
id>`)。隐藏一列沿用 objectstack-ai#28211 `lanes` 的含义:这一列的卡片移到「未分类」,菜单和「显示哪几列」页都写明这一点。
- 协议:`KanbanConfig` 加三个可选键:`summary`(新的 `KanbanLaneSummary`,只收
`{type:'none'}` / `{type:'count'}` / `{type:'sum', field}`,`sum`
必须写字段;优先于 `summarizeField`)、`showFieldLabels`、`hideEmptyFields`(两者缺省为
true,即现在的卡片),均无 spec 默认值,旧视图不变;L2 看 schema 面。lint 检查
`kanban.summary.field`(字段名、以及求和字段的类型;是 / 否字段不能求和,和设置面板一致)。另修 Console
一直丢掉 `kanban.lanes` 的转发(objectstack-ai#28211),并让 Studio 预览(plugin-view)也转发三个新键(即
objectstack-ai#36426 要的转发,由座位关闭该卡)。
- 未做:列底求和现在只算已加载的卡片(列未加载完时写明「仅已加载的卡片」),整列求和、平均 / 最小 / 最大要等服务端按列聚合,另立
objectstack-ai#36520;查找 / 人员 / 主从 / 树形字段分列另立 objectstack-ai#36430(卡片验收里「换成商机负责人」这一条随它走,本 PR
用另一个单选字段「审批状态」验收);卡片底部图标开关另立 objectstack-ai#36423;新增列选项、卡片布局、Studio 设计器、手机看板不在本卡范围。

## What changes

**1. The board's own 视图设置 (`plugin-list`).** `ViewSettingsPopover` takes
a `kanban` prop (`ViewSettingsKanban`); `ListView` builds it on a board,
and the panel then draws, in place of the table's columns, Group, Row
height and Row colour:

| Row | What it writes |
|---|---|
| 分列字段 (lane field) | `groupByField`, from the object's `select` and
`radio` fields, and drops `lanes` with it |
| 显示哪几列 `5 / 7` | `lanes`: hide, show (at the end), drag to reorder,
「显示全部」; the last shown lane has no eye; `undefined` when the list is
every option in its own order |
| 卡片上显示的字段 | `columns`: drag, hide in place, 「+ 添加字段」 adds at the end |
| 显示字段名 / 隐藏空字段 | `showFieldLabels` / `hideEmptyFields`: `false` when
turned off, absent when on |
| 列底统计 | `summary`: none, count, or the sum of a field the aggregate
table's `sum` row accepts (a number or currency; no percent, formula or
yes / no field); None over a view with `summarizeField` writes `{ type:
'none' }` |

`ListView` gains `onKanbanChange(patch)` (`null` in a patch means the
key leaves the block) and `laneCollapseKey`. The phone settings sheet
shares `ViewSettingsContent`, so it shows the same board rows.
`FieldList` gains `hiddenTitle` and `typeIcons` so the lanes list reads
「隐藏的列」, draws no field-type icon, and carries the line
「隐藏的列里的卡片会显示在「未分类」。」

**Lane fields left out.** A lookup, user, master-detail or tree field
draws no sensible lanes yet: the board keys a lane on the stored value,
and an expanded reference is an object (measured live: `[object Object]`
lanes). A boolean has no options to title its lanes. So the picker
offers `select` and `radio` only, and objectstack-ai#36430 carries the reference
lanes. An authored lookup `groupByField` draws wrong today,
independently of this PR.

**Hiding a lane.** `lanes` keeps its objectstack-ai#28211 meaning: it picks lanes, not
records, so the cards of a hidden lane show under 「未分类」. The 「⋯」 item
reads 「隐藏这一列」 with 「这一列的卡片会移到「未分类」」 under it, and the lanes level says
the same.

**2. Lane header 「+」 and 「⋯」 (`plugin-kanban`).** `ObjectKanban` takes
the host's `laneMenu` request (`KanbanLaneMenuRequest`: `collapseKey`,
`onHideLane`, `onCreateInLane`), relayed to `KanbanImpl` over a
package-private context (the `KanbanColumnSummary` pattern; never a node
key). Without it no header draws either control. 「+」 reports its lane;
an empty lane also gets a 「+ 新建」 row. 「⋯」 holds 折叠这一列 / 展开这一列 and 隐藏这一列;
the `Uncategorized` lane offers collapse only. Collapse is kept per
browser under `objectui:kanban-lanes-collapsed:<collapseKey>`, written
only after a user toggle; `ListView` passes `<user id>:<object>:<view>`,
the view named by the host's `laneCollapseKey` (the Console passes the
view's id), else the schema's `id`, else `-`; a signed-out reader is
`-`. A collapsed lane's heading opens it again, and an open lane keeps
its bare title. `ListView` wires create as `onEdit({ [laneField]: value
})`, the seeded-record create the calendar already uses
(objectui#12291), and hide as unticking the lane (at least one lane
stays).

**3. The lane statistic and the card toggles (`plugin-kanban`).**
`summary` draws at each lane's foot (`[data-kanban-lane-statistic]`, 「计数
2」, 「合计 · 金额 ¥40」) and replaces the `summarizeField` header total; `{
type: 'none' }` draws neither. `laneStatistic(cards, field, type)`
counts or sums. `count` is the lane's own count, the server's where the
board pages the lane, and a windowed count reads `+`. **`sum` totals the
cards the lane has loaded, not every record of the lane**: a windowed
lane's sum says so, 「合计 · 金额 · 仅已加载的卡片」
(`data-kanban-lane-statistic-partial`), rather than a `+` on a sum, and
the `summary` docblock and `.describe()` say the same. **Why no
push-down here:** the board has no lane aggregate read today, and adding
one (one grouped `sum` over the view's filter, answering every lane) is
the next stage. Per the maintainer's ruling of 13:52Z
(「还没开工的不应该开工啊,分多个阶段的只做完当前阶段」) and seat 7's ruling on L2 S3, this PR
ships the current stage only and objectstack-ai#36520 carries the server lane
statistic: the whole-lane sum, then average, minimum and maximum. Those
three are not admitted by the schema meanwhile: over the loaded cards of
a windowed lane they would be wrong with no honest marker.
`showFieldLabels: false` draws card values without their names
(`KanbanCardDisplayContext`); `hideEmptyFields: false` keeps an empty
field's line with a dash. Without the keys, boards draw as before.

**4. The draft (`app-shell`).** The board's changes are a list-draft
part: `ListDraft.kanban` holds only the changed keys (`nextKanbanDraft`
drops a key changed back to the view's own as the board draws it,
`kanbanViewOptions`, so an auto-detected lane field picked back is no
change; `null` = removed). `objectViewListRenderer` lays it over the
view's block (`layKanbanDraft`) and wires `onKanbanChange`; `ObjectView`
hands it to 「保存到这个视图」 and 「另存为我的视图」 as `display.kanban`, and Discard
drops it. On a board whose view declares no `kanban` block (or one
without `groupByField`), the lane field is auto-detected, so the draft
holds no lane; `kanbanDraftToSave` lays the lane the board draws under
the draft, so a saved block carries the `groupByField`
`KanbanConfigSchema` requires whenever the board draws one (a view
naming no lane on an object with no detectable lifecycle field draws no
lanes, and a save there is refused by the server as before) (found in
the L2 of 7258985; red without the fix on both save paths, pinned).
`ListDraftActions` lists the part as 「看板设置」.

**5. In-surface fixes: both producers relay the board block.**
`kanbanViewOptions` (Console) relayed the lane field, title, card fields
and `summarizeField` but never `lanes`, so a Console board drew every
option whatever the view declared (objectstack-ai#28211). It now relays `lanes` (a
non-empty array) and the three new keys, each only when declared.
`plugin-view`'s `ObjectView#generateViewSchema` (Studio preview, SDUI
`object-view`) relays `summary`, `showFieldLabels` and `hideEmptyFields`
the same way, so `summary: { type: 'none' }` hides the header total
there too. This is the relay objectstack-ai#36426 asks for; objectstack-ai#36426 holds no claim
naming this branch, so the seat closes it.

**6. Lint (`@objectstack/lint`).** `validate-list-view-field-refs` walks
`kanban.summary.field` as a field reference (`error`, the
`columns[].summary.field` level: a stale name draws nothing, so the
statistic the author asked for is gone without a word), and refuses,
under `list-view-summary-field-type-refused` at `kanban.summary`, a
`sum` over a field the aggregate table's `sum` row refuses **and over a
`boolean` or `toggle` field**, which the table admits but the board does
not add (the picker leaves them out the same way). `os explain` names
the position.

**7. Spec widening (`@objectstack/spec`).** `KanbanConfigSchema` gains
`summary: KanbanLaneSummarySchema.optional()`, `showFieldLabels:
z.boolean().optional()`, `hideEmptyFields: z.boolean().optional()`, no
defaults. `KanbanLaneSummarySchema` is a discriminated union of `none`,
`count` and `sum` with a required non-empty `field` (exports
`KanbanLaneSummary` and `KanbanLaneSummaryParsed`). Regenerated:
`authorable-surface/ui.json`, `api-surface`, `export-origins`, the
strictness ledger,
`content/docs/references/{ui/view,api/protocol,data/object,index}.mdx`.
`variant-docs.json` gains the union's row (`generated-reference-only`;
the teaching is objectstack-ai#36422). Liveness: the `kanban` row of
`liveness/view.json` names each key's read points on both producers.

## Seat rulings this PR follows

Both from seat 7 (`domain:objectstack` seat 7, thread session
`session_01QsR2jTeURPvEm465RcoYEC`), in the objectstack-ai#36370 card thread at
2026-11-22T11:19Z, answering this PR's two questions:

- **A (lane fields):** 「the lane-field picker offers only option-backed
fields (select and radio, plus boolean only if it draws sensibly). Say
in the body that lookup, user, master_detail and tree lanes are out, and
I will file a card for them: distinct-value lanes, FK bucketing, FK lane
queries and FK writes on drag. Also say that an authored lookup
groupByField draws wrong today, independent of this PR.」 The card is
objectstack-ai#36430 (seat 7, 11:24Z). The card's acceptance line 「把分列字段换成『商机负责人』」
names a user field, so it moves to objectstack-ai#36430; the live run below switches
to the other select field, 审批状态.
- **B (hiding a lane):** 「keep objectstack-ai#28211's meaning of lanes in this PR,
because changing a published key's meaning is the maintainer's call. In
the body, say plainly that hiding a lane moves its cards into 未分类, and
use a menu label and help line that tell the truth about it.」

Also followed: seat 7 on L2 S3 (2026-11-22T16:41Z): carrier, no
push-down in this PR, current stage only; objectstack-ai#36520 filed.

## Left out (stated)

- **The whole-lane sum, and average, minimum, maximum lane statistics**:
wait for a server lane read, objectstack-ai#36520 (above).
- **Lookup, user, master-detail and tree lane fields**: objectstack-ai#36430.
- **Card footer icons toggle**: no per-board data (no per-card comment
or attachment count, no stage-entered timestamp). objectstack-ai#36423.

## Tests

- `plugin-kanban/src/ObjectKanban.laneMenu-36370.test.tsx` (4): no
controls without `laneMenu`; 「+」 and the empty-lane row report their
lane, an open lane's heading is no disclosure; 「Hide column」 reports its
lane, `Uncategorized` offers collapse only; collapse persists under the
host key, reopens from the heading, another key is unaffected.
- `plugin-kanban/src/ObjectKanban.laneStatistic-36370.test.tsx` (7):
count, sum (in place of the header total), none (also over
`summarizeField`), a partial sum worded as the loaded cards' with its
CONTROL, the two toggles and their defaults; `laneStatistic` units.
- `plugin-list/src/__tests__/ViewSettingsPopover.kanban-36370.test.tsx`
(6) and `ListView.kanbanSettings-36370.test.tsx` (3): the board rows and
none of the table's; the lane field picker offers select and radio only;
the statistic offers number and currency sums and no percent, formula or
boolean; lanes hide/show/keep-last with the 「Hidden columns」 heading and
no type icon; card fields hide/add; toggles and statistic writes; the
collapse key per reader, object and view; the zh pack names every row.
- `plugin-view/src/__tests__/ObjectView.harness.test.tsx` (+1): the
three keys reach the generated board node when declared, none when not.
- `app-shell/src/views/kanbanDraft-36370.test.ts` (7) and
`ObjectView.kanbanSaveAs-36370.test.tsx` (3; the first red without the
save-as fix, the other two red without `kanbanDraftToSave`: 「另存为我的视图」
and 「保存到这个视图」 on a board with no `kanban` block store `groupByField`):
the draft keeps changed keys only; lay with `null`; Save lays the draft
into a body `ListViewSchema` accepts; 「另存为我的视图」 on a package board
writes nothing before Save and stores the board's changes; the
`kanbanViewOptions` relay and its omissions.
- `packages/spec/src/ui/kanban-config-lane-summary.test.ts` (4) and
`packages/lint` (+5 cases): the schema takes none, count and a field's
sum and refuses avg/min/max, a fieldless sum and a stray key; lint's
stale-field row, the sum-type verdict, and a sum over a `boolean` and a
`toggle` refused at `kanban.summary`.
- After the L2 of 7258985 (this head): `@objectstack/lint`
`validate-list-view-field-refs.test.ts` 199 / 199; the 32 app-shell
files naming kanban, the draft, personal views, save-as, shared-view
save, the footer calculation draft, the stored row or view options, 269
/ 269; `@objectstack/spec` `src/ui` 185 / 6568; `check:generated` all 14
up to date; eslint on the moved files 0 errors.
- Suites on the earlier head: `plugin-kanban` 83 files / 546 tests,
`plugin-list` 186 / 2027, `plugin-view` 66 / 730, `@object-ui/i18n` 106
/ 1978, `@objectstack/lint` 225 / 9431, `@objectstack/spec` 964 / 29475,
and the app-shell test files naming kanban, the list draft, personal
views or the relay; type-check of `plugin-kanban`, `plugin-list`,
`plugin-view`, `i18n`, `app-shell` and `lint` exit 0. `dispatch-gates
--ran`: 121 derived, 121 run, 0 NOT MEASURED. `overlap-check`: merges
cleanly with main; objectstack-ai#36435, objectstack-ai#36437 and objectstack-ai#36316 meet it only on generated
counts and the de quote-pair pin, which the second to land regenerates.

## Verification (live)

**Head `9f8726f1ec` is a merge of `main` (`65ce7983`) on top of
`16a019dc05`, with no code change.** It resolves the de quote-pair pin
to 127 (main's 125 plus this PR's two spans) and regenerates the
deferred references and `authorable-surface/ui.json`. The test and live
readings below stand from `16a019dc05`. On the merged tree,
`ObjectView.kanbanSaveAs-36370`, `kanbanDraft-36370`, plugin-view
`ObjectView.harness` and `de-quote-pairing-3876` were rerun (4 files,
139 tests, all green), `check:generated` reports all 14 artifacts up to
date, and `overlap-check` is clean.

**Head `dd9e0bb782` is a second merge of `main` (`84853fd1`), with no
code change.** It clears the runner-shutdown cancel on `9f8726f1`'s Type
Check · workspace. The merge was textually clean. `view.mdx` and
`object.mdx` were regenerated, and `check:generated` is clean. On the
merged tree, vitest over `i18n`, `plugin-kanban`,
`ObjectView.kanbanSaveAs-36370` and `objectViewOptions` passed (190
files, 2527 tests). `overlap-check` is clean against main and open PRs.

Local backend (`objectstack dev --seed-admin --fresh`) and the Console
in zh (CNY), signed in as the seeded administrator, at the code of
16a019d. Two boards: the CRM example's pipeline (a view the read-only
CRM package ships) and a **self-built app** made through the
administrator's own doors (`POST /api/v1/packages` for package
`com.qa.board36370`, then `PUT /api/v1/meta/object/qab_task`, `PUT
/api/v1/meta/view/qab_task.board` and `PUT /api/v1/meta/app/qab_app`
into it, five records by `POST /api/v1/data/qab_task`; lane field 阶段 =
待办 / 进行中 / 评审 / 完成, card fields 名称 / 工时 / 备注, 备注 empty on three cards).

**Screenshots are not inline.** GitHub has no API that uploads an image
into a PR body (the `user-attachments` upload is the browser's only),
and AGENTS.md's 「Delete temporary artifacts — screenshots…」 rule keeps
them out of the branch. They are in the project folder `issue-36370/`
under the names given below; the seat weighs this against the card's 「PR
正文附视图设置和列菜单的截图」.

Writes are read off the browser's network log. The only writes not
listed are the reader's recent-items rows (`sys_user_preference`,
written when a page opens, before any change).

CRM pipeline (first run):

- 视图设置 shows 分列字段 阶段, 显示哪几列 5 / 5, the card fields, both toggles and
列底统计; no 显示的列, 分组, 行高 or 行颜色. The lane field picker offers 阶段 and 审批状态
(both select). The statistic offers 无, 计数, 合计 · 金额 and 合计 · 产品合计.
(`settings.png`, `settings-lane-field.png`, `settings-summary.png`)
- On the package view: hiding 输单, turning 显示字段名 off and picking 计数 apply
at once (4 lanes plus 未分类, no `dt`, 计数 1 / 2 / 1 / 7 / 1) with **no
write**; 放弃 restores every lane, label and the header total with no
write. Save offers 另存为我的视图 alone. (`settings-lanes.png`,
`board-sum-nolabels.png`)
- 另存为我的视图: one `POST sys_personal_view`; the new view opens with the
changes and keeps them after a reload. **This run found the path dropped
the board part**; fixed in `ObjectView#handleSaveAsMyView` and pinned.
(`board-saved-reload.png`)
- On that own view: 合计 · 金额 at each foot; 保存到这个视图 writes one `PATCH
sys_personal_view`, kept after a reload. (`save-menu-own.png`)
- 「⋯」 on 需求确认 offers 折叠这一列 and 隐藏这一列 with its 未分类 line; collapse is
stored under `objectui:kanban-lanes-collapsed:<user
id>:crm_opportunity:<view id>` and holds after a reload.
(`lane-menu.png`, `board-collapsed.png`)
- 「+」 on 方案报价 opens 新建商机 with 阶段 = 方案报价. (`lane-create.png`)
- **This run also found the statistic offering a sum of the two percent
fields**; the picker now asks the aggregate table's `sum` row, as lint
does.

CRM pipeline (supplement for the acceptance lines the first run did not
walk):

- **Lane field swap, then 放弃.** 分列字段 → 审批状态: the board re-lanes at once
to 待审批 / 已批准 / 已驳回 / 已撤回 / 未分类 (all 12 opportunities in 未分类, none has an
approval status), 放弃 / 保存 appear, **no write**. 放弃: back to 初步接洽 / 需求确认
/ 方案报价 / 赢单 / 输单, the bar gone, no write. (`sup-lane-field-picker.png`,
`sup-relane-approval.png`) The card's line names 商机负责人, a user field,
which ruling A moves to objectstack-ai#36430.
- **Drag a lane to the front.** In 显示哪几列, dragging 方案报价 onto the first
row (a mouse drag) orders the list 方案报价 / 初步接洽 / 需求确认 / 赢单 / 输单 and the
board follows in that order, with 放弃 / 保存 and no write.
(`sup-lanes-order.png`, `sup-board-reordered.png`) The pipeline has no
谈判 stage, so the lane is 方案报价.
- **隐藏空字段.** With 审批状态 added as a card field (empty on every card):
隐藏空字段 on, 36 field rows and no dash; turned off, 48 rows, the 12 new
ones each 「—」; no write. (`sup-hide-empty-on.png`,
`sup-hide-empty-off.png`)
- **Another browser.** With 需求确认 collapsed in one browser, a second
browser context signed in as the same reader (its own local storage)
draws 需求确认 open with its two cards and holds no collapse key.
(`sup-other-browser.png`)

Self-built app (`com.qa.board36370`), administrator:

- The board draws 待办 / 进行中 / 评审 / 完成 with 7 field rows (empty 备注 takes
none). 视图设置 shows the same board rows; the statistic offers 无 / 计数 / 合计
· 工时. (`self-board.png`, `self-settings.png`)
- 合计 · 工时 picked and 隐藏空字段 turned off: 10 rows, three 「—」, feet 合计 · 工时
8 / 8 / 2 / 1. 隐藏空字段 back on and 评审 dragged to the front: 7 rows, lanes
评审 / 待办 / 进行中 / 完成, feet follow. No write. (`self-empty-off.png`,
`self-changed.png`)
- **保存到这个视图 as an administrator**: Save offers 保存到这个视图 and 另存为我的视图; the
confirmation reads 「保存到这个视图?所有用「任务看板」的人都会看到这些改动。」; confirming writes
`PUT /api/v1/meta/view/qab_task.board?mode=draft` with `kanban: {
groupByField: 'phase', columns: [...], summary: { type: 'sum', field:
'hours' }, lanes: ['review','todo','doing','done'] }` (no
`hideEmptyFields`: it was turned back to the view's own) and `POST
…/publish`. After a reload the board draws 评审 first with the 合计 · 工时
feet and no draft bar. (`self-save-menu.png`, `self-save-confirm.png`,
`self-after-reload.png`)

NOT MEASURED live: the partial-sum wording (no lane here holds more than
it loaded; pinned in the unit test), and the Studio preview relay
(pinned in plugin-view). The board with no `kanban` block was measured
in tests only (both save paths), not live.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- signed: repo:objectstack#7 · zhuangjianguo ·
session_01QsR2jRKaa4gJCNNF5QMd8t -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
…custom package (objectstack-ai#36499, PR 2 of 2) (objectstack-ai#36624)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9Wq5utqEodnDCBh6heq37AG)_
Fixes objectstack-ai#36499

Clause-②: yes (widening)
Metadata-protocol: none

## 维护者速读

-
用户能看到什么变化:管理员在已安装(只读)应用的记录页「…」第一项就能「配置页签」,可拖动全部页签、隐藏或恢复关联页签,每个页签标明来自原包、其他包还是本环境;保存后所有人看到新排列,原包不动。自建应用的入口也挪到「…」第一项。
- 为什么做:本卡「记录页就地配置页签」的第二个也是最后一个合并请求,替管理员省去进 Studio 改已安装对象的绕路。
-
出错会怎样:只影响已安装对象记录页的页签排列,写在该应用配对的定制包里;管理员可再次进入配置改回,原包始终不变。定制总览读接口暂不列出页签排列,已另开卡跟进(定制总览列出页签排列)。
- 要你做什么:无(是否允许在已安装对象上隐藏附件、审批、动态三个内置页签,已另开决策卡等你裁定)。

## What changes

**Installed objects (card items 4 and 7).** On the record page of an
object whose package is installed read-only, 「Configure tabs」 is now
offered too. The gate is PR 1's admin gate (Studio opens the object,
posture `view` here) plus `useCustomizeDoorWalled()`: where the
customization door is walled (`group` / `isolated`), the entry is not
offered. The edit state is the same one PR 1 built: the design-mode
shell from objectstack-ai#36437, reused unchanged.

- Every tab can be moved: the object's own lists, a list another package
brings, and the built-in 附件 / 审批 / 动态.
- A related tab can be hidden and shown again. A built-in tab cannot be
hidden here, because the `.custom` list cannot hide it (spec: "cannot be
hidden here"). An attachments tab the base does not draw waits in
「Hidden」 and can be shown from there.
- Each related tab carries a source mark: 「Original package」, 「From
PACKAGE」 or 「This environment」.
- 「Save」 writes the `relatedLists` of the pair's object extension
(`object_extension`, filed under the object's name, in the base's paired
`.custom` package), in objectstack-ai#36498's shape. The write lists every shown tab
in order (a built-in by its bare name) and then every hidden related tab
as `{ list, hidden: true }`. A tab the list does not name is served
after the named ones.
- The pair is resolved through the ensure door (`POST
/packages/:id/ensure-customization`). That door creates the pair on the
first save, as Studio does. A pair the server does not list as writable
is refused before any write.

**One shared writer.** `views/objectExtensionArrangementSave.ts`,
`saveObjectExtensionArrangement`, is the only write of an installed
object's arrangement keys (`CUSTOM_ARRANGEMENT_KEYS`).

- It reads the pair's STORED extension and the object as stored (the
layered read).
- It replaces only the keys its caller returns. Every other key is kept:
`fields`, `fieldPatches`, `place`, the other arrangement key.
- It saves a draft with the first-write pin (`ifNoneMatch: '*'`), then
publishes. A refused publish discards that draft.
- It announces the refresh through the door.

The field-layout editor in objectstack-ai#36505 is meant to be its second caller
(`fieldGroups`). objectstack-ai#36505 is not implemented here.
`resolveRecordTabsSaveTarget` now answers `{ kind: 'package' } | { kind:
'pair' }`.

**The 「…」 entry is the first item (card item 1).** `page:header`
(`containers.tsx`): a host overflow entry that declares `leadsMenu:
true` is drawn first, ahead of Refresh, with a separator. Only host
entries can claim this place; an authored action cannot. The record
page's 「Configure tabs」 declares it, on self-built and installed objects
alike. No other entry declares it, so no other menu changes.

**A stored title is kept (fix to PR 1's write).** Since objectstack-ai#36574, the
served `relatedLists` labels are translated for the reader. PR 1 wrote
the editor's labels back as they were, which would have stored a
reader's translation as the title. Now a tab's stored label is written
unless the administrator renamed it (`recordTabLabelToWrite`). This
holds on both paths.

**i18n.** New keys under `designMode.recordTabs`: `pairNotWritable`,
`builtinMoves`, `sourceBase`, `sourcePackage`, `sourceEnvironment`. They
are added to all eleven locales; zh-Hant is regenerated by
`gen-zh-hant`.

## Tests

New files, named for the card:
-
`ui/packages/app-shell/src/views/__tests__/objectExtensionArrangementSave-36499.test.ts`
(6)
-
`ui/packages/app-shell/src/views/__tests__/recordTabsInstalled-36499.test.ts`
(7)
-
`ui/packages/app-shell/src/views/__tests__/RecordTabsConfigInstalled-36499.test.tsx`
(3)

**Existing tests changed** (both are PR 1's):
-
`ui/packages/app-shell/src/views/__tests__/recordTabsConfigSave-36499.test.ts`:
  - the doors gain `ensureCustomization` and `client.get`;
  - TEXTS gains `pairNotWritable`;
  - the read-only refusal case is replaced by the pair target;
  - the seam test expects the pair target.
-
`ui/packages/components/src/__tests__/page-header-overflow-close-36499.test.tsx`:
  - `renderHeader` takes `headerSystemActions`;
  - a new describe has 2 cases for `leadsMenu`.

Ablations. The fix was committed first. Each mutation was written with
`ablation-replace.mjs`, and each restore was proven by blob == HEAD.
- Dropping the `leadsMenu` flag: 1 test red.
- `recordTabLabelToWrite` returning the served label: 2 tests red.

<details><summary>Test and gate runs at head c7f9b58 (all through
os-verify-lock)</summary>

- The card's files plus PR 1's: 7 files, 44/44 passed.
- `packages/app-shell/src/views/RecordDetailView.*`: 99 files, 826/826
passed.
- components `page-header*`, `layout-containers*`,
`horizontal-overflow*`, `page-tabs*`, plus plugin-detail
`RecordPageColumns*` and `RecordRelatedListRenderer*`: 64 files, 598/598
passed.
- i18n `src/__tests__`: 106 files, 1978 passed and 13 skipped.
- `ui/scripts/` (a derived family): 174 files, 5127 passed and 2
skipped.
- `type-check` (both `tsconfig.json` and `tsconfig.test.json`) for
app-shell, components and i18n: exit 0.
- `dispatch-gates --commands`: 41 derived families, all run, all exit 0.
`--ran` reconciles them as 41 run, 0 NOT-MEASURED.
- The 40 `ui` lint-workflow checks, including `check:spec-symbols`,
`check:i18n-keys`, `check:i18n-drift` and `check:metadata-write-doors`:
exit 0.
- `check:doc-examples`, `check:doc-snippets` and `check:readme-exports`
first answered PRECONDITION NOT MET because `@object-ui/cli` was not
built. After building it, all three gave exit 0.
- `check:new-line-citations`: exit 0.
- `check:test-source-alias` and `check:nul-bytes` (both derived): exit
0.
- eslint with the ADR-0054 `no-synthetic-event-trigger` ratchet, on the
24 changed ui files: exit 0.
</details>

At head 28193db (patch round 1, after a merge of main): own and PR 1
files plus `DataPillar.panelHold-27629` 8 files 49/49; `ui/scripts/`
5127 passed and 2 skipped; app-shell and components `type-check` exit 0;
41 derived families exit 0, with `--ran` reporting 0 NOT-MEASURED;
`check:i18n-keys`, `check:i18n-drift`, `check:spec-symbols`,
`check:new-line-citations` and the three `check:vi-mock-*` checks exit
0. The large neighbour suites (RecordDetailView.*, i18n, page-header)
were not re-run locally after this merge; CI runs them.

## Acceptance notes

- **The customizations read does not list an arrangement: moved to
objectstack-ai#36626** (seat routing, 2026-11-23 04:26Z). After the save, `GET
/api/v1/packages/com.example.showcase/customizations` answered `200`
with every list empty. The extension itself is there: `GET
/api/v1/meta/object_extension/showcase_account?package=com.example.showcase.custom`
answers it. The read's contract is strict and names exactly three member
kinds, `extensions.kind` = `field` | `validation` | `index`, so a
`relatedLists`-only extension (and a `fieldGroups`-only one, for objectstack-ai#36505)
has no entry to appear as. Making it appear is a spec and runtime
change, carried by objectstack-ai#36626, not by this PR.
- **H2 (a per-tab source on `_relatedListsArrangement`) does not hold;
the narrow gap below is an accepted deviation** (seat routing,
2026-11-23 04:26Z; no card). The decoration carries `{ packageId,
hidden, unlisted }` and nothing per tab. The source marks are derived
from data the client already has:
- the child object's `_packageId`: the base means the original package;
`sys_metadata` or a `.custom` package means this environment; anything
else means that package;
  - a relationship field named `__c` means this environment.

The remaining gap: a relationship field that another package's extension
adds to a base-owned child object shows as 「Original package」. Closing
it needs a per-tab source from the server. No spec or server change is
made here.
- **Built-in tabs stay locked here: hiding them goes to decision card
objectstack-ai#36627** (seat routing, 2026-11-23 04:26Z). On installed objects 附件 / 审批
/ 动态 can be moved but not hidden: the spec says the `.custom` list
cannot hide them ("cannot be hidden here"). They are not renamable
either, on either path: a built-in entry is a bare name in the spec's
shape and carries no label, so there is no place to store a rename. Seat
ruling 7089839334 (no spec card for hiding 审批/动态 on self-built objects)
is unchanged.
- **Translated labels.** PR 1 combined with objectstack-ai#36574 would have written a
reader's translated tab title into the stored definition on any save.
Fixed on both paths; see What changes.
- **Visible effect beyond the card.** 「Configure tabs」 now sits above
Refresh in every record 「…」 where it is offered, including on self-built
objects (PR 1 placed it after Refresh). No other menu entry moves.
- **Observation, not filed.** For an installed object, the layered
read's `code` layer (`GET
/meta/object/showcase_account/layers?package=com.example.showcase`)
answered the extension-folded `relatedLists`, while the showcase source
declares none. The writer reads entries in the order extension first,
then owner, so this does not change what is written. I note it because a
reader of `code` would take the result for the package's own definition.
- **CI patch round 1 (head 28193db).** At c7f9b58, `Test UI (13/16)`
went red on one test that this change does not touch:
`DataPillar.panelHold-27629` › "Show me" reopens the action…, a 3000 ms
`waitFor` on the held line. That test was last changed by objectstack-ai#36597 on
main. No file in its import graph is in this diff, and the dom project
runs `isolate: true`, so no other file's mocks reach it. Under
os-verify-lock it passed alone (5/5) and with all 41 `DataPillar.*`
files on 4 workers (209/209). The merge group's CI for objectstack-ai#36597 and the
later runs on main are green. I read it as a timing flake in a loaded
shard (that file took 10 s there), not a defect of this change, so no
code or test was changed for it. The new head is a merge of main
(3110de5), which re-runs CI.
- **H1 holds.** The extension is written as `object_extension` in the
pair, and only `relatedLists` is replaced (unit:
`objectExtensionArrangementSave-36499` keeps `fields`, `fieldPatches`,
`place` and `fieldGroups`). Live: the second save in the browser pass
read back the first save's extension and replaced only its list.

## Verification

Browser pass at head `0aacc5aad`, with the same code as this head; the
merge of main brought in no file this change reads.

- Booted example app: `examples/app-showcase` (`objectstack dev --ui
--seed-admin`, own port and DB). The console was rebuilt from this
branch.
- Installed read-only package: `com.example.showcase` (type app,
`writable: false`).
- Object: `showcase_account`, record Northwind.
- Before the first save: no `com.example.showcase.custom` package
existed, and the customizations read was empty.
- To show a tab from another package, the run's DB holds a QA package
`com.qa.tabs` with an object `qtab_visit` that looks up
`showcase_account`. It exists only in the run's DB.

<details><summary>Admin, 1440: reorder, hide, save, reload</summary>

- 「…」 read `Configure tabs, Refresh, Share, Change Owner, Delete`.
- Editor chips:
  - `showcase_contact` [Original package]
  - `showcase_field_zoo.f_lookup` [Original package]
  - `showcase_field_zoo.f_lookups` [Original package]
  - `qtab_visit` [From Tabs QA]
  - 审批
  - 动态
- I dragged Visits first, hid 「Field Zoo · Lookup → Accounts (multiple)」
and saved. The writes, in order:
  - `POST /api/v1/packages/com.example.showcase/ensure-customization`
- `PUT
/api/v1/meta/object_extension/showcase_account?mode=draft&package=com.example.showcase.custom`
- `POST
/api/v1/meta/object_extension/showcase_account/publish?package=com.example.showcase.custom`
- Nothing was written to `com.example.showcase`.
- Tabs after save and after a reload: `Details, Visits, Contacts, Field
Zoo, Activity`.
- The pair's extension then read
`{"extend":"showcase_account","relatedLists":["qtab_visit","showcase_contact","showcase_field_zoo.f_lookup","sys_approval_request","sys_activity",{"list":"showcase_field_zoo.f_lookups","hidden":true}]}`.
- The served object carries `_relatedListsArrangement:
{"packageId":"com.example.showcase.custom","hidden":["showcase_field_zoo.f_lookups"],"unlisted":"shown"}`.
</details>

<details><summary>Original package unchanged</summary>

- `GET
/meta/object/showcase_account/layers?package=com.example.showcase`
answers `overlay: null`, `draft: null`, `provenance: package`,
`editable: false`.
- `GET /meta/object_extension?package=com.example.showcase` answers
`items: []`.
- `git status examples/` is clean.
- The customizations read: see Acceptance notes.
</details>

<details><summary>Another account (plain member), 1440 and
1280</summary>

- 「…」 read `Refresh, Share`: no entry.
- The member's served object carries the same `relatedLists` and the
same `_relatedListsArrangement`.
- Tabs drawn: `Details, Field Zoo, Activity`. The multi-lookup tab is
hidden. Visits and Contacts are not drawn because the member has no read
on `qtab_visit` and `showcase_contact` (`403 PERMISSION_DENIED` on the
data read), as before this change.
</details>

<details><summary>Admin, 1280: second save over the existing
extension</summary>

- The menu's first item is 「Configure tabs」.
- On reopening, the editor shows the saved order and 「Field Zoo · Lookup
→ Accounts (multiple)」 in 「Hidden」.
- I moved 动态 ahead of 审批, showed the hidden tab again and saved. The
same three writes followed (ensure, pinned draft, publish).
- After a reload: `Details, Visits, Contacts, Field Zoo · Lookup →
Account, Field Zoo · Lookup → Accounts (multiple), Activity`.
- A separate drag (not saved) moved 动态 to the very front, so built-ins
move to any place.
</details>

<details><summary>Self-built path (PR 1), admin, 1280</summary>

- On `qtab_account` (package `com.qa.tabs`, writable), 「…」 read
`Configure tabs, Refresh, …`.
- Chips carry no source mark.
- I dragged People first and saved. The writes were `PUT
/meta/object/qtab_account?mode=draft&package=com.qa.tabs`, then `POST
…/publish?package=com.qa.tabs`.
- After a reload: `People, Deals, Tickets, Attachments, Activity`.
</details>

The 「This environment」 mark is covered by
`RecordTabsConfigInstalled-36499` and `recordTabsInstalled-36499`. It
was not set up in the browser.

Screenshots (`/mnt/project-files/objectstack-seat2/shots/36499-pr2/`):
- `01-admin-1440-menu-first-item.png`: 「Configure tabs」 first in 「…」 on
the installed object
- `02-admin-1440-installed-edit-state.png`: the edit state with source
marks
- `03-admin-1440-installed-moved-hidden.png`: Visits moved first,
multi-lookup tab in 「Hidden」
- `04-admin-1440-installed-after-reload.png`: after save and reload
- `05-member-1440-installed-menu-no-entry.png`,
`05-member-1280-installed-menu-no-entry.png`: the member's 「…」 and tabs
- `06-admin-1280-menu-first-item.png`: the entry first at 1280
- `07-admin-1280-installed-reopened.png`: reopened on the saved
arrangement
- `08-admin-1280-installed-moved-restored.png`: 动态 moved, hidden tab
shown again
- `09-admin-1280-installed-after-reload.png`: after the second save and
reload
- `10-admin-1280-selfbuilt-edit.png`,
`11-admin-1280-selfbuilt-after-reload.png`: the self-built path

Files to read first, by risk:
1. `ui/packages/app-shell/src/views/objectExtensionArrangementSave.ts`:
which keys are kept and which are replaced, the pinned draft, publish,
and the discard on a refused publish.
2. `ui/packages/app-shell/src/views/recordTabsInstalled.ts`,
`installedTabsEntries`: what the pair's list holds (built-ins bare,
hidden related tabs, kept unknown entries, stored labels).
3. `ui/packages/components/src/renderers/layout/containers.tsx`:
`leadsMenu`, in the record bar and in the state-group menu.

Two-minute check: in `examples/app-showcase`, run `objectstack dev --ui
--seed-admin`. As admin, open any Account record and open 「…」. The first
item is 「Configure tabs」. Hide a tab, drag another, and save. `GET
/api/v1/meta/object_extension/showcase_account?package=com.example.showcase.custom`
answers the new `relatedLists`.

---

_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmP8GZoB2rUETxwNEDv)_

<!-- signed: repo:objectstack#2 · os-steve ·
session_01ADHkmP8GZoB2rUETxwNEDv -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

设计模式(二)菜单编辑:添加已有的菜单项,上移下移、移到分组、移除、改名和图标

3 participants