Repository navigation
feat(studio): Update Records offers the triggering record as its target, starts on the trigger object, and picks keys by label - #27930
Merged
Conversation
…et, starts on the trigger object, and picks keys by label Claude-Session: https://claude.ai/code/session_01Utp6CYAmDt6mjenGQb2UNR Co-authored-by: Claude <noreply@anthropic.com>
…key picker and trigger-object seed; changeset Claude-Session: https://claude.ai/code/session_01Utp6CYAmDt6mjenGQb2UNR Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe 席位核对ACCEPT · head
Generated by Claude Code |
This was referenced Oct 30, 2026
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 Bill · project thread
维护者速读
id加表达式record.id,对象也不预填,键是自由文本(Setup and Studio: suggestions from the 18.3.0 RC browser walkthrough: Setup naming and machine values, invitation and user onboarding, permission-set authoring, dialog focus, Studio first run, validation and flow builders, and publish-panel wording #27521 第 27 行建议半;缺陷半 Studio flow builder: an Update Records node with a blank value expression shows an expression-envelope error while Problems says "No problems — this flow is structurally valid" (#27521 row 27) #27799 已落地)。FlowSchema和@objectstack/lint发布判决验过;其他节点类型(新建记录、删除记录、查询记录等)不变。回滚即 revert 本 PR。ui/packages/app-shell/src/views/metadata-admin/inspectors/FlowNodeConfigField.tsx(TriggeringRecordTarget、FIELD_VALUE_MAPS)、FlowKeyValueField.tsx(keysByLabel键选择器)、previews/flow-canvas-parts.tsx(defaultNodeExtras的 update_record 种子)。pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/FlowNodeInspector.updateRecordTarget-27834.test.tsx packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.updateRecordSeed-27834.test.tsx,预期 2 个文件 13 条全部通过。Fixes #27834
Clause-②: no
Metadata-protocol: none
What changes
Measured first, on
mainate6553619. The Update Records node is drawn byFlowNodeConfigFieldfrom the offline descriptor (flow-node-config.ts,update_record: Object, Filter, Field values) or the engine'sconfigSchema. A new node is seeded bydefaultNodeExtras(previews/flow-canvas-parts.tsx), which seeded nothing forupdate_record. Field values already listed the object's fields as datalist suggestions under a free-text key (objectui#11788); Filter keys had none. The spec's own guidance for a CRUD node's target row (UpdateRecordConfigSchema,recordIdguidance) isfilter: { id: { dialect: 'cel', source: 'record.id' } }, andflow-scope.tsalready scopes the trigger record asrecordat every node the start reaches.defaultNodeExtras(type, nodes?)takes the draft the node joins; forupdate_recordon a flow whose start node is a record trigger with an object, the new node is{ config: { objectName } }.FlowCanvas.addNodeandinsertOnEdgepass their nodes. The trigger-type set is the oneresolveFlowScopereads, through a newrecordTriggerObjectNameinflow-scope.ts. Seeded at creation only: opening a node writes nothing.update_recordFilter, when the trigger record is in scope at the node (triggerScope, fromuseFlowScope) and the node's object is the trigger's: on an empty filter a button writes the id match above (writeValueEnvelope, no syntax of this surface's own) with a hint naming the object; on a filter that is exactly that match, a line says the node updates the record that started the flow. Any other filter is the author's and is left alone; the button comes back once its rows are removed. The row it writes is an ordinary filter row (id, value as a CEL expression), so the existing value-slot checks and Problems list judge it as before.FlowKeyValueFieldgainskeysByLabel: while there are key options, the key cell is the searchableInspectorComboField, which shows a field by its label (API name beside it in the list) and stores the API name; a key the catalog does not hold is still taken through its "Use …" row, and a stored unknown key shows as written. With no options (no object, or fields not read) the key stays the plain box.FIELD_VALUE_MAPSturns it on forupdate_recordfieldsandfilter(whose keys are fields of the same object).create_recordkeeps the suggested text box, as the order's "other node types unchanged" asks.i18n: three keys added to the studio namespace (
engine.inspector.flowNode.triggeringRecord.*, en and zh); no en value changed (check:i18n-drift: 0).Tests
inspectors/FlowNodeInspector.updateRecordTarget-27834.test.tsx(9 cases, the realFlowNodeInspector): one press writes the id match, the line replaces the button, a Status value picked by label completes the node, and the saved flow passes the publish verdict, computed with the realFlowSchemaplusvalidateStackExpressionsfrom@objectstack/lint(control: the same node with a blank expression is refused); an authored filter is left alone and opening writes nothing (onPatchnot called); not offered on another object, a non-record trigger, a node the start does not reach, ordelete_record/get_record; Field values and Filter keys pick by label and store the API name; a stored unknown key shows as written and a typed one is taken; control:create_recordkeeps the text box.previews/FlowCanvas.updateRecordSeed-27834.test.tsx(4 cases): the "+" on a record-triggered flow emitsupdate_recordwithconfig.objectName= the trigger object, and the node parses against the spec'sFlowNodeSchema; controls: a manual trigger seeds nothing, other node types seed what they did, a record trigger with no object seeds nothing.FlowNodeInspector.fieldValueMap-11788(its datalist case now runscreate_recordonly; the not-a-field-value-map control moves fromupdate_recordfilter todelete_recordfilter),flowValueSlots-12372(stubsuseObjectFields, since theupdate_recordfilter now reads the object's fields),flow-node-producers.label(its scan control matchesdefaultNodeExtras(typenow that the call passes the nodes).Readings
pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/ packages/app-shell/src/views/metadata-admin/previews/ packages/app-shell/src/views/studio-design/on85ec2c36: Test Files 639 passed (639), Tests 6471 passed, 1 skipped; lock VERDICT command-exit 0.pnpm --filter @object-ui/app-shell type-check: lock VERDICT command-exit 0 (bothtsc --noEmitandtsconfig.test.json).scripts/ablation-replace.mjs, one leg per behaviour, app-shell tests importsrcso there is no dist leg; each leg restored to the HEAD blob withgit diff HEADempty):pickKeysforced false: 4 failed / 13;update_recordseed returning nothing: 2 failed / 13.Acceptance notes
previews/flow-canvas-parts.tsx,FlowCanvas.tsx), outside the claim'sinspectors/**surface; the seat widened the surface to those two files before the edit.create_record's Field values could take the same label picker by addingbyLabel: trueto itsFIELD_VALUE_MAPSrow; left out because the order keeps other node types unchanged.recordis in scope at the node, the same rule the reference picker uses, so a node not yet connected below Start does not offer it until it is.Verification
Local derived gates (
dispatch-gates --commandson this diff) all exit 0;uicheck:new-line-citations0 new;check:i18n-drift0 findings;check:sdui-manifestexit 0. CI runs the rest.Generated by Claude Code