Skip to content

feat(studio): the Form tab becomes Field layout, edits field groups only, and arranges an installed object into its .custom pair - #36888

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-36505-field-layout-tab
Nov 24, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-36505-field-layout-tab

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Fixes #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 记录页排布的第三层:配对的 .custom 包可以给安装来的对象声明完整的分组和页签排布(原始包完整声明、继承包只能声明插入位置,这两层不变) #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 #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 #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 7d646795841f → 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 7d646795841f.

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 (feat(setup): Setup → Configuration → Public forms lists and switches every public form #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 Studio 对象页「表单」页签改成「字段布局」:只编辑对象的字段分组,不再读写表单视图;安装来的对象存到 .custom 的排布里 #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 fix(studio): retire Studio's Interfaces column (objectstack#36502) #36884 (Studio「界面」整栏作废:顶部导航去掉「界面」,原来在里面改的东西各有去处;前置的运行界面入口全部落地后再摘 #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.

Live check on a booted showcase (head a144b62), screenshots described

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).
Local tests and type-check (final head a144b62)
  • 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.
Derived gate families (dispatch-gates --commands, 45 families)

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

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (No spec change.)
  • 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.)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: n/a (not touched).
  • 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.)
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

…ld groups into its .custom pair (WIP)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
…nt fold and the field sources

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
…rangement into its pair

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
… Field layout tab

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
…lection

check:test-source-alias judges the test files a change edits; the eight that
reach a dynamic import of @objectstack/lint get the module-top side-effect
import the convention asks for.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 24, 2026
The Studio object page's Form tab is now Field layout (objectstack#36505);
step 3 of studio-customize-journey clicks it by its new name.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — REWORK · repo:objectstack#3 · head 4b0d7ee · 2026-11-24T08:33Z

L1-a read of #36888 (card #36505) at 4b0d7ee635b4dd86200aad8c0435f2ef33b814dd. Paper only: nothing on the head has to move.

Mechanical. l1-face CLEAN (13 items; 52 success · 13 expected skips · 0 failed · 0 pending). check-governed-merges: NOT governed, 1,052 lines. mergeable_state clean.

Read, and what holds.

  • Items 1, 2, 4 and 5. One path is left: the tab reads and writes the object's fieldGroups. No form-view read, write, label or switch is left in the tab (the form-view code went with 内部的新建和编辑表单作废:平台不再加载表单定义,弹窗一律按字段分组和字段规则排;字段加一个「新建时显示」的开关(对外表单不受影响) #36425). groupListLayout converts the per-field group spelling on the first save and moves nothing on the canvas: listed members are kept as written, members from group are appended where groupMembership already shows them, and a group naming no declared group is kept. The conversion is pinned and ablated. The tab is 「字段布局」 / Field layout, and the sentence engine.studio.data.form.usedOn reads as item 4 asks.
  • Item 3. layoutWritable gates the canvas on the open door, and the walled CONTROL is pinned. groupArrangement writes every non-table group with its full fields list. withoutReplacedPlacements drops {field} / {group} placements and keeps {list}, which matches refusePlacementsTheArrangementReplaces. applyExtensionFieldGroups follows objectql/src/registry-custom-arrangement.ts#applyCustomArrangement rule for rule: a listed field follows its listing group, and an undeclared field naming a listing group, a missing group or a table group loses its group. So the canvas shows what the fold will serve.
  • The single-writer route through extensionWithArrangement inside the pillar buffer is right: a second save of the same object_extension document would race the first-write pin. The seat accepted it, and the trim of group source marks is recorded on the card (7125461985), so Fixes #36505 stands.
  • Changeset sentences checked against the tree and the live readings. The touched published package @object-ui/i18n is named, and @object-ui/app-shell is private. Removing engine.studio.data.form.layoutSource.* is stated.

Findings.

Nits (no action required):

  • N1. The installed-object acceptance names HotCRM 线索 and a GET /api/v1/packages/<base>/customizations reading. The body uses showcase_category as the stand-in and reads the served object instead. The endpoint does list each whole arrangement a pair's extension writes (runtime/src/domains/packages.ts, pinned in packages-customizations.test.ts), so the reading follows from the measured publish. Adding that one GET to the live block alongside M1 would close the line literally.
  • N2. "Restore the original layout" has no button: the revert was measured by API. The card's acceptance asks only that deleting the customization restores the base, and it does. A UI door is a follow-up if the maintainer wants one.
  • N3. Reordering the Ungrouped bucket on an installed object snaps back, because an extension cannot reorder the base's field map. This is disclosed in the body. A one-line hint on the canvas would save a confused drag.

M1 is not a nit, so REWORK. Once the images are in the body, the delta read is a paper read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — ACCEPT · repo:objectstack#3 · head 4b0d7ee · 2026-11-24T08:48Z

