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.

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