Repository navigation
feat(console): configure tabs on installed objects, into the paired .custom package (#36499, PR 2 of 2) - #36624
Conversation
…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>
Claude-Session: https://claude.ai/code/session_01ADHkmP8GZoB2rUETxwNEDv Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmP8GZoB2rUETxwNEDv Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmP8GZoB2rUETxwNEDv Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-steve · session_01ADHkmP8GZoB2rUETxwNEDv Contract-review-claim: session_01ADHkmP8GZoB2rUETxwNEDv · head 28193db · 2026-11-23T05:52Z |
|
repo:objectstack#2 · os-steve · session_01ADHkmP8GZoB2rUETxwNEDv Contract reviewServed-tier: ① Derived judgmentsOwed by the ② Semver levelpatch for ③ Boundary flagsThe 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: VERDICT: PASS |
|
repo:objectstack#2 · os-steve · session_01ADHkmP8GZoB2rUETxwNEDv 席位核对ACCEPT · PR #36624 @
|
|
repo:objectstack#2 · os-steve · session_01ADHkmNmMEXS4EzeVz9RjvD 席位核对ACCEPT — landing on the card thread's L1 ACCEPT 7092834322 and TIER_DEFAULT record PASS 7092828542, both at this head.
Landing: area lands it: ready + auto-merge. |
Requested by Steve · project thread
Fixes #36499
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
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
viewhere) plususeCustomizeDoorWalled(): 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..customlist 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.relatedListsof the pair's object extension (object_extension, filed under the object's name, in the base's paired.custompackage), 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.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).fields,fieldPatches,place, the other arrangement key.ifNoneMatch: '*'), then publishes. A refused publish discards that draft.The field-layout editor in #36505 is meant to be its second caller (
fieldGroups). #36505 is not implemented here.resolveRecordTabsSaveTargetnow answers{ kind: 'package' } | { kind: 'pair' }.The 「…」 entry is the first item (card item 1).
page:header(containers.tsx): a host overflow entry that declaresleadsMenu: trueis 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
relatedListslabels 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 bygen-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:ensureCustomizationandclient.get;pairNotWritable;ui/packages/components/src/__tests__/page-header-overflow-close-36499.test.tsx:renderHeadertakesheaderSystemActions;leadsMenu.Ablations. The fix was committed first. Each mutation was written with
ablation-replace.mjs, and each restore was proven by blob == HEAD.leadsMenuflag: 1 test red.recordTabLabelToWritereturning the served label: 2 tests red.Test and gate runs at head c7f9b58 (all through os-verify-lock)
packages/app-shell/src/views/RecordDetailView.*: 99 files, 826/826 passed.page-header*,layout-containers*,horizontal-overflow*,page-tabs*, plus plugin-detailRecordPageColumns*andRecordRelatedListRenderer*: 64 files, 598/598 passed.src/__tests__: 106 files, 1978 passed and 13 skipped.ui/scripts/(a derived family): 174 files, 5127 passed and 2 skipped.type-check(bothtsconfig.jsonandtsconfig.test.json) for app-shell, components and i18n: exit 0.dispatch-gates --commands: 41 derived families, all run, all exit 0.--ranreconciles them as 41 run, 0 NOT-MEASURED.uilint-workflow checks, includingcheck:spec-symbols,check:i18n-keys,check:i18n-driftandcheck:metadata-write-doors: exit 0.check:doc-examples,check:doc-snippetsandcheck:readme-exportsfirst answered PRECONDITION NOT MET because@object-ui/cliwas not built. After building it, all three gave exit 0.check:new-line-citations: exit 0.check:test-source-aliasandcheck:nul-bytes(both derived): exit 0.no-synthetic-event-triggerratchet, 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-276298 files 49/49;ui/scripts/5127 passed and 2 skipped; app-shell and componentstype-checkexit 0; 41 derived families exit 0, with--ranreporting 0 NOT-MEASURED;check:i18n-keys,check:i18n-drift,check:spec-symbols,check:new-line-citationsand the threecheck:vi-mock-*checks exit 0. The large neighbour suites (RecordDetailView.*, i18n, page-header) were not re-run locally after this merge; CI runs them.Acceptance notes
The customizations read does not list an arrangement: moved to Package customizations read does not list a tab arrangement: an extension's relatedLists (and fieldGroups) arrangement has no entry in GetPackageCustomizationsResponseSchema #36626 (seat routing, 2026-11-23 04:26Z). After the save,
GET /api/v1/packages/com.example.showcase/customizationsanswered200with every list empty. The extension itself is there:GET /api/v1/meta/object_extension/showcase_account?package=com.example.showcase.customanswers it. The read's contract is strict and names exactly three member kinds,extensions.kind=field|validation|index, so arelatedLists-only extension (and afieldGroups-only one, for Studio 对象页「表单」页签改成「字段布局」:只编辑对象的字段分组,不再读写表单视图;安装来的对象存到 .custom 的排布里 #36505) has no entry to appear as. Making it appear is a spec and runtime change, carried by Package customizations read does not list a tab arrangement: an extension's relatedLists (and fieldGroups) arrangement has no entry in GetPackageCustomizationsResponseSchema #36626, not by this PR.H2 (a per-tab source on
_relatedListsArrangement) does not hold; the narrow gap below is an accepted deviation (seat routing, 2026-11-23 04:26Z; no card). The decoration carries{ packageId, hidden, unlisted }and nothing per tab. The source marks are derived from data the client already has:_packageId: the base means the original package;sys_metadataor a.custompackage means this environment; anything else means that package;__cmeans this environment.The remaining gap: a relationship field that another package's extension adds to a base-owned child object shows as 「Original package」. Closing it needs a per-tab source from the server. No spec or server change is made here.
Built-in tabs stay locked here: hiding them goes to decision card [Decision] Record tabs: should an admin be able to hide the built-in Attachments, Approvals and Activity tabs? #36627 (seat routing, 2026-11-23 04:26Z). On installed objects 附件 / 审批 / 动态 can be moved but not hidden: the spec says the
.customlist cannot hide them ("cannot be hidden here"). They are not renamable either, on either path: a built-in entry is a bare name in the spec's shape and carries no label, so there is no place to store a rename. Seat ruling 7089839334 (no spec card for hiding 审批/动态 on self-built objects) is unchanged.Translated labels. PR 1 combined with feat(spec): a record-page tab title a relatedLists entry declares is translatable (objects.OBJECT._relatedLists.LIST.label) #36574 would have written a reader's translated tab title into the stored definition on any save. Fixed on both paths; see What changes.
Visible effect beyond the card. 「Configure tabs」 now sits above Refresh in every record 「…」 where it is offered, including on self-built objects (PR 1 placed it after Refresh). No other menu entry moves.
Observation, not filed. For an installed object, the layered read's
codelayer (GET /meta/object/showcase_account/layers?package=com.example.showcase) answered the extension-foldedrelatedLists, while the showcase source declares none. The writer reads entries in the order extension first, then owner, so this does not change what is written. I note it because a reader ofcodewould take the result for the package's own definition.CI patch round 1 (head 28193db). At c7f9b58,
Test UI (13/16)went red on one test that this change does not touch:DataPillar.panelHold-27629› "Show me" reopens the action…, a 3000 mswaitForon the held line. That test was last changed by feat(studio): the object page saves with Cancel and Save in the top bar, live at once #36597 on main. No file in its import graph is in this diff, and the dom project runsisolate: true, so no other file's mocks reach it. Under os-verify-lock it passed alone (5/5) and with all 41DataPillar.*files on 4 workers (209/209). The merge group's CI for feat(studio): the object page saves with Cancel and Save in the top bar, live at once #36597 and the later runs on main are green. I read it as a timing flake in a loaded shard (that file took 10 s there), not a defect of this change, so no code or test was changed for it. The new head is a merge of main (3110de5), which re-runs CI.H1 holds. The extension is written as
object_extensionin the pair, and onlyrelatedListsis replaced (unit:objectExtensionArrangementSave-36499keepsfields,fieldPatches,placeandfieldGroups). Live: the second save in the browser pass read back the first save's extension and replaced only its list.Verification
Browser pass at head
0aacc5aad, with the same code as this head; the merge of main brought in no file this change reads.examples/app-showcase(objectstack dev --ui --seed-admin, own port and DB). The console was rebuilt from this branch.com.example.showcase(type app,writable: false).showcase_account, record Northwind.com.example.showcase.custompackage existed, and the customizations read was empty.com.qa.tabswith an objectqtab_visitthat looks upshowcase_account. It exists only in the run's DB.Admin, 1440: reorder, hide, save, reload
Configure tabs, Refresh, Share, Change Owner, Delete.showcase_contact[Original package]showcase_field_zoo.f_lookup[Original package]showcase_field_zoo.f_lookups[Original package]qtab_visit[From Tabs QA]POST /api/v1/packages/com.example.showcase/ensure-customizationPUT /api/v1/meta/object_extension/showcase_account?mode=draft&package=com.example.showcase.customPOST /api/v1/meta/object_extension/showcase_account/publish?package=com.example.showcase.customcom.example.showcase.Details, Visits, Contacts, Field Zoo, Activity.{"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}]}._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.showcaseanswersoverlay: null,draft: null,provenance: package,editable: false.GET /meta/object_extension?package=com.example.showcaseanswersitems: [].git status examples/is clean.Another account (plain member), 1440 and 1280
Refresh, Share: no entry.relatedListsand the same_relatedListsArrangement.Details, Field Zoo, Activity. The multi-lookup tab is hidden. Visits and Contacts are not drawn because the member has no read onqtab_visitandshowcase_contact(403 PERMISSION_DENIEDon the data read), as before this change.Admin, 1280: second save over the existing extension
Details, Visits, Contacts, Field Zoo · Lookup → Account, Field Zoo · Lookup → Accounts (multiple), Activity.Self-built path (PR 1), admin, 1280
qtab_account(packagecom.qa.tabs, writable), 「…」 readConfigure tabs, Refresh, ….PUT /meta/object/qtab_account?mode=draft&package=com.qa.tabs, thenPOST …/publish?package=com.qa.tabs.People, Deals, Tickets, Attachments, Activity.The 「This environment」 mark is covered by
RecordTabsConfigInstalled-36499andrecordTabsInstalled-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 object02-admin-1440-installed-edit-state.png: the edit state with source marks03-admin-1440-installed-moved-hidden.png: Visits moved first, multi-lookup tab in 「Hidden」04-admin-1440-installed-after-reload.png: after save and reload05-member-1440-installed-menu-no-entry.png,05-member-1280-installed-menu-no-entry.png: the member's 「…」 and tabs06-admin-1280-menu-first-item.png: the entry first at 128007-admin-1280-installed-reopened.png: reopened on the saved arrangement08-admin-1280-installed-moved-restored.png: 动态 moved, hidden tab shown again09-admin-1280-installed-after-reload.png: after the second save and reload10-admin-1280-selfbuilt-edit.png,11-admin-1280-selfbuilt-after-reload.png: the self-built pathFiles to read first, by risk:
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.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).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, runobjectstack 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.customanswers the newrelatedLists.Generated by Claude Code