Repository navigation
fix(studio): the publish review names the flow steps that changed instead of "~ nodes" - #27432
Merged
Merged
Conversation
Claude-Session: https://claude.ai/code/session_01JQwxbWuU6sVfBYiy4dY4PA Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#1 · os-warren · session_01JQwxbZeBv2y91towxasSUT 席位核对ACCEPT · seat 席位意见:发布前的变更审阅里,流程草稿原来只写「其他变更:~ nodes」,看不出改了哪一步;现在按步骤 id 对比,逐个列出新增、修改、删除的步骤(步骤名在前,id 在旁),修改的步骤写出改了哪个属性(如
Generated by Claude Code |
This was referenced Oct 29, 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 Warren · project thread
Part of #27356
Clause-②: no
Metadata-protocol: none
维护者速读
config.fields)。nodes行,不会把有变化的草稿说成「无变化」;回滚即 revert 本 PR。ui/packages/app-shell/src/preview/DraftChangesPanel.tsx(diffFlowNodes、computeChangeDetail的type参数、EntryDetail的节点行)。pnpm --dir ui exec vitest run packages/app-shell/src/preview/__tests__/DraftChangesPanel.flowNodeRows-27356.test.tsx,预期 7 个用例全绿。What changes
Row 17 of #27356 (hotcrm#2320, Studio report finding S6): "The publish dialog says "Also changed: ~ nodes"."
Premise measured first, as the order asked: the drill-in (
EntryDetail) already reads BOTH full bodies, the published item and the draft, and every flow node carries itsidandlabel. So the names are on the client; no server door is needed.computeChangeDetailcompared every top-level key other thanfieldswhole, and a flow keeps all its steps innodes, so any step edit read~ nodes.In
ui/packages/app-shell/src/preview/DraftChangesPanel.tsx:computeChangeDetail(published, draft, type?)takes the entry's type (the drill-in passesentry.type). For aflow,diffFlowNodesmatches the twonodeslists byidand returnsnodes: { added, changed, removed }onEntryChangeDetail. Each row is{ id, label? }; a changed node lists the properties that differ,configone level down (config.fields), since nearly every inspector edit lands there. Rows sort by id, as field rows sort by name.nodesleaves the "Also changed:" key list.edgesand every other key stay there.FieldRow's own shape: mark, label, the id in monospace beside it, and· config.fieldsfor a changed node.FieldRowtakes atestId(defaultdraft-field-row, unchanged); node rows aredraft-node-row.isEmptyChangeDetailcounts node rows.Guards, each pinned:
nodesstays a key row and the draft never reads "No differences detected".nodeslist that is not keyed by a unique stringidkeeps the old whole-key comparison (nodes: null).flowis compared exactly as before.Why
"~ nodes" tells the author that something in the flow changed, which they knew. The summary is the last look before publishing, and it should say which step and what about it, the way the same panel already names an object's fields.
Tests
ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.flowNodeRows-27356.test.tsx(7 tests):computeChangeDetailon a flow: the added node (no label, id only), the changed node withconfig.fields, the removed node by label;nodesis not a key row andedgesis.label) is named as itself.nodesas a key row.idgivesnodes: nulland keeps the key row.pagecomparenodeswhole.+ wait_a_day,~ Create follow-up task create_task · config.fields,− Notify owner notify_owner, the id in monospace, no "~ nodes", and "Also changed:" with~ edges.Ablation (one: the flow branch never taken)
node scripts/ablation-replace.mjs --anchor " if (type === 'flow') {" --replacement " if (type === 'not-a-flow') {"onDraftChangesPanel.tsx(anchor 1 → 0, blob0583bc280d81→9f20adc71adb): 5 failed / 2 passed. The two that stay green are the not-keyed and not-a-flow controls, which assert the old behaviour. Restored: blob after restore = blob at HEAD =0583bc280d81,git diff HEADempty.Acceptance notes
config.fields), not the field names inside the map (subject,due_date). One level down covers the inspector's edits without restating each node type's config shape here.edgesstill reads~ edges. Edge ids are machine ids with no label, so per-edge rows would not read better; the node rows already say which steps were added or removed.computeChangeDetailstays one function for every type; the flow branch is opt-in bytype, so no caller that passes two arguments changes.Verification
All on head
751c7d1b(merge baseb10fd655), afterpnpm install --frozen-lockfileand a fresh@object-ui/app-shell^...closure build, under the shared verification lock.ui/that namesDraftChangesPanel(72 files, the new one included): 436 / 436 passed.pnpm --filter @object-ui/app-shell run type-check(bothtscprograms): exit 0.pnpm --dir ui run check:new-line-citations: 0 new citations, exit 0.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: the same 34 families as rows 21 and 16, all 34 exit 0 (theui scripts/family: 169 files passed, 2 skipped);--ran: 34 run, 0 NOT-MEASURED, 0 UNRUN. Tier: no path-derived mandate; 290 changed lines.Repo-wide lint, the full ui test battery and the e2e jobs are CI's.
Generated by Claude Code