Paper delta read of #36888 (card #36505) on REWORK 7126285974. The head is unchanged at 4b0d7ee635b4dd86200aad8c0435f2ef33b814dd, so the code reading, l1-face CLEAN and the green checks from that verdict all stand.

  • M1: closed. The body's new section "Screenshots (card 验收)" names three zh-CN shots taken at this head. I opened all three and each shows what the section says:
    • 1-installed-field-layout.png: showcase_category with the 只读 badge on 「字段布局」. Groups 分类 / 显示, every card marked 原始包, the sentence 「这里的分组和顺序用在记录页、右侧预览、新建和编辑弹窗上。」, and the group controls live.
    • 2-self-built-field-layout.png: qa_layout_ticket with Main / Extra, the same sentence, no source marks and no 只读 badge.
    • 3-installed-after-save.png: after deleting 显示 and Save, the toast 「已保存并生效:分类」 shows, and 颜色 / 排序 sit under 未分组.
      The card's two named shots, self-built and installed, are covered. The files are kept in the project's shared files (issue-36505/) because an agent cannot upload images to a GitHub body. If the maintainer wants them inline on GitHub, they can be dragged into the body by hand, and that changes nothing on the head.
  • N1: closed. GET /api/v1/packages/com.example.showcase/customizations: arrangements: [] before the save; [{object: showcase_category, key: fieldGroups}], counts.arrangements: 1 after it.
  • N2 and N3 stand as nits (no Restore button; the Ungrouped reorder snaps back on an installed object).
  • Size per card (rule of 2026-11-24 08:28Z): Studio 对象页「表单」页签改成「字段布局」:只编辑对象的字段分组,不再读写表单视图;安装来的对象存到 .custom 的排布里 #36505 has this one PR, 1,052 lines. NOT governed, ordinary queue landing.

Every open finding is a nit, so ACCEPT.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzhpykmQZe1yMupC2CU

Landing · 2026-11-24T08:56Z · ACCEPT 7126603480 at head 4b0d7ee (paper delta on REWORK 7126285974)

reading value
check-governed-merges.mjs --pr 36888 NOT governed · +927/−125 (1052 ≤ 3000); card #36505 total = this one PR, 1052 lines (per-card rule of 2026-11-24 08:28Z)
landing-k.mjs --pr 36888 OK · K = 3 < 15 · no new locale pack under a label PR · no shared book moved under this PR's
checks at 4b0d7ee 54 success (Check Changeset re-run after the body edit included), 15 expected skip, 0 failed or pending; mergeable clean

Open findings: nits only (L1 N2 no Restore button, N3 Ungrouped reorder snaps back on an installed object; both disclosed in the body). Scope trim recorded on the card (7125461985: group source marks). Overlaps: #36784 (paused) and #36884 (#36502); whichever lands second rebases. State: ready + auto-merge (Tier S). On MERGED, #36505 closes by Fixes; area ux-A removes pm:dispatched.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 24, 2026 08:56
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 24, 2026
Takes in the Interfaces retirement (#36884, objectstack#36502). Three files
conflicted; both sides are kept:
- StudioDesignSurface.designerRegistryMissing / lateRegistration-11939 tests:
  main's side (InterfacesPillar import and cases removed, its own module-top
  lint import), with the object page tab looked up as Field layout again.
- studio-authoring.json first-run-loop: main's revision 14 entry kept, this
  branch's Field layout entry renumbered 15 and the item's revision set to 15.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — ACCEPT · repo:objectstack#3 · head c743433 · 2026-11-24T09:54Z

Merge-resolution read of #36888 (card #36505). The head is c7434331576d441746c425353dab8cb21741d2e3, a merge of 4b0d7ee6 (ACCEPT 7126603480) with main 3f568c1a, which carries #36884 / #36502. The content of this PR is not re-read; this read covers only the resolution.

  • Checks. 50 success · 11 expected skips · 0 failed · 0 pending; mergeable_state clean. The face's one flag is shape (ready, not draft): the PR was ready and queued before the conflict dequeued it, so that is expected.
  • Combined diff (git show --cc). Only three files carry hunks that differ from both parents:
    • studio-authoring.json first-run-loop: main's Studio「界面」整栏作废:顶部导航去掉「界面」,原来在里面改的东西各有去处;前置的运行界面入口全部落地后再摘 #36502 history row stays at revision 14, this branch's Field-layout row becomes 15, and revision is 15. Step 2 takes this branch's 'Field layout tab' wording, and step 5 takes main's no-Interfaces wording. Both sides are kept.
    • studio-customize-journey.spec.ts header: main's step 1 (the All-metadata item page) and this branch's step 3 (the Field layout tab) are both kept.
    • StudioDesignSurface.tsx imports: this branch's fieldLayoutSourcesOf and withoutReplacedPlacements stay. useDraftAutoSave and ServedOverride go, as on main, where their only reader (the Interfaces pillar) is gone. The type-check lanes are green on this head.
  • The two hand-resolved tests (designerRegistryMissing, lateRegistration-11939): against main, each now differs by one line only, the object-page tab looked up as 'Field layout'. Main's removal of the Interfaces cases holds, and no duplicate lint import is left.
  • Net PR against the new main: 45 files, +923/−125. That is the accepted diff less the four lines the conflicts took on main's side, with nothing new.
  • Size per card: still the one PR, about 1,050 lines. NOT governed, ordinary queue landing.

