Skip to content

fix(studio): a flow node's key / value map stacks each field over its value, so field names are readable - #27405

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

objectstack-fleet[bot] merged 2 commits 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

维护者速读

  • 改了什么:Studio 流程检查器里,键/值映射(新建记录节点的字段值、HTTP 头等)的每一行改为上下两行:字段名单独一行(旁边是删除按钮),值在下面一行(旁边是表达式切换)。
  • 为什么改:HotCRM 18.2.0 走查(hotcrm#2320 Studio S5)发现新建记录节点把字段名截成 4–5 个字符(「subj」「dueD」);300px 的检查器里一行要塞字段、值和两个按钮。
  • 风险与回滚:只改这个编辑器的行布局,存储的值不变;回滚即 revert 本 PR。
  • 先看:ui/packages/app-shell/src/views/metadata-admin/inspectors/FlowKeyValueField.tsx(行渲染的 flow-kv-key-line / flow-kv-value-line)。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/FlowKeyValueField.stackedRows-27356.test.tsx,预期 2 个用例全绿。
  • 需要你做的:无,席位落地。

What changes

Row 16 of #27356 (hotcrm#2320, Studio report finding S5): "The Create Record node cuts field names to 4–5 characters ("subj", "dueD")."

FlowKeyValueField, the key / value map editor in the flow node inspector, draws each row on two lines instead of one:

  • Key line: the key box (min-w-0 flex-1) and the remove button.
  • Value line: the value box and, where the map has one, the text / expression toggle.

Rows are spaced space-y-3 (was space-y-1.5) so one pair reads apart from the next. Nothing about what the map commits changes: the same rows, the same flush on blur, the same refusal and expression-issue lines under the value.

FlowNodeConfigField is the editor's only caller, so every key / value map in the flow inspector stacks: Create Record and Update Record field values, the Update Record filter, HTTP headers, Assignment assignments, subflow input mapping, script inputs, screen form defaults, action parameters. That is one component's layout, not a sweep; each of those maps had the same cut-off key.

Why

In the 300 px Studio inspector (STUDIO_ASIDE_WIDTH, less the inspector shell's p-4), the key box got the width left after the value box and two 32 px buttons.

Geometry reading (Chromium, Tailwind 4.3.3 compiled from the same class strings, 267 px content width)

Key box holding customer_satisfaction_score, computed font 14 px monospace (the Input primitive's md:text-sm outranks the row's text-xs at desktop width; unchanged here):

key box width characters visible
before (one line: key, value, toggle, remove) 104 px 9
after (key + remove over value + toggle) 227 px 24

One-off probe, not committed: a static page with both row shapes built from compile() of tailwindcss/dist/lib.mjs, measured with Playwright.

Tests

ui/packages/app-shell/src/views/metadata-admin/inspectors/FlowKeyValueField.stackedRows-27356.test.tsx (2 tests, through FlowNodeConfigField; jsdom draws no layout, so the pin is the row's structure):

  • Create Record field values with customer_satisfaction_score: the key's line holds no value box, exactly one input and one button (remove); the value's line is a different line, after it, and holds the expression toggle.
  • HTTP headers (a map with no toggle): the key's line holds no value box.
Ablation (one: rejoin the two lines)

node scripts/ablation-replace.mjs --delete of the anchor that closes the key line and opens the value line (anchor 1 → 0, blob 9f71951b7644 → d9d573fada30): both tests fail, expected true to be false. Restored: blob after restore = blob at HEAD = 9f71951b7644, git diff HEAD empty.

Acceptance notes

  • The key box still shows the API name (subject), as before; the datalist suggestions keep showing Label (name). Showing the label in the box would change what the box edits, which this row does not ask for.
  • A 27-character name still needs 251 px at desktop width and shows 24 characters in the 300 px aside; the box scrolls as any input does.
  • The Input primitive's md:text-sm outranks this editor's text-xs at desktop width, so the key box reads at 14 px rather than 12 px. Pre-existing and unchanged; noted only.

Verification

Code on head d30f8380 (fix + test + changeset); head 5ebc5576 adds a one-line changeset wording fix, after which the changeset families were re-run. Merge base 7e200b4a. Under the shared verification lock.

  • New file: 2 / 2 passed. Every app-shell test file that imports FlowNodeInspector, FlowNodeConfigField or FlowKeyValueField (65 files, the new one included): 971 / 971 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 row 21, all 34 exit 0; --ran: 34 run, 0 NOT-MEASURED, 0 UNRUN. Tier: no path-derived mandate; 132 changed lines.
  • The ui scripts/ family first exited 1 on quick-reference-commands-4149 ("no row for apps/site"): an ignored ui/apps/site/node_modules left in this worktree from before the site retired (docs(ui-merge): fold objectui.org into objectstack docs, K4 — retire the site, host 301s, links #27329). Deleted it and re-ran: 169 files passed, 2 skipped, exit 0. Not a tree defect.
  • Re-run on 5ebc5576: check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check:changeset-gate-self-tests, check:pm-changeset-deadline-census, check:nul-bytes, all exit 0.

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 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 5ebc5576 · 2026-10-29T05:29Z

席位意见:流程检查器里键/值映射的每一行原来把字段名、值和按钮挤在一行,300 px 宽时字段名只剩约 9 个字符("subj"、"dueD");现在每行改为上下两行:字段名和删除按钮在上,值和文本/表达式切换在下,同样宽度能显示约 24 个字符。存储内容不变。符合 #27356 第 16 行(hotcrm#2320 Studio S5)和派发单 6487063370。

  1. Shape: Part of #27356; 3 files, +117/−15: metadata-admin/inspectors/FlowKeyValueField.tsx (row layout; the remove button moves to the key line), new pin FlowKeyValueField.stackedRows-27356.test.tsx, .changeset/27356-studio-flow-map-rows-stack.md (@object-ui/app-shell + @object-ui/console patch).
  2. Premise measured: the dev's Chromium probe at the 300 px aside: key box 104 px / 9 chars before, 227 px / 24 chars after. FlowNodeConfigField is the only caller, so every flow key/value map (Create/Update Record field values, HTTP headers, Assignment) stacks; declared in the PR body, and the right reach for the row.
  3. Gates / check-runs: PR check-runs on 5ebc5576: 44 success, 11 skipped, 0 failure; mergeable_state clean. Dev's local run: new pin 2/2, the 65 app-shell files importing the inspector/editor 971/971, type-check exit 0, 34/34 derived gates exit 0. Ablation reds 2/2 and restores to the HEAD blob.
  4. Accepted deviations: none beyond the shared-component reach above. The refusal role="alert" block under a row is untouched.
  5. Out of scope: row 17 follows on this branch after merge. Skills-docs: none — presentation only.
  6. Landing: not Tier H; Clause-②: no. The seat readies and arms auto-merge.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 29, 2026 05:31
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit b10fd65 Oct 29, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-ldfxxi branch October 29, 2026 05:44
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants