Skip to content

fix(studio): the publish review names the flow steps that changed instead of "~ nodes" - #27432

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-ldfxxi
Oct 29, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-ldfxxi

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread
Part of #27356

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:发布前的变更审阅里,流程草稿不再只写「其他变更:~ nodes」,而是逐个列出新增/修改/删除的步骤(先写步骤名,旁边是 id),修改的步骤写出改了哪个属性(如 config.fields)。
  • 为什么改:HotCRM 18.2.0 走查(hotcrm#2320 Studio S6)发现发布对话框只说「Also changed: ~ nodes」,看不出改了哪一步。
  • 风险与回滚:只在类型为 flow 且两侧步骤都有 id 时逐步对比;仅调整顺序或步骤无 id 时仍显示 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 its id and label. So the names are on the client; no server door is needed. computeChangeDetail compared every top-level key other than fields whole, and a flow keeps all its steps in nodes, 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 passes entry.type). For a flow, diffFlowNodes matches the two nodes lists by id and returns nodes: { added, changed, removed } on EntryChangeDetail. Each row is { id, label? }; a changed node lists the properties that differ, config one level down (config.fields), since nearly every inspector edit lands there. Rows sort by id, as field rows sort by name.
  • When that yields at least one node row, nodes leaves the "Also changed:" key list. edges and every other key stay there.
  • The drill-in renders the node rows after the field rows in FieldRow's own shape: mark, label, the id in monospace beside it, and · config.fields for a changed node. FieldRow takes a testId (default draft-field-row, unchanged); node rows are draft-node-row.
  • isEmptyChangeDetail counts node rows.

Guards, each pinned:

  • A reorder alone changes no node, so nodes stays a key row and the draft never reads "No differences detected".
  • A nodes list that is not keyed by a unique string id keeps the old whole-key comparison (nodes: null).
  • Any type other than flow is 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):

  • computeChangeDetail on a flow: the added node (no label, id only), the changed node with config.fields, the removed node by label; nodes is not a key row and edges is.
  • A changed top-level node property (label) is named as itself.
  • A NEW flow adds every node.
  • CONTROL: a reorder alone keeps nodes as a key row.
  • CONTROL: a list not keyed by id gives nodes: null and keeps the key row.
  • CONTROL: the same bodies typed page compare nodes whole.
  • The panel: expanding a flow draft shows + 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') {" on DraftChangesPanel.tsx (anchor 1 → 0, blob 0583bc280d81 → 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 HEAD empty.

Acceptance notes

  • A changed node lists property paths (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.
  • Node rows sort by id, not by canvas position: the drill-in has no layout order to read, and field rows sort by name the same way.
  • edges still 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.
  • computeChangeDetail stays one function for every type; the flow branch is opt-in by type, so no caller that passes two arguments changes.

Verification

All on head 751c7d1b (merge base b10fd655), after pnpm install --frozen-lockfile and a fresh @object-ui/app-shell^... closure build, under the shared verification lock.

  • New file: 7 / 7 passed. Every test file under ui/ that names DraftChangesPanel (72 files, the new one included): 436 / 436 passed.
  • pnpm --filter @object-ui/app-shell run type-check (both tsc programs): 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 (the ui 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

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 29, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · os-warren · session_01JQwxbZeBv2y91towxasSUT

席位核对

ACCEPT · seat domain:ui#1 · head 751c7d1b · 2026-10-29T06:46Z

席位意见:发布前的变更审阅里,流程草稿原来只写「其他变更:~ nodes」,看不出改了哪一步;现在按步骤 id 对比,逐个列出新增、修改、删除的步骤(步骤名在前,id 在旁),修改的步骤写出改了哪个属性(如 config.fields)。只调整顺序或步骤没有 id 时仍保留 nodes 行,不会把有变化的草稿说成「无变化」;其他类型不变。符合 #27356 第 17 行(hotcrm#2320 Studio S6)和派发单 6487063370。

  1. Shape: Part of #27356; 3 files, +283/−7: preview/DraftChangesPanel.tsx (diffFlowNodes, computeChangeDetail(published, draft, type?), node rows in the drill-in via FieldRow's new testId), new pin DraftChangesPanel.flowNodeRows-27356.test.tsx, .changeset/27356-studio-publish-flow-node-rows.md (@object-ui/app-shell + @object-ui/console patch).
  2. Premise measured: the drill-in already reads both bodies and flow nodes carry id + label, so no server door is needed. The new type argument is optional and the drill-in is its only caller that passes it; the existing computeChangeDetail pins (13125) call it without and keep their behaviour. app-shell is private, so the widened EntryChangeDetail is not a published surface.
  3. Gates / check-runs: PR check-runs on 751c7d1b: 44 success, 11 skipped, 0 failure. Dev's run (report 6489789907): new pin 7/7, the 72 ui files naming DraftChangesPanel 436/436, ablation 5 red / 2 controls green and restored to the HEAD blob, type-check 0, 34/34 derived gates 0.
  4. Accepted deviations: none. Seat note: when a draft both reorders and edits steps, the node rows name the edits and the reorder itself is not called out; an acceptable reading of the row ("name the node and property").
  5. Out of scope: edges still reads as a key row. With this row, seat 1's Studio rows of Setup and Studio: suggestions from a full HotCRM browser pass on 18.2.0: user onboarding, packaged automation state, run-now for scheduled flows, admin lists, and Studio entry, field table, flow inspector wording and one designer per item #27356 (21, 16, 17) are all landed; the Setup rows stay with seat 2. Skills-docs: none — presentation only.
  6. Landing: not Tier H; Clause-②: no. The seat readies and arms auto-merge.

Generated by Claude Code

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/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants