Repository navigation
feat(app-shell): Studio adds an action to an installed app's object, saved in its customization package (#30088) - #30211
Merged
Conversation
…stomization package On a read-only base with a pair, the Data pillar Actions view offers New with the same presets and editor, and saves the action as a standalone action item in the pair (objectName bound), listed after the vendor actions with the customization mark, editable and removable. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzemmgi8p8uY913FXHx
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzemmgi8p8uY913FXHx
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzemmgi8p8uY913FXHx
Contributor
Author
|
domain:ui#4 · os-support-ai · session_01WGufzinedUGSXteN45poyo 维护者速读
席位意见:ACCEPT。四条验收都在一个 PR 里,范围守住;对象侧栏「仅看定制」不计入定制包操作,留作已知限制(见下)。 席位核对ACCEPT → PR #30211 @
|
This was referenced Nov 5, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Yibo Wang · project thread
Fixes #30088
维护者速读
BASE.custom)里的独立action条目(带objectName),列在厂商操作之后、带「新增」标记,可编辑、可删除,「仅看定制」会计入它。@object-ui/app-shell前端(外加两条 i18n 文案);无 spec、服务端、元数据类型改动;可写包的操作仍写在对象草稿里,行为不变。回滚即 revert 本 PR。删除已发布的新增操作是立即生效的(与删除流程一致),不经过发布。pairObjectActions.ts(读写定制包里的操作,首写走 ensure 门)和ObjectActionsPanel.tsx里pair分支(厂商行只读、新增行可编辑)。pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/DataPillar.pairActions-30088.test.tsx(5 条全绿)。Clause-②: no
Metadata-protocol: none
What changes
On a read-only base package (installed or code-shipped) that has, or can get, its paired customization package (ADR-0146 D3), the Data pillar's Actions view of a base object now offers New. Card Acceptance 1–4 all ship here (diff about 940 changed lines, under the 1,500 split line).
pairdoor from the Data pillar, passed only for a base object of a read-only base (extendsBase, the same condition the object-extension fields use). New offers the same presets (actionPresets.ts) and the same editor. A preset that needs no input is written at once; one that waits for a target is held in the panel as before and written by the first edit that gives it one. The write is a standaloneactionitem into the pair, as a draft,objectName= the object, pinnedifNoneMatch: '*'. The first write asks the ensure door (customization.ensure) and every write names its answer, never a spelled.customid. The object draft is not touched.actionsless any the pair holds (by name, and by_packageId= the pair, which the served object carries on a folded pair action: measured below). They open read-only with no Delete. The pair's actions on this object (its published list and its drafts, each draft read at the address its save writes so the version pins the save) are listed after them with the compact "added"CustomizationMark. An edit autosaves into the pair's draft through the shareduseDraftAutoSaveanduseDraftSaveGuard. Delete removes the pair's draft and then its published row, as Delete flow does. An added action keeps the name it was created with: a rename is held with a line saying how to save (same rule and reason as the hooks panel). The read's top-level_keys are never written back.RailCustomizationFilter), counting the added actions that carry a mark and narrowing the list to them.The object rail's own "only customizations" count is unchanged: it counts rows by the base's served customization read, which lists overrides and object-extension members and no standalone action. Counting a base object there for a pair action would need either a change to that read (server and spec) or a client-side computation the mark rules forbid, so the count lives on the Actions list instead. See Acceptance notes.
New i18n key
engine.studio.actions.renameHeld(en, zh).Tests
DataPillar.pairActions-30088.test.tsx, realDataPillar, real Actions view and real action editor over a metadata client double, 5 tests:change_choicewrites oneactionsave at the pair withobjectName,mode: 'draft',ifNoneMatch: '*', asks the ensure door once, and writes no object; the vendor row has no Delete and a disabled editor; the added row carries theaddedmark._packageId; Delete resets its draft and then its row at the pair.actions, with noactionsave and no ensure call.Ablations (each through scripts/ablation-replace.mjs, restored to the HEAD blob, git diff HEAD empty)
extendsBase && customizationtofalse && customizationin the Data pillar's Actions branch): 3 failed / 2 passed (walled and CONTROL stay green).canAdd = pair ? !pair.walledtopair ? true): 1 failed (walled) / 4 passed._keys back (ownBodykeeps every key): 1 failed (the edit pin) / 4 passed.Acceptance notes
Browser check on a dev boot of
examples/app-crm(pnpm dev:crm -- --fresh) with the console on Vite, onf8bdead2(before the merge ofmain).com.example.crm4.0.0 is read-only and had no pair at boot. Screenshots are in the project'sui-orders/30088-shots/folder.01-before-no-new.png).02-after-new-menu-presets.png). 修改下拉选择字段 sentPOST /packages/com.example.crm/ensure-customization(201, pair created) andPUT /meta/action/crm_lead_action_2?mode=draft&package=com.example.crm.custom(200). The row shows the 新增 mark, 仅看定制 (1), 删除, and the top bar 变更 1 (03-after-added-in-pair.png). Label 标记合格 and placement 列表 · 行 autosaved into the pair's draft (04-after-edited-saved-to-pair.png).05-after-pending-changes.png); 全部发布 sentPOST /packages/com.example.crm.custom/publish-drafts,publishedCount: 1. Back in Studio the action is listed once, marked (06-after-published-listed-once-marked.png).GET /meta/object/crm_lead/layers?package=com.example.crmserved it ineffective.actionswith_packageId: com.example.crm.custom, beside the vendor's with none.07-after-runtime-row-menu.png); it asked for 状态 (08-after-run-dialog.png), and with 合格 sentPOST /actions/crm_lead/crm_lead_action_2(200,operation: update); the row turned 合格 with "操作已成功完成" (09-after-run-result.png).DELETE /meta/action/crm_lead_action_2?package=com.example.crm.custom(200); the list shows only Convert Lead (10-after-removed-in-studio.png) and the runtime row menu no longer has it (11-after-removed-runtime-menu.png).12-after-rename-held.png); a second run confirmed the edit's PUT carries no_packageIdand that 删除 of a draft-only action sendsDELETE ...?state=draft&package=com.example.crm.custom.Observed, not changed:
crm_leadfor an added action (see What changes). If the maintainer wants the object row marked too, the base's customization read would have to list standalone pair actions on base objects: a spec and server change, out of this card (Acceptance 5).Verification
All under
scripts/pm/os-verify-lock.shunless noted. Head238e15e3(main474c030bmerged).pnpm build, thenturbo run build --filter=@object-ui/app-shell...after the merge: exit 0.@object-ui/app-shelland@object-ui/i18ntype-check(both tsconfigs each): exit 0.DataPillar,ObjectActionsPanelorpairObjectActions(79 files) plus the whole@object-ui/i18nsuite (95 files): 174 files, 1977 passed, 13 skipped. Narrowed from the 214 files importingStudioDesignSurface: this diff changes only the Data pillar's Actions branch there; CI's Test UI runs the rest.npx eslinton the 4 touched source/test files (unlocked): 0 errors; the warnings are all pre-existing ones inStudioDesignSurface.tsx.node scripts/pm/dispatch-gates.mjs --commandson head238e15e3: 35 commands, all recorded:: exit 0(includingcheck-sdui-manifest.mjs,vitest run scripts/andcheck:type-check-debt);--ran: "35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN".main: about 940 (+908 / -30, 7 files), under 3,000.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzemmgi8p8uY913FXHx