Skip to content

fix(studio): the action designer draws refusals and texts from their served rows - #36688

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-35650-action-designer-refusals-texts
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-35650-action-designer-refusals-texts

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #35650

Clause-②: no
Metadata-protocol: none

维护者速读

  • 在 Studio 里编辑脚本类操作时,整页编辑器和对象的"操作"视图把"拒绝目录"和"文本"两项从一大块原始 JSON 改成按条目编辑的表单,并带上说明文字;关联抽屉原本就是这样。
  • 属于 Studio 操作设计器的补完:上一轮已经让服务端表单给这两项声明了逐条编辑的样式,这次让作者平时用的编辑器真正用上它。
  • 出错时作者在这两项上会看到原来的 JSON 编辑框或少了说明文字,已存的操作内容和服务端校验都不受影响,可以直接撤回。
  • 无

What changes

  • ActionDefaultInspector (the action designer, mounted by the full-page editor and by the Studio object's Actions view) reads a new optional serverForm prop on MetadataDefaultInspectorProps and draws the refusals and texts rows from their served rows: a one-section SchemaForm over the served schema, with the row descriptors taken from the served action form (servedFormRows), placed in the Behavior section beside the script body. The rows bring the key-only record control, their entry rows and help text, and their own visibleWhen (script actions only). Both keys are then hidden from "More fields"; with no served form (or a form without the row) they stay in "More fields" exactly as before.
  • Hosts pass the served form: ResourceEditPage (designer branch, entry?.form) and StudioDesignSurface (a typeForms index beside typeSchemas, handed to ObjectActionsPanel as actionForm, then to the inspector as serverForm).
  • The inspector now mounts two whole-draft forms, so their inline-issue rows go through the existing useIssuePrefixRegister union instead of one form writing the host's callback directly.
  • zh-CN overlay (metadata-form-zh-cn.ts): action gains refusals, refusals.message, refusals.status, refusals.reasons, refusals.reasons.message, refusals.params, texts, texts.message, texts.params; hook gains texts, texts.message, texts.params. Labels copied from the platform bundle zh-CN.metadata-forms.generated.ts (labels only, as the overlay's header prescribes for these types).
  • No schema or served-form change: packages/spec is untouched; the rows on actionForm are read as served.

Landing point: ui/packages/app-shell/src/views/metadata-admin/** and the Studio mount in ui/packages/app-shell/src/views/studio-design/**. ResourceEditPage.tsx gains one prop line.

Read first (by risk):

  1. inspectors/ActionDefaultInspector.tsx — the servedRowsForm block and the hidden-fields change on the fallback form; the two useWholeDraftFormIssueRows setters.
  2. inspectors/servedFormRows.ts — the row lookup (string rows, { group } sections skipped).
  3. studio-design/StudioDesignSurface.tsx — typeForms and the actionForm hand-off.

Tests

  • ResourceEditPage.actionServedRows-35650.test.tsx (full-page editor, real page with production registrations, type row built from actionForm + ActionSchema the way the server builds it): no textarea holds either record as JSON; the served help text of both rows is drawn; the key-only control draws SIGN_IN_REQUIRED and email_subject under their keys; an entry edited through the served row saves, and the saved action passes ActionSchema.safeParse.
  • DataPillar.actionServedRows-35650.test.tsx (Studio design surface: the real Data pillar, Actions tab, with the action type row served through useMetadataTypes): the same face assertions.
Ablation (one, on the inspector)

Fix committed first; ActionDefaultInspector.tsx restored to origin/main (9348f02) in the tree only, both pin files run, then git checkout HEAD -- PATH, proven by blob hash (16b68477 before and after) and an empty git diff HEAD.

  • Mutated: 3 of 3 tests red. Both hosts: expected [ textarea …, …(1) ] to deeply equal [] — the two raw JSON editors holding refusals and texts, which is the card's premise measured on both hosts. The round-trip test: no action-served-rows mount.
  • Restored: 3 of 3 green.
Create page (premise falsified)

The card lists the create page among the hosts. Measured on this branch with a throwaway render (not committed): the action create page renders the flat createSchema form, whose rows are Label*, Name*, Object, Icon; it mounts no inspector, draws no refusals/texts row in any face, and holds no textarea. A new action is named there and authored afterwards in the full-page editor, which this PR fixes. No pin is possible that fails on main, so none is added.

Acceptance notes

  • The Studio object's Hooks view (ObjectHooksPanel mounting HookDefaultInspector) draws the hook's refusals and texts as raw JSON too: measured on this branch with a throwaway render of the real panel, two textareas holding { "CONTRACT_LOCKED": … } and { "follow_up_subject": … }. The card's "hooks are not affected" holds for the hook's full-page editor only. Same defect class; this PR's serverForm prop and servedFormRows make it a two-file follow-up (the hook inspector reads serverForm, the panel is handed hookForm). Reported to the seat, not fixed here.
  • StudioBundleItemEditor also mounts registered default inspectors, but no action reaches it (AREA_FORM_EDITOR_TYPES is email_template, translation; dataset for customize), so it is left unchanged.

Verification

Two-minute check (from the repository root, after building the closure): pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/ResourceEditPage.actionServedRows-35650.test.tsx packages/app-shell/src/views/studio-design/DataPillar.actionServedRows-35650.test.tsx — expect Tests 3 passed (3).

Local readings at dd2958b
  • Closure build pnpm turbo run build --filter='@object-ui/app-shell^...' --concurrency=2: lock VERDICT command-exit 0, 68/68 tasks.
  • New pins: Test Files 2 passed, Tests 3 passed (lock VERDICT command-exit 0).
  • Related suites (the 7 ActionDefaultInspector.* tests, ActionDesigner.paramVocabulary, ResourceEditPage.defaultInspectorIssues-35628, the ObjectActionsPanel.* tests, the DataPillar.action* tests): Test Files 20 passed, Tests 135 passed.
  • pnpm --filter @object-ui/app-shell type-check (both tsc --noEmit and tsconfig.test.json, whose include reaches the new test files): VERDICT command-exit 0.
  • eslint over the 9 changed ui files: 0 errors (warnings only in ResourceEditPage.tsx / StudioDesignSurface.tsx, none on changed lines).
  • node scripts/pm/dispatch-gates.mjs --commands derived 39 families; 37 exit 0 in the first pass on this head, and the other two exit 0 on re-run: check:type-check-debt (first exit 3 inside its own closure-build lock wait, then exit 0) and the ui scripts suite below. pnpm --dir ui exec vitest run scripts/: the first run was killed by the box's memory limit (SIGKILL, no verdict); re-run with --maxWorkers=2: Test Files 172 passed, 2 skipped; Tests 5127 passed, 2 skipped (lock VERDICT command-exit 0).
  • --ran reconciliation: 39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN.
  • node scripts/pm/overlap-check.mjs: merges cleanly with origin/main, 0 open PR heads share a file.
  • Full app-shell pnpm test (2444 test files) and every other CI family: declared to CI (Test UI, Type Check UI, Lint UI).

Generated by Claude Code

…served rows

The full-page editor, the Studio Actions view and the bundle item editor
hand ActionDefaultInspector the served form; the inspector draws the
refusals and texts rows from it (key-only record control, help text)
instead of the raw JSON editor. zh-CN overlay gains the action refusals and
texts leaves and the hook texts leaves.

Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ
Co-authored-by: Claude <noreply@anthropic.com>
@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 Nov 23, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ

Final green head for L1 review: dd2958b30da3fde02d48bcaa671b41dee2a641a7 (read 2026-11-23T14:12Z: 39 check-runs success, 13 skipped, 0 failing or in progress; mergeable_state: clean). Area o7-studio sends this head to L1 thread L1-b. Size 486+/2- across 10 files (code), so the area does not self-review.

Out-of-scope finding from the dev report (class a, not fixed here): the Studio object Hooks view (ObjectHooksPanel → HookDefaultInspector) still draws the hook refusals / texts rows as raw JSON; the seat files it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As88pUDUZHGdwFmizG4

维护者速读

  • 动作的整页编辑器和 Studio 对象「操作」页里,脚本动作的「拒绝目录」和「文本」不再显示成原始 JSON,改为按服务端表单的键值行加帮助文字来编辑。
  • 属于 Studio 动作设计器这条线,补上服务端已声明、但设计器没读的两行。
  • 出错的话只影响这两行的显示,存储与服务端校验都不变;可直接撤回。
  • 无需你操作;钩子页同类问题待立后续卡(见第 5 项)。

席位核对

Verdict: ACCEPT at head dd2958b30da3fde02d48bcaa671b41dee2a641a7 (read 2026-11-23T14:16Z).

  1. Shape. Open, draft, base main, first line Fixes #35650. Fixes is right: the card's implementable hosts are both wired (full-page editor via ResourceEditPage designer branch, Studio object Actions view via DataPillar → ObjectActionsPanel), each with a pin, plus the zh-CN overlay leaves; the create-page host is a falsified premise (item 2), so nothing implementable is left. No closing keyword binds another card. mergeable_state: clean.
  2. Premise measured. Create page: re-read on the head. PreviewComponent is undefined in create mode unless the type is in CREATE_MODE_CANVAS_TYPES (object, report, dataset, doc), so an action's create page never takes the designer branch and renders the flat createSchema form (anchors.ts, Label/Name/Object/Icon). The dev's correction of the card stands and is stated in the PR body. StudioBundleItemEditor mounts only email templates, translations and datasets (StudioMetadataArea.tsx header), never an action: right to leave unchanged. zh-CN leaves match the platform bundle zh-CN.metadata-forms.generated.ts label for label (action refusals*/texts*, hook texts*).
  3. Gates at this head (check-runs). 39 success · 13 expected skip · 0 unexpected skip · 0 failed · 0 pending; Lint & Repo Gates and TypeScript Type Check both success (l1-face.mjs --pr 36688, clean on all 13 items). The full app-shell suite the dev did not run locally is answered by CI at this head.
  4. Accepted deviations. Tests: both pins build the page from the real served actionForm and ActionSchema (@objectstack/spec/ui), not a hand fake; positive control present (ablation of ActionDefaultInspector.tsx to main turns 3/3 red with the raw-JSON textareas, restored to blob 16b68477). The round-trip pin parses the saved body with ActionSchema.safeParse. The issue-row wiring moves the fallback form from the host's setter to useIssuePrefixRegister (the existing Studio designers: a refused save marks no field row in a type's registered default inspector (view, object, ...), because ResourceEditPage passes it no issues (follow-up of #35499) #35628 register) so the two forms report a union; on main only the fallback form reported, so the host hears a superset, never less. Changeset read sentence by sentence against the diff: every sentence true. It names the private @object-ui/app-shell, as other changesets on main do; Check Changeset is green.
  5. Out of scope. (a) Acceptance note: the Studio object's Hooks view (ObjectHooksPanel → HookDefaultInspector) shows hook refusals/texts as raw JSON. Same defect class, not fixed here — owed ONE follow-up card by the area through the filing gate (no open card found at read time). (b) Seat observation, read on the tree, not run, for the same card: a global action opened from an app's nav leaf (navSurface.ts case 'action') mounts ActionDefaultInspector on the Studio canvas rail (StudioDesignSurface.tsx, the no-selection DefaultInspector branch) with neither serverSchema nor serverForm, so that host draws no "More fields" and neither row in any face. Pre-existing, not touched by this diff, not the host the card described. Skills-docs: not owed (Metadata-protocol: none, no narrowing arm).
  6. Landing. No contract face: no packages/spec/src/**, no governed path, no Clause-②: yes, no narrowing, so no L2 is owed; this record is the review of record at TIER_DEFAULT. No content/docs/releases/ path. SQL push-down: not applicable (UI wiring only). Land on this head; any head move needs a fresh read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As88pUDUZHGdwFmizG4

席位核对 — delta read

Delta read at head b68a7f0c9ccee96441aaccbb29ec278b089dbc4e (read 2026-11-23T14:42Z): the move from dd2958b30da3fde02d48bcaa671b41dee2a641a7 is one merge of origin/main (parents dd2958b3 and e343ab7c). Seat reading: git diff MERGE_BASE HEAD | git patch-id --stable is 26ac2f600aedf3b076b9cea62fa1a9a9e8edaead at both heads, and no commit main brought in touches ActionDefaultInspector.tsx or ObjectActionsPanel.tsx. The PR's own change is the one reviewed; the ACCEPT in comment 7103758326 stands at this head. Checks at b68a7f0c: 39 success · 13 expected skip · 0 failed · 0 pending; Lint & Repo Gates and TypeScript Type Check success. No contract record is owed on this PR, so none carries. Clear to land on this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ

Landing at head b68a7f0c9ccee96441aaccbb29ec278b089dbc4e (2026-11-23T14:43Z), area o7-studio:

Reading Result
check-governed-merges.mjs --pr 36688 NOT governed (0 of 10 paths); 488 changed lines ≤ 3000
check-runs at this head 39 success · 13 skipped · 0 failed · 0 pending; mergeable_state: clean

L1: ACCEPT 7103758326, delta read 7104419401 at this head. State change: pr_ready + auto-merge; #35650 closes on merge (Fixes).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 14:43
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 0de93df Nov 23, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35650-action-designer-refusals-texts branch November 23, 2026 15:04
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ld's options (objectstack-ai#36772)

Fixes objectstack-ai#36216

Clause-②: no
Metadata-protocol: none

## 维护者速读

-
在工作室里给视图变体、页面(基础筛选与标签页预设)和页面里的关联列表写筛选条件时,选择"下拉选项"类字段后,值现在是一个列出该字段选项的下拉框,不再是随手输入的文本框;文本字段不变。
- 属于"工作室筛选编辑器字段信息不全"这组修复,补上上一次只修了"多选"标记、没带上选项列表的那几处筛选编辑器。
- 影响在工作室或应用内视图设置里写筛选的管理员;只改界面给出的输入控件,已存的筛选原样不动,可以直接撤回。
- 要你做的一件事:无。

## What changes

A `select` field's declared `options` (the spec's `SelectOption`, `{
value, label }`) reach the shared runtime `FilterBuilder` on every host
that builds the `filter-builder` field list, so a picklist row's value
is a picker over the field's choices and stores the option's `value`.
Before, three builders (and the catalog one of them is fed by) dropped
`options`, the builder fell back to a free-text box, and a typed label
saved a filter that matches no record.

`FilterBuilderField` already forwarded `options` (the list-view
inspector's picklist fix); the field lists handed to it did not carry
them. Measured at `e343ab7c`, where each list is built:

| Host | Field list built by | Change |
|---|---|---|
| generic metadata editor (a page's `interfaceConfig.filterBy`, tab
presets, any `widget: filter-builder` row) | `objectCatalogOf` in
`ResourceEditPage.tsx`, from the raw served object | reads
`declaredFieldOptions(f)` |
| view-variant inspector | `ViewVariantInspector.tsx` widget context,
from `useObjectFields` | forwards `f.options` |
| in-app view configuration panel (feeds the view-variant inspector an
override catalog) | `mapObjectFields` in `ViewConfigPanel.tsx`, from the
raw `objectDef` | reads `declaredFieldOptions(f)` |
| page block inspector (`record:related_list` filter) |
`FilterRulesField` in `PageBlockInspector.tsx`, from `useObjectFields` |
forwards `f.options` |

`useObjectFields` already normalised a field's options in
`declaredFieldOptions` (only string `value` + string `label` entries;
absent when none). That function is now exported and is the one reading
the two raw-definition builders use, so every host offers the same
choices. No consumer-side tolerance is added: entries that are not the
spec shape are dropped exactly as the hook already dropped them.

`mapObjectFields` (`ViewConfigPanel.tsx`) is outside the card's named
three: it is the override catalog the view-variant inspector reads in
the in-app panel, so without it that host kept the text box after the
inspector's own fix. Fixed here under the bounded in-place exemption
(same defect, same mechanical projection, no other claim on the file,
same gate family); see Acceptance notes.

Read first, by risk:

1.
`ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.tsx`:
`objectCatalogOf`, the `fieldOf` projection now a block body. Check both
the record and array branches still read `name` as before. The edit
stays inside `objectCatalogOf` (the sibling objectstack-ai#36688 line is elsewhere).
2.
`ui/packages/app-shell/src/views/metadata-admin/previews/useObjectFields.ts`:
`declaredFieldOptions` exported, body unchanged.
3. `ui/packages/app-shell/src/views/ViewConfigPanel.tsx`:
`mapObjectFields` gains `options`.

Two-minute check: `pnpm --dir ui exec vitest run
packages/app-shell/src/views/metadata-admin/widgets.filterBuilderOptions-36216.test.tsx`.
Expect 9 passed.

## Tests

New file named for the card,
`widgets.filterBuilderOptions-36216.test.tsx` (`FilterBuilderField` has
no shared harness file; its other pins are card-named files). One served
`ticket` object with a `select` column (`status`, two options) and a
`text` CONTROL (`subject`):

- catalogs: `objectCatalogOf` (record and array forms) and
`mapObjectFields` carry the declared choices on `status`, and nothing
extra on `subject`;
- the `filter-builder` widget over `objectCatalogOf`'s catalog: Add
filter, pick Status, the value is a picker (no `Value` box) listing New
Request / Completed, and picking New Request writes `{ field: 'status',
operator: 'equals', value: 'new' }`; CONTROL: Subject gets one `Value`
box and no picker;
- the view-variant inspector, fed by `mapObjectFields` and by its own
`useObjectFields` read: Status is a picker over the choices; CONTROL:
Subject is a `Value` box;
- the page block's related-list filter: Status is a picker over the
choices; CONTROL: Subject is a `Value` box.

<details><summary>Ablation (one mutation per site, on the committed fix
c8a45c6)</summary>

Each site's `options` spread was deleted with
`scripts/ablation-replace.mjs --delete` (anchor 1 to 0, blob moved), the
new file ran under the verify lock, and the tool restored it (blob
equals HEAD, `git diff HEAD` empty). The tested modules are imported by
relative path from `src`, so no `dist` build sits between the mutation
and the run.

- `objectCatalogOf`: Tests 2 failed / 7 passed (its catalog pin, the
widget picklist case);
- `mapObjectFields`: 2 failed / 7 passed (its catalog pin, the
view-variant case over the panel catalog);
- `ViewVariantInspector`: 2 failed / 7 passed (both view-variant
picklist cases);
- `PageBlockInspector`: 1 failed / 8 passed (its picklist case).

Every text CONTROL stayed green under every mutation, as predicted.
</details>

<details><summary>Affected suites</summary>

At `c8a45c6e5`, `pnpm --dir ui exec vitest run --maxWorkers=2` over the
existing suites of every edited component (`metadata-admin/widgets*`,
`ResourceEditPage*`, `ViewConfigPanel*`, `PageBlockInspector*`,
`ViewVariantInspector*`, `previews/useObjectFields*`,
`studio-design/ObjectListViewInspector*`): Test Files 105 passed (105),
Tests 552 passed (552). The new file: 9 passed (9). `pnpm --filter
@object-ui/app-shell run type-check` (the `src` program and
`tsconfig.test.json`), after the `@object-ui/app-shell^...` closure
build: exit 0. The full `@object-ui/app-shell` suite is CI's (`Test
UI`).
</details>

## Acceptance notes

- **Reach measured in components, not in a running app:** the pins mount
the real `FilterBuilder` (only the Radix popover is rendered inline)
over each real host; no backend or Console was booted.
- **Bounded in-place fix:**
`ui/packages/app-shell/src/views/ViewConfigPanel.tsx` is outside the
claim's declared file surface
(`ui/packages/app-shell/src/views/metadata-admin/**`). It is the same
defect on the catalog the view-variant inspector reads in the in-app
panel; the four exemption conditions hold (same defect class; a
mechanical one-line projection shaped like the sibling `multiple` line;
overlap-check names no other PR on the file; same gate family). Declared
here and in the report for the seat to add to the claim's surface.
- `ObjectFieldOption.options` already existed (the list-view inspector's
picklist fix); no type was widened. The `field-ref` / `field-multi`
pickers read name, label and type only, so they are unchanged.
- `origin/main` was not merged: overlap-check against `0d727b70` (after
objectstack-ai#36688 landed) reports a clean merge.

## Verification

<details><summary>Local gates (all at c8a45c6)</summary>

All 39 families from `node scripts/pm/dispatch-gates.mjs --commands
--repo objectstack-ai/objectstack` exited 0, each exit code captured
before any pipe. `--ran` reconciliation: 39 derived, 39 run, 0
NOT-MEASURED, 0 UNRUN (a derived zero: all 39 recorded an exit code).
`ui/scripts/check-new-cross-file-line-citations.mjs`: 0 new citations,
exit 0. `node scripts/pm/overlap-check.mjs`: VERDICT clean exit 0
(origin/main `0d727b70`, 0 PR heads sharing a file). No exported symbol
was renamed or removed, so `check-platform-checklist.mjs` is not owed.
Every CI family is read from this PR's check-runs, not re-run here.
</details>

Seat: repo:objectstack#7 · os-alice · session_011y7As6kDA9BVrMsBR9rmrJ

---

_Generated by [Claude
Code](https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
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

2 participants