Skip to content

feat(console): configure tabs on installed objects, into the paired .custom package (#36499, PR 2 of 2) - #36624

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-y42fpp
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-y42fpp

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #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 #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 记录页排布的第三层:配对的 .custom 包可以给安装来的对象声明完整的分组和页签排布(原始包完整声明、继承包只能声明插入位置,这两层不变) #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 #36505 is meant to be its second caller (fieldGroups). #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 #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.
Test and gate runs at head c7f9b58 (all through os-verify-lock)
  • 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.

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

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.
Admin, 1440: reorder, hide, save, reload
  • 「…」 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"}.
Original package unchanged
  • 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.
Another account (plain member), 1440 and 1280
  • 「…」 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.
Admin, 1280: second save over the existing extension
  • 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.
Self-built path (PR 1), admin, 1280
  • 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.

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

…custom package (#36499)

On an installed (read-only) object, 「Configure tabs」 writes the
relatedLists of the paired .custom package's object extension through
one shared arrangement writer (saveObjectExtensionArrangement), created
on first save by the ensure door; every tab moves, a related one hides,
and each is marked with where it comes from. The entry leads the
record's overflow menu, ahead of Refresh (a host entry's leadsMenu).

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmP8GZoB2rUETxwNEDv

Contract-review-claim: session_01ADHkmP8GZoB2rUETxwNEDv · head 28193db · 2026-11-23T05:52Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmP8GZoB2rUETxwNEDv

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 28193dbe974809976260256ee624d87c37d6b200
Local-runs: none

① Derived judgments

Owed by the Clause-②: yes (widening) line alone: check-governed-merges.mjs --pr 36624 reads 0 of 25 paths on the register; no packages/spec/** path; Metadata-protocol: none (the save writes #36517's existing ObjectExtensionSchema.relatedLists in its published shape, built-ins bare, hidden related entries { list, hidden: true }). The widening, read off the diff: (a) five new language-pack keys under designMode.recordTabs in the eleven @object-ui/i18n locales; (b) @object-ui/components page:header: a host overflow entry may declare leadsMenu: true to be drawn ahead of Refresh — host entries only (isHostAction), never destructive, so authored metadata cannot claim the place; (c) app-shell's new shared writer saveObjectExtensionArrangement (package-internal). Each adds; none removes or narrows an accepted value. Writes go only through the existing metadata and ensure doors; the server's writer rule for the arrangement keys (only the paired .custom package) is untouched.

② Semver level

patch for @object-ui/app-shell, @object-ui/i18n, @object-ui/components (the changeset's levels): an optional host-only flag and additive keys, within the ui lane's patch practice for console features.

③ Boundary flags

The dev's three open questions were routed by the seat on 2026-11-23T04:26Z: the customizations-read acceptance line moved to #36626; hiding built-in tabs goes to decision card #36627; the client-derived source mark's narrow gap is accepted. The dev's further measurement that built-in tabs cannot be renamed (a built-in entry is a bare name with no label) rides with #36627. SQL push-down: n/a — no query or join added; one ensure call, two reads, one draft write and one publish.

Implemented-by: claude/project-thread-y42fpp
Reviewed-by: session_01ADHkmP8GZoB2rUETxwNEDv

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmP8GZoB2rUETxwNEDv

席位核对

ACCEPT · PR #36624 @ 28193dbe974809976260256ee624d87c37d6b200 · card #36499 PR 2 of 2 (Fixes) · L1 by the card thread at 2026-11-23T05:54Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmNmMEXS4EzeVz9RjvD
Landing · 2026-11-23T05:55Z · PR #36624 @ 28193db · card #36499 PR 2 of 2 (Fixes) · area s2-A

席位核对

ACCEPT — landing on the card thread's L1 ACCEPT 7092834322 and TIER_DEFAULT record PASS 7092828542, both at this head.

  1. Governance. Not governed (check-governed-merges.mjs), +1418/-77, under 3000; Clause-②: yes (widening) covers ui language keys only, so it stays in the area with its TIER_DEFAULT record; Metadata-protocol: none.
  2. Gates. 47 success, 15 expected skip, 0 failed, 0 pending at this head.
  3. K and the label leg. The head already merged main 3110de5a0; main is 3 commits further (fix(i18n): approval step label and approval notification object label read as /meta serves them #36620, docs(skills): the skills index routes a stepped single-object form to a named wizard form, and the sections ladder says New and Edit never read sections #36625, feat(console): the design mode is entered from the app-name menu; the page header drops Edit app and Open in Studio (#36485) #36621), none in ui/packages/i18n/src/locales/ or a translations bundle, and git merge-tree merges them cleanly. No re-merge owed.

Landing: area lands it: ready + auto-merge. Fixes #36499; pm:dispatched comes off after the merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 05:55
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit d7411fa Nov 23, 2026
63 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-y42fpp branch November 23, 2026 06:17
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…the design mode (objectstack-ai#36366) (objectstack-ai#36629)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9XUZ1viPwnt3ZWuPpxejiN3)_
Fixes objectstack-ai#36366
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up objectstack-ai#36630
ADR notes: carrier objectstack-ai#36086 (seat posts them)

## 维护者速读

-
管理员在设计模式里点页头最右边的「页头按钮」,能把列表页和记录页的动作分成「固定」(最多三个,可拖动排序)和「更多」(也可排序),保存后所有成员看到的页头都跟着变;记录页的设置同样作用于侧边预览和手机底栏。
- 属于「运行界面的设计模式」专题,解决按钮多时挤掉记录名、管理员又改不了页头的问题。
- 设置错了,管理员在同一面板里改回或取消即可;对象不写这项设置时,页头和今天完全一样。
- 无。

## What changes

`actionLayout` is a new optional key on `ObjectSchema` and
`ObjectExtensionSchema`, in the format of the maintainer's ruling
(2026-11-22T14:50Z, quoted in release 7087101113: 「objectstack-ai#36366
改成"列表"和"记录"两组,每组分"固定"和"更多"两段,等 objectstack-ai#36363 合并后,卡标记为p1,剩余任务放回队列」) and seat
rulings 7077698148 / 7080672229:

`actionLayout: { list?: Arm, record?: Arm }`, `Arm = { pinned: string[]
(at most 3, required, may be []), more?: string[] }`.

- **spec** (`packages/spec/src/data/object-action-layout.ts`): the shape
and its refusals at every door (more than three pinned, a name twice in
one part or across both, a malformed name, a built-in the scope does not
have), each with a named reason; the object form offers one JSON row per
arm under Advanced. Generated artifacts regenerated (api-surface,
export-origins, authorable-surface, dropped-refinements counts,
references); liveness row `object/actionLayout` is `live`, drilled into
`list` / `record` and each into `pinned` / `more`, citing the record
header, the list header, the fold and the design mode.
- **objectql + metadata-protocol (patch round 2, M1)**: `actionLayout`
is the third key of `CUSTOM_ARRANGEMENT_KEYS`, beside `fieldGroups` and
`relatedLists` (ADR-0146 D10). Only the base's paired `.custom` package
writes it on an `object_extension`; the one judge
`judgeExtensionArrangement` refuses any other package's, each door in
its own way: publish, restore and draft promotion answer
`VALIDATION_ERROR` / 400; marketplace install refuses the package body
with `VALIDATION_ERROR` / 422; `os validate` and `os build` exit
non-zero and print the row; the registry fold skips the key and leaves a
note. The registry applies the pair's arms last, in
`applyCustomArrangement`, by role, arm by arm. A manifest's
`objectExtensions` entry now carries the key to the fold
(`objectExtensionContribution` dropped it).
- **lint**: `validateObjectActionLayout` refuses, in `os validate` / `os
build` / `os lint`, a name in either part that is no action of the
object or is not placed in the scope its arm arranges.
- **`@object-ui/types`**: `arrangedHeaderActions(actions, arm, scope)`,
the one reader; `pinned` become buttons in pin order, the names `more`
gives lead the overflow in that order, unnamed ones follow in their
default order.
- **console**: the synthesized record header (record page, the side
preview's embedded mount, the phone's bottom bar) and an authored
`page:header` with `placedActions: true` read `actionLayout.record`; the
list header reads `actionLayout.list` with `$import` / `$export`. Under
the design mode, 「Header buttons」 at the end of the header opens a
two-part panel (「Pinned to header」 at most 3, 「Other」 = More), both
parts draggable, a dot moving an action between them, a fourth pin
refused with a toast; the mode's Save writes the object's own package
when writable, else the installed object's customization package's
`object_extension`, through the one writer of an installed object's
arrangement, `saveObjectExtensionArrangement` (patch round 3).
- **i18n**: `designMode.pins.*` in every hand-written locale, including
the new `designMode.pins.stale` (names the arm sets that the scope no
longer offers); zh-Hant regenerated. Object-form translations for the
two arm rows in all 11 metadata-forms locales.

### 待审假设 (assumptions for review, shown to the maintainer, not ruled)

1. The key name `actionLayout`.
2. The `record` arm is a scope, not a page: the record header, the side
preview and the phone bottom bar all read it.
3. An action the scope places that neither part names goes to the end of
More, in its default order.
4. A hidden pinned action leaves its slot empty; no other action takes
its place.
5. No arm (or no key) = today's drawing, exactly.
6. Among built-ins, only the list scope's `$import` / `$export` can be
named, and only in `pinned`: one in `more` is refused with its reason
(not pinned, the page still draws its own Import / Export menu). The
record scope has none.
7. Only the base's paired `.custom` package writes `actionLayout` on an
`object_extension`. Each arm it writes replaces the served arm for that
scope whole, after every other layer (a tenant's arm for the same scope
included); an arm it leaves out stays.
8. A `page:header` authored with its own `actions` list keeps that list;
the design mode offers it no 「Header buttons」.
9. Save refuses: more than 3 pinned, a name in both parts, an unknown
name, an action of the other scope (the last two at `os validate` and in
the design mode's Save; see Acceptance notes for the server door).
10. Names the arm sets that the scope no longer offers are listed in the
panel as left out and skipped by the reader.
11. With no list arm, the panel says "No button is pinned: every action
is in More." while the bar end shows the page's Import / Export menu
(`Import ▾`), and 「Other」 lists Import: for a built-in, 「Other」 means
"in the page's Import / Export entries". The wording is kept as is.

Out of scope: objectstack-ai#36494 (row menu and right-click), objectstack-ai#36495 (the `locations`
vocabulary), objectstack-ai#36496 (the `selection` arm).

### Tests changed because the surface grew (named, each recounted by
measurement, not by hand)

-
`packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts`:
`object` 51 → 52.
-
`packages/platform-objects/src/apps/translations/object-collapsed-sections-echo-decisions.test.ts`:
leaves 119 → 125, `advanced` 106 → 112.
-
`packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts`:
positive control 760 → 763.
- `ui/packages/i18n/src/__tests__/de-quote-pairing-3876.test.ts`: paired
spans 127 → 131 and 127 / 127 / 0 → 131 / 131 / 0 (main's 127 after
objectstack-ai#36370, measured again after the merge).
-
`ui/packages/app-shell/src/layout/__tests__/designModeHeaderPinsSave-36366.test.ts`:
its `input` helper now types the pins as `ObjectPins` (the type-check
read the old `string[]` shape as nine TS2353).
- The CLI transcripts in `content/docs/deployment/cli.mdx`,
`deployment/validating-metadata.mdx`,
`getting-started/build-with-claude-code.mdx` and `ui/react-pages.mdx`:
author-time rules 76 → 77, as `check:docs-transcript-drift` derives.
- `packages/spec/src/compose-stacks-merge-collection-refusal.test.ts`,
`packages/spec/src/compose-stacks-merge-config-object-refusal.test.ts`:
`actionLayout` added to the config-object key list.

## Tests

**Patch round 3, head `8a85482aea`** (L2 delta S5, N4, N5; S1 waits on
objectstack-ai#36635 and is untouched).
- **Merge**: `origin/main` `6e643cc43e` merged in `d871e26fdb` with no
conflict (it brings objectstack-ai#36624's one writer and objectstack-ai#36621's app-menu entry).
`origin/main` `9c283a11bf` still merges cleanly.
- **S5, the L2-preferred route**: the installed-object branch of
`saveObjectPins` now calls `saveObjectExtensionArrangement`, handing it
only the composed `actionLayout`. That module's patch type is `{ [K in
CustomArrangementKey]?: ExtensionArrangementValue... }`, a list for
`fieldGroups` / `relatedLists` and `ObjectActionLayout` for
`actionLayout`; its docblock names the header buttons as a caller. The
writable-package branch, which writes the object itself, is unchanged.
S3 holds: the composed value is the arms the stored extension holds with
each changed arm replaced. New `designMode.pins.pairNotWritable` in the
11 locales (zh-Hant regenerated).
- **Pins** (`designModeHeaderPinsSave-36366.test.ts`, 13 tests): a pair
the server answers not writable is refused after the ensure call and
before any read or write; through the one writer the stored
`relatedLists`, `fieldGroups` and held list arm are kept and the publish
announces itself; the S3 pins and the call-order pins (now ensure, get,
layered, save, publish) pass. Ablation: composing over no stored
`actionLayout` turned 2 red (the S3 held-arm pin and the S5 kept-keys
pin), restored blob equals HEAD's.
- **Docs and wording**: `actions.mdx` now reaches 「Header buttons」
through the app name at the top of the sidebar, then 「Edit app」.
Changeset: `[]` pins none; the spec bullet names the built-in refusal in
`more`; each door's own answer. `object.zod.ts`: the `actions` guidance
and the comment above `membershipKeys` name `actionLayout` as a
pair-only key beside `fieldGroups` and `relatedLists`.
- **Reruns**, all exit 0: closure build; `check:generated` (no drift);
ui 16 files plus `packages/i18n/` (122 files / 2134 passed, 13 skipped);
spec 101 files naming `ObjectExtensionSchema` or the guidance (6725
passed); spec typecheck; app-shell, components and i18n type-check; 23
gate families (i18n, docs, changeset, liveness, facade, nul-bytes and
others). Lines in the seat file.

**Patch round 2, head `49a31750bc`** (L2 review M1, S2, S3, S4; the
ADR-0085 §2 sentence and objectstack-ai#36086 untouched). No merge: `origin/main`
`d7411fa373` merges cleanly.

- **M1, chosen semantics: per-arm replacement, the pair only, applied
last.** Measured first: every door already reads
`CUSTOM_ARRANGEMENT_KEYS` through the one judge, so the mechanism
applies as is. The five doors and where they call it:
1. publish, restore and draft promotion of an `object_extension`:
`objectExtensionItemRefusal` in
`packages/metadata-protocol/src/protocol-object-extension-item.ts`;
  2. `os validate`: `packages/cli/src/commands/validate.ts`;
3. `os build`: `packages/cli/src/commands/compile.ts` (both CLI doors
through `packages/cli/src/utils/extension-arrangement.ts`);
4. marketplace install:
`packages/cloud-connection/src/marketplace-install-local-plugin.ts`;
5. the registry fold: `applyCustomArrangement` in
`packages/objectql/src/registry-custom-arrangement.ts`, run last in
`foldExtendersOntoDefinition`, skips a non-pair package's key and names
it in a warning.
The round-1 priority fold (`foldExtensionActionLayout`, `actionLayout`
in `OBJECT_FOLD_SCALAR_KEYS`) is removed; `registry.ts` is back at
main's 6426 lines.
- **Pins replacing "partner 250 beats pair 150"**: a partner's
`object_extension` save with `actionLayout` answers `VALIDATION_ERROR` /
400, one issue at `actionLayout`, nothing stored or served, the pair's
save served
(`packages/objectql/src/protocol-custom-arrangement.test.ts`); in the
registry, partner at 250 against the pair at 150, and a partner
registered after the pair, both serve the pair's arm
(`registry-extension-action-layout.test.ts`); the judge names the path
and prescribes the action's own `locations` and `order`
(`protocol-extension-arrangement.test.ts`).
- **S2**: `actionLayout` no longer yields to a tenant: the pair applies
last, per arm, so a tenant's arm for another scope stays and the pair's
arm wins for its own scope (two pins).
- **S3**: the design-mode Save writes only the arms whose staged value
differs from the served one, merged into the arms the document already
holds; nothing changed means no call (three pins).
- **S4**: chosen to refuse: the schema refuses a `$` built-in in `more`
with its reason, the Save never writes one there, and the `pinned`
describe, the form help (11 locales) and the docs say the list page
still draws its own Import / Export menu; the `more: ['$import']`
examples are gone.
- Reruns, all `command-exit 0`: spec test 974 / 29634 and typecheck;
metadata-protocol test 365 passed, 9 skipped; objectql test 634 / 14360;
lint 228 / 9474; platform-objects 125 / 2126; typecheck of
metadata-protocol, objectql, lint, cli; cli unit extension-arrangement
files 3 / 48; cloud-connection install arrangement 1 / 5; ui 36366 files
6 / 59; `@object-ui/app-shell` type-check; `check:generated --fix`
regenerated `content/docs/references/**` and rechecked green. Gate
families this round's files touch: 25 run, exit 0; `check:i18n-coverage`
exit 3, PREREQUISITE NOT MET (example apps unbuilt), NOT MEASURED
locally, CI runs it. Lines in the seat file
`objectstack-seat2/36366-gates-ran.txt`.
- **Ablation, the per-arm fold**: `ablation-replace.mjs` replaced
`layout = { ...(layout ?? running), [scope]` with `{}` as the base (blob
`67155de2c30c` → `6f6b1a29855b`); 2 failed / 11 passed (arm by arm; the
S2 tenant arm kept); restored blob equals HEAD's, `git diff HEAD` empty.
- **Files beyond the claim (round 2)**:
`packages/spec/src/data/field-customization.ts`,
`packages/spec/src/data/object-extension-arrangement.test.ts`,
`packages/metadata-protocol/src/protocol-extension-arrangement.ts` and
its test, `packages/objectql/src/registry-custom-arrangement.ts`,
`packages/objectql/src/engine-registration.ts`,
`packages/objectql/src/protocol-custom-arrangement.test.ts`,
`packages/cli/src/utils/extension-arrangement.ts` (comment only).

**Patch round 1, head `6303c52011`.** The branch was merged with
`origin/main` at `4ef1ea9779` (objectstack-ai#36612 landed) in `ebd99fe0dd`, then the
changeset's Skills-docs line was changed. Only the families that merge
touched were rerun, all exit 0:
- ui i18n tests: 106 files / 1978 tests.
- The 268 app-shell files below: 2294 tests.
- platform-objects tests: 125 / 2126.
- `@object-ui/app-shell` and `@object-ui/i18n` type-check.
- `check:i18n` and `check:i18n-stale-fill`.
- `gen:zh-hant` (no diff).
- The four changeset gates.

All of the following ran at head `564840dc1b`, the final commit of round
1, after the merge of `origin/main` at `ceaa70efcc`. Every heavy run
went through `os-verify-lock.sh`; each line quotes its `VERDICT`.

| Package | Command | Result |
|---|---|---|
| `@objectstack/spec` | `test` | 881 files / 28066 tests passed
(`command-exit 0`) |
| `@objectstack/spec` | `typecheck` | `command-exit 0` |
| `@objectstack/objectql` | `test` | 634 / 14356 passed (`command-exit
0`) |
| `@objectstack/objectql` | `typecheck` | `command-exit 0` |
| `@objectstack/lint` | `test` | 228 / 9474 passed (`command-exit 0`) |
| `@objectstack/lint` | `typecheck` | `command-exit 0` |
| `@objectstack/metadata-core` | `test` | 27 / 1056 passed
(`command-exit 0`) |
| `@objectstack/metadata-core` | `typecheck` | `command-exit 0` |
| `@objectstack/metadata-protocol` | the changed pin file | 18/18 passed
|
| `@objectstack/metadata-protocol` | `typecheck` | `command-exit 0` |
| `@objectstack/platform-objects` | `test` | 125 / 2126 passed
(`command-exit 0`) |
| `@objectstack/platform-objects` | `typecheck` | `command-exit 0` |
| `@object-ui/types` | tests | 390 / 10512 passed |
| `@object-ui/types` | `type-check` | `command-exit 0` |
| `@object-ui/components` | tests | 507 passed, 1 skipped / 4940 passed
(`command-exit 0`) |
| `@object-ui/components` | `type-check` | `command-exit 0` |
| `@object-ui/i18n` | tests | 106 / 1978 passed (`command-exit 0`) |
| `@object-ui/i18n` | `type-check` | `command-exit 0` |
| `@object-ui/app-shell` | `type-check` | `command-exit 0` |
| `@object-ui/app-shell` | tests (narrowed, see below) | 268 / 2294
passed (`command-exit 0`) |

**The app-shell tests at the final head are narrowed, and this is
declared.**
- What ran: the 268 test files that name `RecordDetailView`,
`objectViewPageHeader`, the design-mode header pins or
`PageHeaderActions`, or whose names match those modules, objectstack-ai#36499's record
tabs, or this card.
- Why not `vitest related`: it ran out of heap at 4 GB.
- The full app-shell suite last ran at `72ec1b2a2`, before the merge:
2416 files passed, 1 skipped / 22791 tests (`command-exit 0`, the lock
held for 5634 s). CI runs the whole suite.

**Found and fixed in this round:** `@object-ui/app-shell` `type-check`
was red with nine TS2353 errors. The save test's `input` helper still
typed the pins as a record of string arrays. vitest does not type-check,
so the tests stayed green. Fixed in `649fc028b6`.

<details><summary>Ablation (one reading): the More order</summary>

- Target: `arrangedHeaderActions` in `ui/packages/types`, the line that
ranks a `more`-named action.
- Mutation: `scripts/ablation-replace.mjs` replaced `const moreAt = name
&& !seen.has(name) ? moreRank.get(name) : undefined;` with `undefined`.
The anchor count went 1 → 0 and the blob changed `33d1f1de663b` →
`2af6af57c9fb`.
- `@object-ui/types` is aliased to `src` in `ui/vitest.config.mts`, so
no build was needed.
- Mutated run: 3 failed / 46 passed. All three `more`-order tests went
red: the side preview and the authored `page:header` in
`RecordDetailView.actionLayout-36366.test.tsx`, and the list toolbar in
`objectViewPageHeader.actionLayout-36366.test.tsx`. Their controls
without `more` stayed green.
- Restore: `git checkout HEAD --`. The blob after restore read
`33d1f1de663b` (HEAD's), and `git diff HEAD` was empty.
</details>

<details><summary>Gates: dispatch-gates at 564840d</summary>

- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 130 families. All 130 ran, one line
each (`command :: exit N`) in the seat file
`objectstack-seat2/36366-gates-ran.txt`.
- `--ran` reconciliation: "130 derived, 130 run, 0 NOT-MEASURED, 0
UNRUN".
- Two families first exited 3 (PREREQUISITE NOT MET: the client and
workspace dists were unbuilt): `check:skill-examples` and
`check:dual-build-cjs-loads`. Both read 0 at the same head after the
client and ui closure builds.
- Found red in this round, and fixed:
- `check:facade-delegation-only` (registry.ts at 6433 lines against a
ceiling of 6426) now reads 6426.
- `check:docs-transcript-drift` (four transcripts quoted 76) now reads
77.
- Local-only families:
  - `check:skill-frame-freshness`: exit 0.
- `check:dev-prereqs`: exit 1, "The workspace is not built". Some
workspace packages have no `dist` on this box. That is a machine-state
reading, not about this diff.
</details>

## Acceptance notes

- **Server save door.** It refuses only a malformed arrangement. Live
reading on the CRM example (dev server, admin): `PUT
/api/v1/meta/object_extension/crm_opportunity?package=com.example.crm.custom`
with `actionLayout.list.pinned` naming 4 actions answered `422`
`INVALID_METADATA`. The message read: "`actionLayout.list.pinned` names
4 actions; at most 3 are drawn as buttons, and every other action goes
to 「More」. Keep the first 3 and move the rest to `more`."
- A name that is no action of the object, or one not placed in the arm's
scope, is refused only by `os validate` / `os build` / `os lint`
(`object-action-layout-unknown` / `-not-placed`) and by the design
mode's Save.
- The lint rule is CLI only: the runtime snapshot carries no stack
`actions`, so an action bound by `objectName` would read as unknown
there.
- **Door-level code+status.** The schema refusals are pinned in
`packages/spec` (`object-action-layout.test.ts`); the door's
`INVALID_METADATA` / 422 is the live reading above. Since patch round 2
the writer refusal is pinned at the save door with `VALIDATION_ERROR` /
400 (`protocol-custom-arrangement.test.ts`).
- **`registry.ts` is a facade at its line ceiling.** Since patch round 2
the fold lives in `registry-custom-arrangement.ts`, and `registry.ts`
differs from main only in one docblock line (6426, the ceiling not
raised).
- **The CLI transcripts count 77 author-time rules.** The new lint rule
is the 77th. `check:docs-transcript-drift` derives 77 for `validate` and
`build`, and four transcripts that quoted 76 now say 77:
`deployment/cli.mdx`, `deployment/validating-metadata.mdx`,
`getting-started/build-with-claude-code.mdx`, `ui/react-pages.mdx`.
- **Live-run wording.** With no list arm, the panel's sentence and the
bar's `Import ▾` menu: kept as is, listed as 待审假设 11.
- **Export was not offered on the CRM opportunity list in the live run**
(that view has no export door), so the run pinned Import. The record
scope was not run live: `crm_opportunity` declares no actions of its
own. The record header, the side preview and the phone bar are covered
by the unit tests below.
- **Merged with main, conflicts kept both sides.**
- objectstack-ai#36583 (now on main): `designMode.recordTabs` and this PR's
`designMode.pins` are both kept in the 11 locales.
- objectstack-ai#36411 (now on main): `de-quote-pairing-3876.test.ts` recounted by
running it, 131.
- objectstack-ai#36612 (now on main): `ObjectViewPageBarActions` reads its Object
settings path, then this PR's list arm. `exportDoor` is `exportPinned ?
undefined : barEnd?.exportDoor`, and `moreShown` is
`!!objectSettingsPath || !!description || !!listFavorite || (ioInMore &&
(importInMenus || !!exportDoor))`.
- **Overlap with open PRs** (`overlap-check --branch=HEAD` at
`ebd99fe0dd`, exit 1):
  - objectstack-ai#36606 conflicts in `de-quote-pairing-3876.test.ts`.
- objectstack-ai#36525 conflicts in
`protocol.meta-types-degenerate-derivation.test.ts` and
`object-lifecycle-panel-echo-decisions.test.ts`.
- Whichever lands second recounts. objectstack-ai#36624, objectstack-ai#36587, objectstack-ai#36386 and
origin/main merge cleanly.
- **Landing class.** The diff changes more than 3,000 lines, so under
AGENTS.md §7(c) it lands like Tier H.
- **Owed outside this PR.** The ADR-0085 §2 and ADR-0146 D10 notes
(`carrier: objectstack-ai#36086`), and `skills/objectstack-ui/rules/actions.md`
(objectstack-ai#36630).
- **Follow-up, outside this diff (N5).** The door comments in
`packages/cli/src/commands/compile.ts`,
`packages/cloud-connection/src/marketplace-install-local-plugin.ts` and
`packages/metadata-protocol/src/protocol-object-extension-item.ts` (step
8) still name only `fieldGroups`, `relatedLists` and `place`; the code
reads `CUSTOM_ARRANGEMENT_KEYS` and already refuses `actionLayout`.
Comment-only, carrier: the seat.

## Verification

- One command (expect 3 files, all green): `pnpm --dir ui exec vitest
run --maxWorkers=2
packages/app-shell/src/views/objectViewPageHeader.actionLayout-36366.test.tsx
packages/app-shell/src/views/RecordDetailView.actionLayout-36366.test.tsx
packages/app-shell/src/views/RecordDetailView.phoneFace-27058.test.tsx`
- One click: run the CRM example, open Opportunities, click the app name
at the top of the sidebar, then **Edit app** in its menu, then **Header
buttons** at the end of the bar. Click the dot beside Import and press
**Save**. Outside the design mode the bar shows a plain **Import**
button where `Import ▾` was.
- Live-run screenshots (seat files, `objectstack-seat2/36366-shots/`):
  - `1-list-header-before.png`: the bar with `Import ▾`.
  - `2-panel-before.png`: the panel, 0/3 pinned, Import in 「Other」.
  - `3-panel-import-pinned.png`: 1/3, Import pinned.
  - `5-list-header-after.png`: the bar with an Import button.
  - `6-server-door-422.txt`: the door's 422 reading.

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…nly, and arranges an installed object into its .custom pair (objectstack-ai#36888)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB9qsP28anD5tWRUHq8j1xSU)_

Fixes objectstack-ai#36505

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 管理员在 Studio
对象页看到的「表单」页签改名为「字段布局」,并多一句说明:这里的分组和顺序用在记录页、右侧预览、新建和编辑弹窗上;已安装应用的对象(比如
HotCRM 的线索)从只读变为可以调整分组和顺序,每个字段标出来自原始包、其他包还是本环境。
- 属于「客户可在已安装应用上自定义」这条主线:之前没有任何界面能调整已安装对象的字段分组。
- 出错时管理员看到的是分组顺序不对或保存被拒;改动只写进本环境的定制包,原始包不动,把定制包里的分组设置删掉就恢复原样。
- 无。

## What changes

**The tab (items 1, 4).** Studio's object page tab 「表单」 / `Form` reads
「字段布局」 / `Field layout` (same key `engine.studio.data.tab.form`, value
only). The 「字段分组」 source chip beside the Layout/Preview switch is
replaced by one sentence (`engine.studio.data.form.usedOn`): the groups
and order are used on the record page, the right-side preview, and the
create and edit dialogs. No form view is read or written there, and
there is no 新建/编辑 switch and no 「表单视图:…」 label.

- **Form-view code already deleted on main** before this PR, by the
internal-forms retirement (3b58921): `formViewSections.ts`,
`useFormViewDraft.ts`, `formViewSections-30057.test.ts`,
`DataPillar.formViewLayout-30057.test.tsx`, and the form-view branches
of `ObjectFormDesigner.tsx` and `StudioDesignSurface.tsx`. Re-measured
on this branch: no form-view read, write, label or switch is left in the
tab.
- **Deleted here:** the 「字段分组」 chip (`data-testid="form-layout-source"`)
and its two strings `engine.studio.data.form.layoutSource.fieldGroups` /
`fieldGroupsTitle` (en, zh).
`DataPillar.internalFormRetired-36425.test.tsx` now asserts the sentence
in place of the chip.
- **Kept:** `ObjectFormDesigner` (now the Field layout canvas), the
Layout/Preview switch, `ObjectGroupInspector`, `writeGroupLayout` /
`readFieldGroupMembership`, and every canvas operation (item 5:
add/rename/delete/move group, drag a field between groups, the keyboard
drop, the pinned fields, group settings).

**The list spelling (item 2).** The canvas saves group membership in
each group's own `fields` list through `writeGroupLayout`. New
`groupListLayout` (object-fields-io.ts) reads an object still written in
the older per-field `group` spelling into lists, so the object's first
save from the tab converts it: every group lists its members in display
order, and each field's `group` that a list now holds is dropped.
Nothing on the canvas moves. The header sentence of
`ObjectFormDesigner.tsx` that still named `fields[].group` +
`fieldGroups` is rewritten.

**An installed object (item 3).** Where the base's customization door is
open (`extendsBase && extWritable`, so `layoutWritable`), the tab is no
longer read-only:

- Every canvas operation and the group inspector edit the object
extension of the base's paired `.custom` package, in the Data pillar's
extension buffer, as the whole `fieldGroups` arrangement (every
non-table group listing its members, the format of objectstack-ai#36498 / ADR-0146
D10). New `groupArrangement` builds it.
- The top bar's Save saves and publishes it with the rest of that
extension (the `__c` fields and field patches it already holds stay).
The original package is not written.
- A field-arrangement edit on a contributed field (a field another
package brings) is allowed here, because the arrangement only places it.
Its properties stay locked.
- A field or group `place` entry of the extension, which a written
`fieldGroups` replaces (the server refuses the pair), is taken off by
the new `withoutReplacedPlacements`. A `{list}` placement stays.
- `foldObjectExtension` now folds a buffered `fieldGroups` the way the
registry does (`applyExtensionFieldGroups`), so the canvas shows the
arrangement before it is saved. It also keeps a placed own field's
served `group`.
- Each field card of an installed object carries its source: 「原始包」 /
Original package, 「本环境」 / This environment (a field the pair declares,
or any `__c` field), or the existing contributed mark that names the
other package (`fieldLayoutSources.ts`).
- Where the door is walled, the tab stays read-only, as before.

**Write path, a deviation from the claim's wording.** The claim says to
reuse the writer objectstack-ai#36624 added (`saveObjectExtensionArrangement`). The
tab uses that writer's composer `extensionWithArrangement` inside the
pillar buffer instead of calling the save. The buffer already holds a
draft of the very same `object_extension` document, so a second save
would be a second writer of it: refused by the first-write pin while the
buffer's draft is pending, and overwritten by the buffer's next save
once it lands. The header of `objectExtensionArrangementSave.ts` now
says so. No new write path: the bytes go out through the pillar's
existing extension save and publish (`doSaveExt`).

**Not in this PR.**
- No public-forms UI is added or moved.
- The Interfaces pillar is not touched.
- `packages/spec` and the authorable surface are not touched (0 files
under `packages/`).

**Overlap with objectstack-ai#36784 (paused, public forms).** That PR's DataPillar
hunks put a public-forms switch into this same tab. This PR keeps no
switch, per the 2026-11-24 ruling (item 4: 字段布局 edits field groups
only). `overlap-check` reports a textual conflict in
`StudioDesignSurface.tsx`, plus shared lines in the studio string files
and `access-security.json`. Whichever lands second rebases. Nothing here
builds on it or copies it.

## Why

No console path could arrange an installed object's field groups: the
record page's 「配置页面」 arranges tabs only, and this tab was walled
read-only on an installed package. The tab's name 「表单」 also no longer
matched what it edits since the internal-form retirement. It edits the
field groups that the record page, the preview and both dialogs read.

## Tests

- New `object-fields-io.test.ts` cases:
- `groupListLayout`: legacy to lists, mixed spelling, and unchanged when
already listed (the same refs come back).
- `groupArrangement`: the result safe-parses as an
`ObjectExtensionSchema` body.
- New `StudioCustomizeControls.objectExtension-28575.test.ts` cases:
  - the buffered arrangement fold, with a CONTROL;
  - `withoutReplacedPlacements`;
  - a placed own field keeps its group.
- New `ObjectFormDesigner.test.tsx` cases:
  - a legacy object converts on a rename, with a CONTROL;
  - the field sources are marked on an installed object, with a CONTROL.
- New `DataPillar.baseObjectExtension-28575.test.tsx` describe, "the
Field layout tab arranges an installed object into its pair":
  - The tab name, the sentence and the marks.
- Deleting group `basic` saves the extension body `fieldGroups: [{ key:
'more', fields: ['industry', 'region__c'] }]`, keeps `fields` and
`fieldPatches`, and leaves only the `{list}` placement. The body
safe-parses. No object save; the publish goes to the pair.
  - A walled CONTROL.
- Updated tests:
- `DataPillar.internalFormRetired-36425`: the sentence replaces the
chip, and the save is in the list spelling.
- `ObjectFormDesigner.keyboardDrop-11871` and `pinnedFields-27516`: the
move pins read the first save's conversion.
- `StudioDesignSurface.oneSurface-28572`: a base field is now an
arrangeable card.
- 25 files: the `{ name: 'Form' }` tab lookup now reads `{ name: 'Field
layout' }`, and 8 of them get the module-top `@objectstack/lint` import
that `check:test-source-alias` asks of edited files.
- **Ablation**, once, on the conversion (`groupListLayout` forced to
answer unchanged, written by `scripts/ablation-replace.mjs` with the
anchor 1 → 0 and the blob 7d64679 → 8ad709d6432e):
- Result: 4 failed / 72 passed across `object-fields-io`,
`ObjectFormDesigner` and `DataPillar.internalFormRetired-36425`.
- Restored: `git diff HEAD` is empty, and the file blob equals the HEAD
blob 7d64679.

## Acceptance notes

- **Group source marks are not drawn (a gap against item 3's "marks each
source").** Field cards are marked. A group's source cannot be told on
the client:
  - the served object carries no per-group source;
  - the layered `code` the canvas reads already has the pair folded in;
  - the customization contributions read lists fields only.
  
Drawing group marks needs a read that serves who placed each group. That
is a runtime read decoration (spec + runtime), raised in the report as a
decision, not guessed here.
- **Reordering the ungrouped bucket on an installed object is not
persisted.** An extension can arrange groups but cannot reorder the
base's field map. The canvas snaps back when a drag produces nothing to
save. Order inside a group is persisted (it is the group's list).
- **"Restore the original layout" has no button.** Removing
`fieldGroups` from the pair's extension restores the base's groups. This
was measured live through the API (below). A UI for it was not asked by
the card's items.
- **Field/group `place` entries are dropped when the arrangement is
written.** The server refuses them beside a written `fieldGroups`
(`refusePlacementsTheArrangementReplaces`), and the arrangement states
every group's members anyway.
- **The full `check:platform-checklist` is red on `main`, not from this
diff.** `access-security.json` cites
`packages/metadata-core/src/anonymous-form-intake.ts#anonymousFormExplicitWithdrawals`,
a symbol that c45dd80 (objectstack-ai#36697) removed. Measured: the symbol has 0
hits in origin/main's file, and origin/main's checklist cites it twice.
The scoped mode on this branch is OK: `check-platform-checklist
--changed-from origin/main: OK — 2 anchored file(s) in the change set, 9
anchor(s) judged, 0 lost`.
- The live check used the showcase app's installed objects. HotCRM's 线索
is not in the example, so `showcase_category` stood in as the installed
object.

- **Open questions decided (seat, 2026-11-24).** Group source marks are
trimmed from this card: field cards are marked, groups are not (recorded
on objectstack-ai#36505 as 7125461985). The single-writer route is accepted: the tab
composes `extensionWithArrangement` inside the Data pillar's buffer and
saves through the pillar's extension Save, instead of calling
`saveObjectExtensionArrangement`.
- **Fix round 1 (4b0d7ee).** Step 3 of the live customize journey
spec now clicks the object header's Field layout tab (it clicked Form).
Run live on a booted showcase: 1 passed (25.2s). The Add field draft
body is still exactly `{extend, fields}`.
- Open PR objectstack-ai#36884 (objectstack-ai#36502, Interfaces retirement) overlaps textually in
`studio-authoring.json` and two StudioDesignSurface tests, plus shared
files. Whichever lands second rebases.

## Screenshots (card 验收)

Taken at head 4b0d7ee on a booted showcase (`objectstack dev
--seed-admin` plus console vite from this branch), browser locale zh-CN,
1440×900 at deviceScaleFactor 2. The files are in the project files
under `issue-36505/`:

- `1-installed-field-layout.png`: the installed object
`showcase_category` (com.example.showcase, badge 只读) on the 「字段布局」 tab.
Groups are 分类 (名称, 上级) and 显示 (颜色, 排序). Every field card is marked 原始包,
the sentence 「这里的分组和顺序用在记录页、右侧预览、新建和编辑弹窗上。」 is shown, and the group
controls are enabled.
- `2-self-built-field-layout.png`: the self-built `qa_layout_ticket`
(writable package com.example.qa-layout, authored in the legacy
per-field `group` spelling) on the same tab, with groups Main (Title,
Status) and Extra (Notes). It shows no source marks, no 只读 badge, and
the same sentence. The package's own labels have no zh translation, so
they stay in English.
- `3-installed-after-save.png`: `showcase_category` after 删除分组 on 显示 and
the top-bar Save. The toast reads 「已保存并生效:分类」, and the groups are 分类
(名称, 上级) and 未分组 (颜色, 排序). The writes were `PUT
/api/v1/meta/object_extension/showcase_category?mode=draft&package=com.example.showcase.custom`
with body
`{"extend":"showcase_category","fieldGroups":[{"key":"category","label":"Category","collapse":"none","fields":["name","parent"]}]}`,
then publish at the pair (200). There was no write to
`object/showcase_category`.

Customizations reading (card 验收, L1 N1): `GET
/api/v1/packages/com.example.showcase/customizations`.
- Before the save: 200, `arrangements: []`, counts all 0.
- After the save: 200, `arrangements:
[{"object":"showcase_category","key":"fieldGroups"}]`,
`counts.arrangements: 1`, `counts.extensions: 0`. The pair's extension
holds only the arrangement key.

## Verification

Two-minute check: boot the showcase with the console. Open Studio → Data
→ Category (installed, read-only package) → 字段布局 / Field layout, delete
the group "Display", and press Save. The two fields fall to Ungrouped.
`GET /api/v1/meta/object/showcase_category` serves one group `category`
listing `name`, `parent`, and the base package is unchanged.

<details><summary>Live check on a booted showcase (head a144b62),
screenshots described</summary>

`objectstack dev --seed-admin -p 4517` with its own db, plus the console
Vite dev server on :4518 pointed at it; Playwright Chromium, en-US.

- **Installed object** (`showcase_category`, package
`com.example.showcase`, legacy per-field `group` spelling):
- Screenshot 1: the tab strip reads Records · **Field layout** ·
Validations. The sentence sits beside Layout/Preview. Groups Category
(Name, Parent) and Display (Color, Sort Order). Every card is marked
「Original package」. The group controls are enabled; the header badge
still says Read-only (the package is).
  - Deleting Display and pressing Save sent exactly:
- `POST /api/v1/packages/com.example.showcase/ensure-customization` →
201
- `PUT
/api/v1/meta/object_extension/showcase_category?mode=draft&package=com.example.showcase.custom`
with body
`{"extend":"showcase_category","fieldGroups":[{"key":"category","label":"Category","collapse":"none","fields":["name","parent"]}]}`
→ 200
- `POST
…/object_extension/showcase_category/publish?package=com.example.showcase.custom`
→ 200
    - No write to `object/showcase_category`.
- Screenshot 2: Category (Name, Parent) and Ungrouped (Color, Sort
Order).
- Served object afterwards: `fieldGroups: [category → name, parent]`;
`color` and `sort_order` carry no group.
- Revert by API: the extension saved without `fieldGroups` and published
(200/200) serves the base's two groups again, with `color` /
`sort_order` → `display`.
- **Self-built object** (`qa_layout_ticket` in a scratch writable
package `com.example.qa-layout`, authored in the legacy spelling:
`title`/`status` → `main`, `notes` → `extra`):
- Screenshot 3: groups Main and Extra, no source marks (not an installed
object).
- Deleting Extra and pressing Save sent one `PUT
/api/v1/meta/object/qa_layout_ticket?mode=draft&package=com.example.qa-layout`
whose body has `fieldGroups:
[{"key":"main","label":"Main","fields":["title","status"]}]` and no
`group` on any field (the first-save conversion), then the publish →
200.
  - Screenshot 4: Main (Title, Status) and Ungrouped (Notes).

</details>

<details><summary>Local tests and type-check (final head
a144b62)</summary>

- `cd ui && npx vitest run` over the 9 substantive test files
(object-fields-io, StudioCustomizeControls 28575, ObjectFormDesigner,
DataPillar 28575, DataPillar 36425, keyboardDrop 11871, pinnedFields
27516, oneSurface 28572, objectExtensionArrangementSave 36499): `Test
Files 9 passed (9)`, `Tests 153 passed (153)`, `VERDICT command-exit 0`.
- The 8 files given the lint import: `Test Files 8 passed (8)`, `Tests
27 passed (27)`.
- `packages/i18n/`: `Test Files 109 passed (109)`, `Tests 2014 passed |
13 skipped`.
- `pnpm --dir ui exec vitest run scripts/`: `Test Files 172 passed | 2
skipped (174)`, `Tests 5127 passed | 2 skipped`, `VERDICT command-exit
0`.
- Whole `studio-design` + `metadata-admin/previews` sweep after the
source was final: `Test Files 531 passed` of 534. The 3 red files were
the three updated pins above, re-run green since.
- `pnpm --filter @object-ui/app-shell type-check && pnpm --filter
@object-ui/i18n type-check`: `VERDICT command-exit 0`, after building
the `@object-ui/app-shell^...` closure.

</details>

<details><summary>Derived gate families (dispatch-gates --commands, 45
families)</summary>

Run on head a144b62 (the ui scripts suite included), reconciled:
`dispatch-gates --ran: 45 derived famil(ies) accounted for — 45 run, 0
NOT-MEASURED (a DERIVED zero — all 45 recorded an exit code and none of
them is 3)`.

- Red, 1: `pnpm check:platform-checklist :: exit 1`. This is main's
ABSENT SYMBOL `anonymousFormExplicitWithdrawals` (see Acceptance notes).
The scoped `--changed-from origin/main` run is OK.
- `pnpm check:test-source-alias :: exit 0`. It was red on 2f815c5 (8
edited tests lacked the module-top lint import) and is fixed in
a144b62.
- Green, 43:

- `node scripts/check-adr-0087-registration.mjs --base origin/main ::
exit 0`
  - `node scripts/check-adr-0087-registration.mjs --self-test :: exit 0`
  - `node scripts/check-adr-links.mjs :: exit 0`
  - `node scripts/check-adr-links.mjs --self-test :: exit 0`
- `node scripts/check-changeset-no-major.mjs --base origin/main :: exit
0`
  - `node scripts/check-closing-keyword-parity.mjs :: exit 0`
- `node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0`
  - `node scripts/check-comment-mask-corpus.mjs :: exit 0`
- `node scripts/check-empty-changeset.mjs --base origin/main :: exit 0`
  - `node scripts/check-empty-changeset.mjs --self-test :: exit 0`
  - `node scripts/check-sdui-manifest.mjs :: exit 0`
  - `node scripts/check-sdui-manifest.mjs --self-test :: exit 0`
  - `node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0`
  - `node scripts/ci/snapshot-next.mjs --self-test :: exit 0`
- `node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0`
  - `node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0`
  - `node scripts/release-pending-publish.mjs --self-test :: exit 0`
- `pnpm --filter @objectstack/lint run check:doc-formula-expressions ::
exit 0`
- `pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit
0`
  - `pnpm check:adr-anchors :: exit 0`
  - `pnpm check:changeset-gate-self-tests :: exit 0`
  - `pnpm check:ci-filter-parity :: exit 0`
  - `pnpm check:closed-ceremony-text :: exit 0`
  - `pnpm check:cross-package-test-inputs :: exit 0`
  - `pnpm check:dispatcher-error-vocabulary :: exit 0`
  - `pnpm check:doc-authoring :: exit 0`
  - `pnpm check:driver-memory-census :: exit 0`
  - `pnpm check:engine-double-contract :: exit 0`
  - `pnpm check:gitlink-declared :: exit 0`
  - `pnpm check:nul-bytes :: exit 0`
  - `pnpm check:published-files :: exit 0`
  - `pnpm check:query-options-erasure :: exit 0`
  - `pnpm check:refd-timer-probe :: exit 0`
  - `pnpm check:registry-log-declared :: exit 0`
  - `pnpm check:rest-log-spy-declared :: exit 0`
  - `pnpm check:skill-identifier-liveness :: exit 0`
  - `pnpm check:tier-file-adoption :: exit 0`
  - `pnpm check:type-check-coverage :: exit 0`
  - `pnpm check:type-check-debt :: exit 0`
  - `pnpm check:undeclared-dep-imports :: exit 0`
  - `pnpm check:watch-hint-literal :: exit 0`
  - `pnpm check:where-matcher :: exit 0`
  - `pnpm --dir ui exec vitest run scripts/ :: exit 0`

</details>

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No spec change.)
- [x] 2. Every name I added uses the casing for its kind.
- [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran. `pnpm
lint` is CI's run, not re-run locally.)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a (not touched).
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [ ] 8. Title, body and comments are in English. (English, except the
维护者速读 block the fleet's PR rule asks for in Chinese.)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

---

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

<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzhpykmQZe1yMupC2CU -->

---------

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 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

2 participants