The resolution keeps both sides and adds nothing. ACCEPT.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzhpykmQZe1yMupC2CU

Landing (re-queue) · 2026-11-24T09:55Z · merge-resolution ACCEPT 7128051089 at head c743433 (after the 09:18Z MERGE_CONFLICT dequeue against #36884)

reading value
check-governed-merges.mjs --pr 36888 NOT governed · +923/−125 (1048 ≤ 3000); card #36505 total = this one PR (per-card rule of 2026-11-24 08:28Z)
landing-k.mjs --pr 36888 OK · K = 1 < 15 · no new locale pack under a label PR · no shared book moved under this PR's
checks at c743433 50 success, 11 expected skip, 0 failed or pending; mergeable clean

Resolution note 7128003666 (studio-authoring.json revision 14/15, two StudioDesignSurface tests on main's side plus the Field layout lookup). Earlier verdicts stand (ACCEPT 7126603480). State: ready + auto-merge (Tier S). On MERGED, #36505 closes by Fixes; area ux-A removes pm:dispatched.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 5c2d5cf Nov 24, 2026
61 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36505-field-layout-tab branch November 24, 2026 10:20
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…bjectstack-ai#36884)

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

repo:objectstack#3 · os-support-ai · session_01WGufzj9RY8jKV57hUTNEYg

Clause-②: no
Metadata-protocol: none

## 维护者速读

- Studio 顶部只剩「数据、自动化、权限、全部元数据」,首屏是「数据」;旧地址 `/studio/<包>/interfaces`(含
`?surface=` 深链)落到数据页,提示「界面的修改已经搬到应用里」并带回到应用的链接。
- 只读包(如安装来的
HotCRM)里视图、仪表盘、报表、页面的「定制」入口,从「界面」搬到「全部元数据」里该条目的页面(席位已认可),定制和「恢复包原版」照旧。限制:这类包自带的列表视图,在应用里只能另存为个人视图,要改给所有人看的版本仍需进「全部元数据」(objectstack-ai#35974
起就是如此)。
- 对外表单(objectstack-ai#36444 未合并)暂时没有可视化编辑,元数据照常可改;PR objectstack-ai#36784 需要的共用部件都保留。
- 删改合计约 3.7 万行(几乎都是删除),按规则需要您批准合并。

## What changes

The card (objectstack#36502), the maintainer's dispatch 「没关系,不等那个,现在就派」
(2026-11-24 05:17Z) and ruling record 7122806677 (the objectstack-ai#36444 dependency
waived; public forms stay metadata-editable; keep what PR objectstack-ai#36784 needs).

- **Studio's top nav** (`StudioDesignSurface.tsx`): the Interfaces
pillar (`InterfacesPillar`, about 3,600 lines) is gone. The pillars are
Data, Automations, Access, plus All metadata. A package's Studio root
opens Data (`STUDIO_HOME_PILLAR`).
- **Old links** (`studioInterfacesRetired.ts`,
`StudioInterfacesRetiredNotice.tsx`): `/studio/<pkg>/interfaces`, with
or without `?surface=`, redirects to `/studio/<pkg>/data`, keeping only
`?changes=`. The Data pillar shows a one-line notice, 「界面的修改已经搬到应用里」 /
"Interface edits have moved into the app.", with "Back to the app" (the
same target as the header's ‹ Back to app) and Dismiss. The notice is
latched when the landing arrives, so the Data pillar's own `?surface=`
write and the Changes drawer dropping `?changes=` do not erase it. It
goes on Dismiss or when the author switches pillar.
- **Producers re-pointed**: `studioChangesLink.ts`,
`packages/runtime/src/domains/mcp-authoring.ts` and
`packages/cli/src/commands/meta/register.ts` print
`/studio/<pkg>/data?changes=review`. The old
`/interfaces?changes=review` still opens the drawer through the
redirect. Console links that opened `/interfaces?surface=T:N`
(`appRoute.ts#appStudioSurfacePath`, `artifactStudioPath.ts`,
`metadataArea.ts`, `AiChatPage.tsx`) open the item's All-metadata page
`/studio/<pkg>/metadata/<type>/<name>`, or `/data` for a built app.
- **Customize on a read-only base moves to All metadata.** In the
running app, the view config panel is read-only for a view a read-only
package ships (objectstack#35974), and View settings' Save offers only
"Save as my view". So without this, retiring the pillar would have
removed the only door that customizes a shipped view, dashboard or
report into `<base>.custom`.
`metadataArea.ts#AREA_CUSTOMIZE_EDITOR_TYPES` grows from `dataset` to
`dataset, view, dashboard, report, page`. On a read-only base those
items open `StudioBundleItemEditor`, with Customize, the type's
registered designer (`ViewDefaultInspector`,
`DashboardDefaultInspector`, `ReportDefaultInspector`,
`PageDefaultInspector`), the override chip and Restore. On a writable
package they still open the generic item page. The seat accepted this
route (seat note, 07:01Z), so it is not a deviation.
- **Docs and skills**: `ui/packages/app-shell/README.md` (the
dataset-context and reverse-bridge sections),
`skills/objectstack-mcp-build/evals/draft-door-procedure.json` (the
review link) and the plugin-chatbot `onDesignBuiltApp` doc example. No
other user doc or skill names the Interfaces column (`git grep` over
`content/docs` except releases, and over `skills/`).
- **i18n**: `engine.studio.interfacesRetired.sentence`, `.backToApp` and
`.dismiss` (en, zh). The old `interfaces`/nav keys stay; the dead-key
gate is report-only.
- **Checklist**: `studio-authoring.interfaces-create-dialogs` is retired
(rev 5, with a retiredReason). `coverage.json` drops it from `app`,
`page` and `report`; each still maps other items.
`package-customize-restore-display` (rev 7) re-points its door to the
item page. Eight more studio-authoring items,
`dashboards.global-filters-rescope` and
`ux-conventions.labels-over-machine-names` have their Interfaces steps
re-pointed, each with a revision bump and a history row.

### Item 5 census: what was deleted and what was kept

Deleted, because only the Interfaces column used it:
- Source: `InterfacesPillar` (in `StudioDesignSurface.tsx`, -3,624/+66
in that file), `InterfacesNavRail.tsx`, `StudioNavItemInspector.tsx`
(its `StudioPicker` moved to `StudioPicker.tsx`, which the Access pillar
uses), `ObjectListViewInspector.tsx`, `ObjectListViewTitle.tsx`,
`ListViewTypeSection.tsx`, `ListViewChartSection.tsx`,
`ListViewBulkActionsSection.tsx`, `ListViewMoreSection.tsx`,
`interfaceCreate.tsx`,
`metadata-admin/previews/SourcePageProperties.tsx`, and
`services/componentRegistry.ts#listAppComponents` (declared, read by
nothing).
- Tests: 80 files that drove only the pillar, its rail or its
inspectors. About 30 more `StudioDesignSurface.*` files lost only their
Interfaces cases. Pins of shared behaviour were moved, not dropped:
`useNavTargetLabel.draftLabels-11862`, `AppNavCanvas.menuOrder-26979`,
`studioZhPillarNames-11801`, and the kanban board's card-opens-record
controls (objectui#12725/objectstack-ai#12888), now in
`plugin-kanban/src/__tests__/KanbanRenderer.cardOpensRecord-12725.test.tsx`.

Kept, because something else uses it or it is a shared export:
- What PR objectstack-ai#36784 imports: `DataPillarHelpers`,
`StudioCustomizeControls`, `StudioPillarKit`, `setup/publicForms`.
Public-forms code and UI are untouched (the maintainer paused that
development at 05:23Z).
- `StudioCustomizeControls` (override chip, Restore,
`overrideDraftBody`), now serving the All-metadata editor;
`StudioItemHeader`; `studio-canvas-preview` /
`StudioObjectRecordsCanvas`; `useSurfaceDeepLink`; `navSurface`,
`servedNavText`; `metadataError` helpers; `STUDIO_KIND_CHIP`.
- Shared nav-editing helpers with no Studio caller left, kept as
exports: AppNavCanvas held-nav helpers, `nav-target` (`NAV_ENTRY_TYPES`,
`navTypeAcceptsChildren`, `retypedNavEntry`), the `DraftTargetLabels`
and dataset-create contexts (no provider today). Each is small; deleting
them is a follow-up if nothing picks them up.
- The old i18n `interfaces` / nav-inspector keys (report-only dead
keys).
- `ui/e2e/studio-item-header-title-width.spec.ts`: a fixture-only
geometry pin of `StudioItemHeader`. Its last describe draws an
"Interfaces leaf" from fixtures, so it does not depend on the pillar.

### Prerequisite cards (card item 1)

objectstack-ai#36363 menu, objectstack-ai#36366 header actions, objectstack-ai#36364 add-menu-item, objectstack-ai#36370 view
settings, objectstack-ai#36372 dashboard edit, objectstack-ai#36374 report edit, objectstack-ai#36425 internal
forms retired, objectstack-ai#36485 header Studio links, objectstack-ai#36487 sidebar Design entry,
objectstack-ai#36498 and objectstack-ai#36499 record page grouping and tabs: all closed as
completed. objectstack-ai#36444 (public forms) is open; ruling 7122806677 waives it.
Until it lands, public forms have no visual editor and stay
metadata-editable.

### Merge note

Against objectstack-ai#36784 (head 1f9f234), `overlap-check` reports one conflict:
adjacent import lines at the top of `StudioDesignSurface.tsx`. objectstack-ai#36784
adds `useHref` to the `react-router-dom` line; this PR drops the
now-unused `useMetadata` from the `@object-ui/react` line. Resolution:
take both. Every other file merges cleanly, and origin/main (7a5ae65)
merges cleanly. A later draft, objectstack-ai#36888 (the Field layout tab, objectstack-ai#36505),
overlaps in `studio-authoring.json` and in two surface tests that both
PRs gave the module-top `@objectstack/lint` import; whichever lands
second rebases.

## Tests

- New: `studioInterfacesRetired.test.ts` (target, state, encoding);
`StudioDesignSurface.interfacesRetired-36502.test.tsx`, through the real
surface: bare URL → Data with the notice (en, and the zh catalogue
string 「界面的修改已经搬到应用里」), Back to app, `?surface=` dropped,
`?changes=review` keeps the notice, the notice outlasts the Data
pillar's own `?surface=` write, leaving for another pillar takes it
away, Dismiss, no Interfaces in the nav, and a CONTROL (a plain arrival
on Data shows nothing). `metadataArea.test.ts` and
`StudioMetadataArea.routes-28561` pin the moved Customize door: view,
dashboard, report and page open the editor only on a read-only package;
flow and object stay on the generic page. `copilotDoors-12894` pins that
an old `/interfaces?changes=review` opens the drawer on Data.
- Re-pointed: every producer test, from `/interfaces?surface=` to the
item page or `/data`: `appRoute`, `artifactStudioPath`, `metadataArea`,
`AppHeader.*`, `PageView.*`, `SidebarAppMenu-36112`,
`AiChatPage.noNavigationAfterBuild`, `notFound-26708`,
`kernelReadOnly-29567`, `pillarNavGuard`, `metadataArea-28561`,
`openPathObjectReaders-12811` (three rows for readers that left with the
pillar).
- Local: app-shell `tsc` (src and test) exit 0. Vitest on the 820 test
files that touch Studio, the console routes, i18n, plugin-chatbot and
plugin-kanban, under the verify lock: 8154 tests, 9 failed on the first
pass, all fixed and re-run green, with the affected files re-run after
each later change. `@objectstack/runtime` `mcp-authoring.test.ts` (50)
and `@objectstack/cli` `register-draft.test.ts` (10) green. Full `turbo
build` green (120/120).

## Acceptance notes

- **CI round 1** (fixed in 8cfc5d6): `check:test-source-alias` asked 14
edited tests for the module-top `@objectstack/lint` /
`@objectstack/formula` import; the spec-symbol ledger and the
clickable-non-control census still listed the deleted
`InterfacesNavRail.tsx` / `StudioNavItemInspector.tsx` and the retired
rail's scrim; and the listed-manifests read had lost its only rejection
handler with the pillar, which surfaced as unhandled 404 rejections in
surface tests. All of `studio-design` re-run locally after the fix: 292
files, 2079 tests, green.
- **Live e2e** (CI-shaped: workspace backend via
`ui/e2e/live/ci/start-backend.sh`, console `vite build` plus `vite
preview` proxying to it). `studio-customize-journey.spec.ts` now
customizes `showcase_task.in_progress` on
`/studio/com.example.showcase/metadata/view/showcase_task.in_progress`:
Customize, then Remove Due Date in the view designer. That sends ensure
201 and a draft PUT to `package=com.example.showcase.custom&mode=draft`
with the overrides block; Publish runs the pair's publish-drafts (200);
the three reads serve the customized columns; the override chip appears;
Restore sends two DELETEs at the pair and the shipped columns are served
again. Green 4 of 4 runs. The whole `test:e2e:live:ci` allowlist: 23
passed in 1.7 min, which fits the job's two-minute budget.
- **Browser, zh-CN and en** (showcase): the Studio root opens 数据 / Data,
and the nav reads 数据·自动化·权限·全部元数据 / Data·Automations·Access·All
metadata. An old `/interfaces?surface=view:…` lands on Data with the
notice in each language; Back to the app goes to
`/apps/com.example.showcase`. `/interfaces?changes=review` opens Pending
changes on Data with the notice. `/data?changes=review` opens the drawer
with no notice. The metadata item deep link opens the editor. All
metadata on the read-only showcase also opens a dashboard, a report and
a page with Customize.
- **HotCRM walk** (hotcrm main 48082b7 on its published 18.6.0 backend,
served by this branch's console): on Sales, the running app offers the
design entries (sidebar app menu Design layout, View settings on lists,
Edit on the executive dashboard, Configure tabs in the record ⋯ menu).
No link on the home, list, record or custom pages points at
`/interfaces`. The app menu's View in Studio opens
`/studio/app.objectstack.hotcrm/data?surface=object:crm_account`. All
metadata opens `crm_account.all_accounts`, `executive_dashboard`,
`sales_home_page` and `contract_print_page`, each with Customize. The
custom page `sales_home_page` renders. The contract print page renders
at `…/crm_contract/record/<id>/page/contract_print_page`, and Print
Contract filed a 224 KB PDF through this console (print engine pointed
at local Chromium). I checked that the in-app entries are present; I did
not re-drive the menu, view, dashboard and record-grouping writes, which
are the prerequisite cards' and were walked there. No HotCRM change is
needed.
- **The Interfaces column's edit surface, against the card's table**:
nav rail and nav-item inspector → design mode menu (objectstack-ai#36363); header
actions (objectstack-ai#36366); New dashboard/report/page dialogs → design mode
add-menu-item (objectstack-ai#36364); list-view and kanban inspector → View settings
(objectstack-ai#36370); dashboard and report designers → in-page Edit (objectstack-ai#36372,
objectstack-ai#36374); source and custom pages → no visual editor, metadata-writable
(ruled). One row the table did not list is Customize on a read-only
base, which now lives in All metadata (above).

## Verification

Read first, by risk: `StudioDesignSurface.tsx` (the redirect
`<Navigate>`, the latched `retiredOn` notice state, `PILLARS`),
`metadataArea.ts#AREA_CUSTOMIZE_EDITOR_TYPES`,
`studioInterfacesRetired.ts`, and
`ui/e2e/live/studio-customize-journey.spec.ts` steps 1 and 2.

Two-minute check: open `/studio/<a package>/interfaces?surface=page:x`.
Expect the Data pillar, the notice 「界面的修改已经搬到应用里」 and a working 回到应用.
Then open a view of a read-only package under All metadata and expect
Customize.

Governed reading (`check-governed-merges.mjs --branch`): Tier H.
`skills/**` ×1
(`skills/objectstack-mcp-build/evals/draft-door-procedure.json`), and
37,094 changed lines (+1,489 / −35,605) is over the 3,000-line line. Not
to be readied, queued or auto-merged by a seat.

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

https://claude.ai/code/session_01WGufzj9RY8jKV57hUTNEYg

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ress changes (objectstack-ai#36973)

<!-- 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#36895

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

## 维护者速读

- 用户无感:Studio 里所有链接、跳转、AI 给出的审阅链接,地址一个字节都没变。
- 属于「Studio 重构」专题:先把所有生成 Studio
地址的地方收到一个函数,之后每张设计器卡只改一处就能切到新地址,不会出现两条跳转规则互相跳的死循环。
- 出错的表现是某个 Studio 链接打开到错的页面或打不开;本改动只换写法不换地址,可以直接撤回。
- 无。

## What changes

One builder for every Studio address, and every producer the card lists
now calls it. Every address is byte-for-byte what it was before. Nothing
redirects and no route changes.

- **Console builder (new file):**
`ui/packages/app-shell/src/views/studio-design/studioAddress.ts`. It
holds `studioPath`, the one path builder, and on top of it
`studioLandingPath`, `studioPackagePath`, `studioPillarPath`,
`studioHomePath`, `studioItemPath`, `studioPillarItemAddress`,
`studioSurfaceQuery`, the "All metadata" builders,
`studioChangesReviewPath` and `studioItemReviewPath`.
- The vocabulary also lives here: root, home pillar, `~org`, `~all`,
`metadata`, `interfaces`, and the `changes` and `review` params. The
modules that exported these before re-export them under the same names.
- `STUDIO_ITEM_PILLAR` is the per-type switch. `AREA_PILLAR_FOR_TYPE`,
which the area's pillar redirect reads, is now this same object. When a
designer card deletes a type's row, every `studioItemPath` caller and
the area redirect move together, so the two cannot loop.
- **Mapping table (new file):** `studioAddressTable.ts`. It has three
tables:
  - `STUDIO_ADDRESS_FAMILIES`: 13 address shapes.
- `STUDIO_ITEM_TYPES`: `object` (with its `view`, `action` and `nav`
qualifiers), `flow`, `permission`, and `owd:overview`. Each row gives
today's pillar and the metadata address the type moves to.
- `STUDIO_QUERY_PARAMS`: `surface`, `view`, `action`, `nav`,
`changes=review`, `review=1`, `package`, `scope=environment` and `new`.
Each row says whether the param is carried verbatim, rides as a
qualifier, or is replaced.
- **Card item 3:** the retired `/interfaces` redirect
(`retiredInterfacesTarget`, landed by objectstack-ai#36884) now reads which params it
keeps from this table (`STUDIO_RETIRED_INTERFACES_KEPT_PARAMS`). Its
output is unchanged.
- **Three `?surface=` spellings, all kept.** Producers did not agree on
how to write the value, and each spelling is kept as a named option
(`StudioSurfaceSpelling`):
- `'component'` (`surface=object%3Aaccount`) is used by most producers.
- `'name'` (`surface=object:account`) is used by `appStudioObjectPath`.
- `'form'` (`URLSearchParams`, `surface=object%3Aa&action=x`) is used by
`switchedOffActionPath`.
- StudioDesignSurface writes the scope segment unencoded, and that is
kept too, as `segmentEncoding: 'verbatim'`.
- **Server shared function, located in `@objectstack/types`:**
`packages/types/src/studio-review-links.ts` exports
`studioChangesReviewLink` and `studioItemReviewLink`. Both server
producers already depend on `@objectstack/types`, and neither may depend
on the Console. `packages/cli/src/commands/meta/register.ts` and
`packages/runtime/src/domains/mcp-authoring.ts` (`reviewRoutes`) now
call them. The review-link text served to the AI is unchanged (pinned
below).
- I did not choose `@objectstack/spec`: that would add a
contract-package export, and spec holds no runtime logic.
- The module is named `-links`, not `-routes`, because
`check:route-envelope` reads any `*-routes.ts` as a REST module.
- **Producers repointed (re-measured on 3f568c1 and later):**
- Card items 1–9: `appRoute.ts` ×3, `metadataArea.ts`,
`setupMetadataRedirect.ts` ×3, `CommandPalette.tsx`, `studioScope.ts`,
`artifactStudioPath.ts`, `AiChatPage.tsx`, `AppNoAccessEmptyState.tsx`,
`RecordTabsConfig.tsx`, `DashboardInPageEditor.tsx`,
`BuilderLanding.tsx`, `studioChangesLink.ts` and
`switchedOffActionTargets.ts`.
- Card item 10, `StudioDesignSurface.tsx`: only its four hand-built call
sites are swapped (pair-base redirect, Access pillar open,
`requestSurface`, pillar nav links). The edit merges cleanly with
objectstack-ai#36893's split branch (`git merge-tree`, exit 0).
- Card item 11: `StudioRoute.tsx` and `AppContent.tsx`. Route patterns
use `STUDIO_ROOT_PATH`, and the `:packageId` landing redirect uses
`STUDIO_HOME_PILLAR`, the same relative `data`.
  - Card item 12: the two server producers.
  - Card item 13: `InterfacesNavRail.tsx` is gone, as stated.
- A producer that landed on main meanwhile (objectstack-ai#36933) is repointed too:
`PackagesPage.tsx`'s local `studioPackagePath` now returns
`studioHomePath`.
  - Producers the card missed, now repointed:
    - `studioInterfacesRetired.ts`
- `metadataArea.ts`: `studioMetadataAreaPath`, `studioMetadataItemPath`,
`areaLocationRedirect`
    - `setupMetadataStudioPath` itself
- `switchedOffActionTargets.ts`: the action item path and
`switchedOffActionListPath`
- `studioNewPackage.ts` (`STUDIO_NEW_PACKAGE_PATH`) and
`PackageSwitcher.tsx` (`STUDIO_LANDING_PATH`)
    - `HomePage.tsx` and `useAddAppEntries.ts` (bare `/studio`)
- Line numbers moved from the card's (AiChatPage and
DashboardInPageEditor). Three of the card's sites already called a
helper (CommandPalette's `~org` flow, BuilderLanding's `~org` card, and
RecordTabsConfig, which now calls `studioItemPath`).
- **New exports from `@object-ui/app-shell`:** `STUDIO_ROOT_PATH`,
`STUDIO_HOME_PILLAR`, `studioLandingPath` and `studioPackagePath`.

## Why

The Studio redesign moves objects, flows and permission sets from pillar
addresses to metadata addresses (`/studio/PKG/metadata/TYPE/NAME`). The
area already redirects a pillar type back to its pillar. Redirecting the
pillar address first would loop, so every producer has to share one
builder before any designer card flips its type.

## Tests

- `studioAddress.test.ts` (new) pins each builder to literal addresses:
every family, all three spellings, verbatim segments, search and hash,
the area, the review links, and the repointed module builders. It also
checks that the table agrees with the code (`AREA_PILLAR_FOR_TYPE` is
`STUDIO_ITEM_PILLAR`, item rows, param keys, family builders, and the
params kept on the `/interfaces` redirect).
- `studioAddress.guard.test.ts` (new) is the guard. It parses every
non-test source under `ui/packages/PKG/src` and `ui/apps/APP/src` and
refuses two things:
  - a string or template literal starting with `/studio`;
  - a path composed onto `STUDIO_ROOT_PATH`.
- Only `studioAddress.ts` (and the table's placeholder shapes) are
allowed.
- It has positive controls: the walk must reach StudioDesignSurface and
the console's StudioRoute, and the matcher must fire on the builder
file.
- `packages/types/src/studio-review-links.test.ts` (new) pins the
server's two links to literals.
- `packages/types/src/studio-review-links.callers.test.ts` (new, `repo`
project) has two parts:
- It refuses a `/studio` literal in any `packages/**` `.ts` source
outside the shared module, with controls: both server producers are
walked, and the matcher fires twice on the allowed file.
- It holds every review link quoted in
`skills/objectstack-mcp-build/evals/draft-door-procedure.json` equal to
`studioChangesReviewLink` / `studioItemReviewLink` for the package, type
and name that link names. The file has 7 quoted links: 5 Changes links
and 2 item reviews, 3 distinct values. The skill file is not edited.
- Its radius is declared: `vitest.repo-tests.json`,
`CROSS_PACKAGE_TEST_INPUTS`, and the `@objectstack/types#test:repo`
turbo inputs. Ci.yml's `crosspkg:` filter already covers the skills
root.
- Existing pins of every repointed producer stay green unchanged. That
is the byte-identity proof: none of their expected literals was touched.

<details><summary>Local runs (head fa0deb8, after merging origin/main
4f9a3f8)</summary>

- `pnpm --dir ui exec vitest run` on the 171 test files that name a
repointed producer, the package list, or the builder: `Test Files 171
passed (171)`, `Tests 1777 passed (1777)`. The full app-shell + console
suite (2736 files) is CI's Test UI; it was started locally and stopped,
since at two workers it did not finish in an hour.
- `@objectstack/types`:
  - `local`, studio-review-links.test.ts: 2 passed;
  - `repo`, studio-review-links.callers.test.ts: 3 passed.
- `@objectstack/runtime` `src/domains/mcp-authoring.test.ts`: 50 passed.
- `@objectstack/cli` `--project integration
src/commands/meta/register-draft.test.ts`: 10 passed. Run locally
because it is the one test that pins the CLI's printed review link.
- `pnpm --filter @objectstack/types typecheck` and `pnpm --filter
@object-ui/app-shell type-check`: exit 0 on fa0deb8.
`@objectstack/runtime` and `@objectstack/cli` `typecheck`: exit 0 on
947b96e, the pre-merge head. `@object-ui/console` `type-check` was
NOT MEASURED: it needs every ui plugin's dist built, so it is left to
CI's Type Check UI.
- `pnpm --dir ui exec vitest run scripts/`: 172 passed, 2 skipped. `pnpm
--dir ui check:new-line-citations`: 0 new.

</details>

## Acceptance notes

- **Two type to pillar maps exist, not one.** StudioDesignSurface keeps
its own `PILLAR_FOR_SURFACE_TYPE` (identical to `STUDIO_ITEM_PILLAR`
today). The Automations and Access pillars call
`studioPillarItemPath(..., 'automations' | 'access', ...)` explicitly.
Neither is hand-built, so the guard passes. I left them alone to keep
this diff to call-site swaps that merge cleanly with objectstack-ai#36893's move-only
split. The flow and permission designer cards switch those call sites,
or fold the map into `STUDIO_ITEM_PILLAR`, in the same PR that flips the
type.
- **Unencoded scope segment.** StudioDesignSurface writes its scope
segment (the decoded route param) unencoded in three places, where every
other producer encodes it. This is kept byte for byte. It is not
reachable with today's package-id alphabet.
- **One incidental difference, outside any real address:**
`studioItemPillar` looks up the type map with `hasOwnProperty`. The old
`AREA_PILLAR_FOR_TYPE[type]` lookup matched `Object.prototype` members,
so `/studio/PKG/metadata/constructor/x` redirected to a garbage pillar
URL. It now opens the generic item page. This is pinned in
`studioAddress.test.ts`. No metadata type has such a name.
- **Overlap:** `overlap-check` exits 1 on two PRs.
- objectstack-ai#36956 (ux-E's move-only split of StudioDesignSurface, card objectstack-ai#36893):
one conflict hunk, in the import block. That PR deletes the
`draftVerdict` import lines directly above the `nav-selection` import,
and this PR deletes that import (its last user was the `requestSurface`
call site). The resolution is to keep both deletions. All four of this
PR's call sites stay in StudioDesignSurface after the split, and none is
in a moved region.
- objectstack-ai#36784, a draft based on an older main, conflicts with `origin/main`
itself at the same single hunk (the react-router import, a line this PR
does not touch): conflict count 1 with this branch and 1 with main
alone.
  - objectstack-ai#36888 and objectstack-ai#36791 merge cleanly.

## Verification

- Read first, ranked by risk:
1. the `StudioDesignSurface.tsx` hunks (four call sites, verbatim
segment);
2. `metadataArea.ts` (the area's redirect now reads
`STUDIO_ITEM_PILLAR`);
  3. `studioAddress.ts` `studioSurfaceQuery` (the three spellings).
- Two-minute check: `pnpm --dir ui exec vitest run
packages/app-shell/src/views/studio-design/studioAddress.test.ts
packages/app-shell/src/views/studio-design/studioAddress.guard.test.ts`.
Expect 2 files and all tests passing. Then add any literal beginning
with `/studio` to a ui source and watch the guard name the file and
line.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(spec untouched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes. (CI)
- [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.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/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