Repository navigation
feat(console): the app's menu is edited in the design mode (#36363) - #36437
Conversation
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>
…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>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对REWORK — head 1. The menu save writes the served navigation, so translations get baked into the stored app
2. The served navigation is pruned per caller, so a whole-tree save can drop entries
Fix asked for (1 and 2): compose the save from the stored navigation ( 3. Live acceptance owedThe 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 Re-request L1 on the new head; the review will be a delta on items 1–3. |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: 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 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 ① Derived judgments
S1 (should-fix): The picker's "already in the menu" test misses views that the menu names in the short form. N1 (nit): N2 (nit): The N3 (nit): Studio's nav save sends N4 (nit): Card acceptance item 3 (drag an entry to another group and save) has no component test of the ② Semver levelThe changeset
③ Boundary flags
Implemented-by: 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>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对ACCEPT (delta L1 since REWORK 7081226692) at head
Items 1 and 2: the save writes the stored menu, not the translated or pruned served one. Closed.
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.
Item 4: ruling (4) as the seat gave it. Read.
Also read
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review of the record at 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 ① Derived judgments
Earlier findings, by id: S1: closed. N1: closed. N2: open in part. The N3: closed. The save sends N4: closed. A component test now drives 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 ( S2 (should-fix): A new entry's id is minted against the served menu, not the stored one. 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 levelThe changeset
③ Boundary flags
Implemented-by: 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>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review of the record at 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 ① Derived judgments
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 N2: open in part, accepted as left. The body now states the reason: the posture hook answers 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 N8 (nit): 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 levelThe changeset
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review of the record at 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 ① Derived judgments
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 No other finding in the delta. ② Semver levelThe changeset
③ Boundary flags
Implemented-by: 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>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review of the record at 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 The red the dev reports is not a check-run. It is the dev's own local ① Derived judgments
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 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 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 No other finding in the delta. ② Semver levelThe changeset
③ Boundary flags
Implemented-by: 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>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对ACCEPT at head Item 2: closed, measured liveThe run was on HotCRM 6.5.0 in zh-CN, with this head's console under Vite. The log is in project files
Item 1: still closedThe placeholder and the saved position were measured at Notes (not blocking)
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review of the record at 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. The red the dev reports is not a check-run. It is the dev's own local ① Derived judgments
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 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 levelThe changeset
③ Boundary flags
Implemented-by: 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. |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对REWORK — CI only. L1-e delta at The red
Live (Vite restarted clean on this head, served module checked to contain the new listeners)I entered design mode on
Non-blocking: 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: |
…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>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对ACCEPT — L1-e delta at
Non-blocking note carried from 7085915468: a 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. |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review of the record at 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 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
Earlier findings, by id: M1, S2, S3 and N11 are closed. N13 and N14 are unchanged and stay open as recorded at New findings: No must-fix, no should-fix. ② Semver levelThe changeset
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Seat record (2026-11-22T21:44Z) on head 维护者速读
席位核对ACCEPT · Tier H (size limb: 3467 changed lines over the 3000-line human-merge line;
|
|
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 |
…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>
…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>
…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>
Requested by Steedos · project thread
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSr8sNCnJrK6Q9kEF5
Fixes #36363
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
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.designModeMenu.tstargetKeyFor/entryForTarget, one key per thing the menu opens); a record page is never offered. Picking one puts it in the held row.GET /api/v1/i18n/locales, the descriptor markedisDefault; compared case-insensitively,enmatchingen-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/localesexposesisDefaultonly, noti18n.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.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.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, spelledkind/name(object/crm_lead,view/…); they are compared only with each other and are no cache key.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.tsrebaseMenuEdits): 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 freenav_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 freshnav_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).designModeMenuSave.ts) writes the app with its newnavigationis 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.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.chrome/unsavedEdits.ts:confirmUnsavedLeaveand thebeforeunloadhold), 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.designMode.menuin every hand-written locale, zh-Hant generated.Read first, by risk:
ui/packages/app-shell/src/layout/designModeMenu.tsrebaseMenuEdits/staysInOrder/storedKeyer: the edits replayed on the stored menu.ui/packages/app-shell/src/layout/designModeMenuSave.ts: the stored read, the check order, where the write goes, and the pending-draft refusal.ui/packages/app-shell/src/layout/DesignModeMenu.tsxnameOpen/contributed: the rename rule and another package's entries.ui/packages/app-shell/src/layout/ShellPageActions.tsx: the read-only posture entering the mode, and the wall.Tests
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 previousdesignModeMenu.ts.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).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, throughDndContext'sonDragEnd). 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 hasdraggable="false", the browser's own drag of it is refused (dragstartdefault 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 previousDesignModeMenu.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'sDesignModeMenu.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
UnifiedSidebar,ShellPageActions,DesignModeMenu,designModeMenuoruseAppStudioEntry, 84 files): 715 passed, 1 red:sidebarGroupLabel.callSites-12795wants everySidebarGroupLabelcall 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-checkfor@object-ui/app-shelland@object-ui/i18n: exit 0 (onenew Error(message, { cause })under the package's ES2020 lib fixed first).dispatch-gates.mjs --commandsderived 41 gates (the same 41 at this head). 40 exit 0 at 4bc9854d3, this tree less three fixes inui/.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.--ranreconciliation: 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 sharesUnifiedSidebar.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 countsdesignMode.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.mjsat the merge: origin/main and 7 open PRs sharing files all merge cleanly.At 1c271b1 (comment 7079728193, the leave prompt):
DesignModeMenu-36363.test.tsxgains 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 aview:-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 spelledkind/name. The four touched test files, the guard included: 33/33 passed.dispatch-gates.mjs --commandsat 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 indate-only-zone-pins-10183. The child's case "control: an instant formats in the viewer's zone, 2026-09-01 03:00 here" inFormulaFunctions.dateOnlyZone-10866read 11:00, the Asia/Shanghai hour. That file run alone in the forked child passes 39/39. The child's node project runs withisolate: false, the pins setprocess.env.TZand 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-checkfor@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/andpackages/app-shell/src/layout/together: 261 files, 3,191 passed, 13 skipped.dispatch-gates.mjs --commandsderives 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 indate-only-zone-pins-10183(#36492, the TZ order dependence), and nothing else: 5,125 passed. The two changeset gates andcheck:closed-ceremony-textwere 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 indexedSTORED[3].children, which the test project types as{}. Only the package's main tsconfig had been run locally. The pin now casts it toMenu, as its siblings do. The package's wholepnpm 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:--ranshows 41 of 41 accounted for, 40 exit 0, andvitest run scripts/exits 1 on #36492 only. All 16 Test UI shards were green at aed9f08.overlap-check.mjsis 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.tsfirst, and all five were red.packages/app-shell/src/layout/passes: 155 files, 1,219 tests. The package's wholepnpm run type-check(main and test tsconfigs) exits 0.dispatch-gates.mjs --commandsderives the same 41 gates.--ran: 41 of 41 accounted for, 40 exit 0, andvitest 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.tsxpasses 22/22; the four new cases were run against the previousDesignModeMenu.tsxfirst, and all four were red.packages/app-shell/src/layout/passes: 155 files, 1,224 tests. The package's wholepnpm run type-checkexits 0.dispatch-gates.mjs --commandsderives the same 41 gates.--ran: 41 of 41 accounted for, 40 exit 0, andvitest run scripts/exits 1 on #36492 only (2 failures indate-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.tsxpasses 23/23; the new real-event-order case was red against d1522bf'sDesignModeMenu.tsx.packages/app-shell/src/layout/passes: 155 files, 1,225 tests. The package's wholepnpm run type-checkexits 0.dispatch-gates.mjs --commandsderives the same 41 gates.--ran: 41 of 41 accounted for, 40 exit 0, andvitest run scripts/exits 1 on #36492 only (2 failures indate-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.tsxpasses 24/24; the new flick case was red against effe780'sDesignModeMenu.tsx.packages/app-shell/src/layout/passes: 155 files, 1,226 tests. The package's wholepnpm run type-checkexits 0.dispatch-gates.mjs --commandsderives the same 41 gates.--ran: 41 of 41 accounted for, 40 exit 0, andvitest run scripts/exits 1 on #36492 only (2 failures indate-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 newdispatchEvent(new MouseEvent(...))lines ofDesignModeMenu-36363.test.tsxarefireEvent.clickandfireEvent.pointerUp(window), asserting the same. Only that test file changed.eslintover 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'sDesignModeMenu.tsx. The package's wholepnpm run type-checkexits 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
i18n.sourceLocale. A deployment whose default language differs from the language its apps are authored in would see the name field closed in every language until 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 addssourceLocaleto/i18n/localesand a console write path for a translation.effectivenorcode) and N9 (another package's group listed in 「Move to group」) are the nits of review 7083821939 and are not changed here. N6: nothing pins the stored version between the save's layered read and its draft write, so a publish by someone else that lands in that window (the length of one request) is overwritten; the first-write pin refuses only a pending draft. N2's other half: while the tenancy posture is still being read, a walled deployment can briefly show 「Edit app」 to a tenant administrator; the posture hook answersundefinedboth while reading and on a deployment that reports none, so closing it there would also close the mode where no wall exists, and the server refuses the save behind a wall either way. N5 (a link's typed label stored as its base label in any language) is on 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.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 inzh-CN, signed in as the seeded admin.GET /api/v1/i18n/localesmarksendefault. HotCRM's packageapp.objectstack.hotcrmis listed read-only.crm_event_attendee). Saved; the bar went.GET /api/v1/i18n/locales200;GET /api/v1/meta/app/crm_enterprise/layers?package=app.objectstack.hotcrm200 (on mount, and again in the save);POST /api/v1/packages/app.objectstack.hotcrm/ensure-customization201;PUT /api/v1/meta/app/crm_enterprise?mode=draft&package=app.objectstack.hotcrm.custom200;POST /api/v1/meta/app/crm_enterprise/publish?package=app.objectstack.hotcrm.custom200. Every request carriedAccept-Language: zh-CN.overrides: {package: app.objectstack.hotcrm, basedOn: 6.5.0}; itsnavigationholds 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; 销售 readsnav_account, nav_lead, …and 数据洞察 ends with{id: nav_item_1, type: object, objectName: crm_event_attendee}.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, …na.rep@objectos.ai, demo staff): served in English and in zh-CN, 销售 starts with 客户 / Accounts then 线索 / Leads, and 数据洞察 ends with the added entry. Screenshothotcrm-06-member-zh-CN.pngshows 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 requestshotcrm-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.pngshows 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.pngandm-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