Skip to content

fix(spec): render action body editor as composite (language + source), not [object Object]#1855

Merged
xuyushun441-sys merged 2 commits into
mainfrom
studio-action-body-fix
Jun 15, 2026
Merged

fix(spec): render action body editor as composite (language + source), not [object Object]#1855
xuyushun441-sys merged 2 commits into
mainfrom
studio-action-body-fix

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Found during a browser sweep of the Studio metadata designers.

A script action's inspector showed the 正文 (body) field as a JavaScript code editor containing literally [object Object]. The action body is a discriminated union (HookBodySchema: { language, source, capabilities?, timeoutMs? }) — the exact shape hooks use — but action.form.ts flattened it to { field: 'body', widget: 'code' }, so the inspector fed the union object to a single string editor.

This mirrors the already-shipped, working hook.form.ts layout: a type: 'composite' with a language select, a source code editor (javascript), and the L2-only capabilities / timeoutMs knobs. visibleOn: "data.type == 'script'" is preserved.

Verification

The action body data itself is fine — the design-canvas preview already renders the script correctly; only the inspector widget mapping was wrong. The fix is structurally identical to the hook body layout the SchemaForm already renders correctly. Live HotCRM verification was intentionally skipped to avoid rebuilding @objectstack/spec and restarting the shared dev backend that other agents depend on; CI type-check + the equivalence to hook.form.ts cover it.

🤖 Generated with Claude Code

An action's `body` is a discriminated union (HookBodySchema: `{ language,
source, capabilities?, timeoutMs? }`), the same shape hooks use. The action
form layout mapped the whole field to `{ widget: 'code' }`, so the inspector
fed the union object to a single JS editor and rendered "[object Object]".

Mirror the working hook.form.ts layout: a composite with a `language`
select, a `source` code editor, and the L2-only capability/timeout knobs.
`visibleOn: data.type == 'script'` is preserved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 14, 2026 11:46pm

Request Review

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling labels Jun 14, 2026
@xuyushun441-sys
xuyushun441-sys merged commit ee72aae into main Jun 15, 2026
13 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the studio-action-body-fix branch June 15, 2026 02:23
xuyushun441-sys added a commit that referenced this pull request Jun 21, 2026
…or (9.x → 10.0.0) (#2116)

* chore: bump objectui to 70a56e15152c

fix(registry): silence bare-name collision warnings; keep display owners (#1855)

objectui@70a56e15152c6e9ff602a9ff3675900e410531d7

* chore(release): make the sys_department system-object rename a breaking major (10.0.0)

ADR-0057 D2 renames the shipped system object `sys_department` → `sys_business_unit`
(object + `sys_department_member` → `sys_business_unit_member`, fields, i18n) with no
compatibility alias. A renamed shipped system object is a breaking change to the
platform's public data surface, so `@objectstack/platform-objects` and
`@objectstack/plugin-sharing` move from `minor` to `major` — taking the 73-package
fixed group from 9.11.0 to 10.0.0 on the next `changeset version`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
xuyushun441-sys pushed a commit that referenced this pull request Jun 21, 2026
fix(registry): silence bare-name collision warnings; keep display owners (#1855)

objectui@70a56e15152c6e9ff602a9ff3675900e410531d7
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 protocol:ui size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants