Skip to content

feat(react): an action's params values are templates, evaluated where properties are - #10282

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-7867-action-params-templates
Sep 24, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-7867-action-params-templates

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #7867
Clause-②: yes

What this does

Ruling A on the card (comment 5749025615, maintainer 「其他同意」): an action's params values are templates, evaluated where properties are. Every string leaf of a node's params bag - the node-level params and properties.params alike, at any depth, inside nested objects and arrays - is now template-evaluated in the SchemaRenderer evaluation memo, with the same evaluator and scope that already evaluates properties. A metadata-authored navigate_edit button on a record page can name the record it sits on with "recordId": "${record.id}".

Measured, before and after

Through the real SchemaRenderer -> real action:button -> real ActionRunner, on a record page bound by RecordContextProvider to { id: 'rec_1' }, with navigate_edit registered as a handler. Values read off the ActionDef the handler received.

case base 142fdfd8 this branch
CONTROL properties.label: "L-${record.id}" L-rec_1 L-rec_1
CASE A node-level params.recordId: "${record.id}" raw ${record.id} rec_1
CASE B properties.params.recordId raw ${record.id} rec_1
two levels down (object and array) raw rec_1
unresolvable ${nope.id} raw at handler, not reported raw at handler, reported once as params.recordId

The base column is the new pin file run on the unmodified tree: 4 failed, 1 passed (the CONTROL).

Design

  • One rule, one place. evaluateConfigValue(key, value) is defined once inside the memo that already evaluates properties: a params bag has every string leaf evaluated; every other value evaluates exactly as before (per-value, shallow, CEL predicate envelope preserved). No second evaluator.
  • Three carriers call it. Node-level params was not seen by the memo at all on base (it evaluated only content, the bindable text keys, properties, props and the condition keys), so it is routed into the same memo through the same function, before the hoist. properties.params goes through it inside the properties loop, before the hoist, so the hoisted schema.params and schema.properties.params agree. props.params goes through it in the legacy-alias loop, so the two bag loops do not disagree about a key (the objectui#5123 / objectui#9100 precedent). Each authored value is evaluated exactly once.
  • The walk lives in a new module, packages/react/src/utils/paramsBag.ts, which the unevaluated-expression diagnostic also uses, so what is evaluated and what is reported as left unresolved are one radius by construction.
  • What the walk does not look inside: an ARRAY params (the ActionParam[] definition list action:button routes to actionParams, whose members carry deferred predicates such as visible, titleFormat and option visibleWhen) is left as authored; keys are never evaluated; non-plain objects (Date, Map, class instances) and functions pass through by identity; a container already on the current path (a cycle in a host-built bag) is passed through unwalked. An envelope-shaped object inside the bag is walked, not collapsed to its source. Copy on write: the authored bag is never mutated. The plain-object test is built on isConfigBag (the objectui#6761 one-spelling pin stays green).
  • The diagnostic (utils/unevaluatedExpression.ts) walks params leaves with the same walker and names a finding by its path (params.recordId, properties.params.target.id). Its channel enumeration now names params too - otherwise an author whose params template threw would be told params is not a channel at all, the objectui#7849 defect one channel later.
  • Docs: the note PR objectui#7865 added to content/docs/guide/record-edit-modes.md returns to teaching "recordId": "${record.id}", and says what happens when a template cannot be evaluated (raw text plus the dev diagnostic) and that a misspelled field on a bound record resolves to nothing (both measured).
  • Changeset: @object-ui/react minor, behaviour change stated.

Blast radius

  • Authored params bags in this repository carrying a literal ${: none. Measured once on 142fdfd8 with a one-off scanner over every tracked json/ts/tsx/js/jsx/mjs/md/mdx/yaml/yml file (CHANGELOGs excluded), matching quoted and unquoted params keys followed by an object or array and reading the balanced block; its only hit is a JavaScript template literal in app-shell code, not metadata. Controls: the doc's two params bags matched, and the card's CASE A / CASE B spellings matched. Nothing re-derives this reading; it is a historical measurement, not a live count.
  • In-tree renderers reading a node-level params: action:button and action:icon. action:group / action:menu read params off their own actions items, which do not pass through the memo.

Boundary, measured and not changed here

action:bar mounts its members directly through the component registry, not through SchemaRenderer, so neither properties nor params of a member passes through the memo: a member with params.recordId: "${record.id}" on the same record page reached the handler raw. The ruling's own statement ("evaluated where properties are") holds there, since a member's properties are not evaluated either. Raised with the dispatching seat; action-bar.tsx is outside this card's surface.

Tests

New pins:

  • packages/components/src/renderers/action/__tests__/action-params-templates-7867.test.tsx (5): CONTROL, CASE A, CASE B, two levels down, unresolvable still reports. Lives in @object-ui/components because it drives the real action:button and runner.
  • packages/react/src/__tests__/SchemaRenderer.paramsTemplates-7867.test.tsx (18): the three carriers, what the walk does not touch (array params, keys, non-plain objects, a source-keyed bag, cycles, no mutation, other nested keys stay shallow), the diagnostic's path and radius, copy on write.

Union at c5cbe18d (final HEAD): packages/react/ whole, packages/components/src/renderers/action/, the components action / page-header-action suites, scripts/__tests__/check-doc-expression-carriage.test.ts, scripts/__tests__/check-component-surface-parity.test.ts, packages/layout/src/__tests__/guide-layout-app-shell-doc.test.ts: 122 files, 1666 tests passed. @object-ui/react type-check green at c5cbe18d; @object-ui/components type-check green (its reading of @object-ui/react is the built public surface, which no commit after the build changed). scripts/__tests__/ 178 passed, 2 skipped (at 02a2fb45).

Ablation (at 02a2fb45; c5cbe18d changes one docblock only), through ablation-replace.mjs with the anchor proven to land (anchor 1 -> 0, replacement 0 -> 1) and the restore proven on disk (blob equal to HEAD, git diff HEAD empty). The tests import @object-ui/react through the vitest source alias, so the mutated source is what they run.

  • Leg 1, memo shallow for params again (the params branch of evaluateConfigValue disabled): 12 red - CASE A, CASE B and the two-levels-down pin, plus 9 react pins (carriers, keys, non-plain, source bag, cycle, no-mutation); CONTROL, the array pin, the other-keys-stay-shallow pin and the unresolvable pins stay green. Direction as predicted before the run.
  • Leg 2, the diagnostic's params walk disabled: 3 red - the e2e "unresolvable still reports" pin and the two react diagnostic pins; everything else green. As predicted.

Gates run locally: check:control-bytes, check:new-line-citations (0 new), check-changeset-presence, check:changeset-claims, changeset:check, check-doc-expression-carriage (report-only), check-doc-component-types, check-doc-example-ids, check-doc-fence-languages, check-doc-links, check:doc-example-readers, check:spec-symbols, targeted ESLint on the changed source and test files (0 errors), all green.

NOT MEASURED locally: check-doc-snippet-types and check-doc-example-types (they need a 34-package scoped build; this diff adds no ts/tsx fence and no @example). Left to CI.

Acceptance notes

  • check-doc-expression-carriage's hit text says SchemaRenderer evaluates "exactly four channels"; params leaves are now a fifth. The census reads only top-level string values, so it neither counts nor misjudges a nested params template. Report-only; not changed here.
  • Two findings outside this card went to the dispatching seat rather than into this PR: UIActionSchema.params is declared ActionParam[]-only while the runtime and the guide use an object params bag; and a properties value that is an object with a string source key (for example properties.bodyExtra) is collapsed to that string by the shallow loop.
  • Open PR objectui#10271 (the params-dialog carry-over) works on the array params definition path, which this PR leaves untouched; no file overlaps with any open PR.
  • The depth-1 qualification comment on objectui#7849 is the claiming seat's, not made here.

Attribution: this change was written in session https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC.


Generated by Claude Code

An action's params values are templates, evaluated where properties are:
the node-level params bag and properties.params (and the legacy props.params)
have every string leaf template-evaluated at any depth, in the SchemaRenderer
evaluation memo, through one per-key rule. The unevaluated-expression
diagnostic walks the same leaves with the same walker, so an unresolvable
template is still reported, by its path.

Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
…ostic radius; docs and changeset

The record-edit-modes guide returns to teaching `"recordId": "${record.id}"`
inside `params`, with what happens when a template cannot be evaluated.
Changeset: @object-ui/react minor.

Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
The one config-bag predicate (objectui#6761) stays the only spelling of the
object/array test in packages/react/src; the params walk narrows it by
prototype instead of re-spelling it.

Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
@github-actions

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 4 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/5926-empty-action-visible-when.md

  • names packages/react/src/SchemaRenderer.tsx → packages/react/src/SchemaRenderer.tsx — edited by this change

    visibleWhen is not a per-block concern in this platform. It is enforced once, generically, in packages/react/src/SchemaRenderer.tsx: shouldHide tests visibleWhen ahead of the hoisted visible (objectui#5454), sets _hidden, and the _hidden early return fires before the registry dispatches. A block renderer cannot ignore the gate, because it never sees the node.

.changeset/7319-dead-schemarenderer-retired.md

  • names packages/react/src/SchemaRenderer.tsx → packages/react/src/SchemaRenderer.tsx — edited by this change

    packages/components/src/SchemaRenderer.tsx was a 28-line component carrying the same export name as the real renderer in packages/react/src/SchemaRenderer.tsx. Nothing reached it: it is absent from the package barrel, no file in the repo imports it by any form, and the package's exports map has no subpath that resolves to it.

.changeset/7415-action-type-input-rename.md

  • names SchemaRenderer.tsx → packages/react/src/SchemaRenderer.tsx — edited by this change

    Census of the authored corpus, measured before the rename, not assumed. Across 4,797 files in examples/, apps/console/, content/docs/ and packages/: zero authored nodes set the input. 517 JSON files (433 of them the schema catalog) contain 2,410 type-bearing nodes and no action:button / action:icon node at all — control: 127 plain button nodes on the same walk. 207 parsed fenced JSON blocks in md/mdx carry 5 action:button nodes, all of them { type, label, icon?, action } — the discriminator plus the action channel, none setting an execution type — control: 28 plain button nodes, and the count independently matches the corpus census already recorded in SchemaRenderer.tsx ("action:button (5 nodes)"). No docs page documents the input; no catalog entry uses the components. So the rename breaks no authored document in this repo.

.changeset/9959-refused-data-prop-warn-reset.md

  • names SchemaRenderer.tsx → packages/react/src/SchemaRenderer.tsx — edited by this change

    The dedupe Set behind the objectui#9571 / objectui#9758 diagnostic — "the authored data key was NOT passed to the component as a React prop" — lived in SchemaRenderer.tsx with nothing able to clear it, while every other dev diagnostic in this package's utils/ directory pairs its Set with an exported test-only reset. propsBagDiagnostic.ts states the consequence in its own reset's docblock: the second test to assert the same warning reads the first test's dedupe entry and sees silence, "a green run that checked nothing". The absence direction is the dangerous one — a test asserting this warning did NOT fire for a type#id an earlier test already warned for is green whatever the renderer does, and it reports that green as coverage.

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a born-false claim that spells no line address at all (objectui#9495 coordinated one by ORDINAL — "a grep finds that member first" — and deciding that means reading what the sentence means), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with 06b82b8c3 (merge-base with origin/main): 6 file(s) changed outside .changeset/, read against 1291 pending declaration(s) that publish a body (1860 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3038.8 KB 3104.5 KB
Main entry chunk (gzip) 147.8 KB 350 KB
Entry file index-BuPVqned.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.68KB 6.20KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 547.83KB 131.37KB
core (index.js) 8.94KB 3.59KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 222.47KB 61.83KB
fields (index.js) 253.41KB 64.01KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.22KB 2.26KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 33.36KB 10.88KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.02KB 11.00KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.39KB 3.10KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 14.81KB 3.63KB
plugin-calendar (index.js) 51.44KB 14.62KB
plugin-charts (index.js) 71.82KB 20.13KB
plugin-chatbot (index.js) 198.27KB 47.18KB
plugin-dashboard (index.js) 133.00KB 35.19KB
plugin-designer (index.js) 215.98KB 44.34KB
plugin-detail (index.js) 258.85KB 67.53KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 144.65KB 37.10KB
plugin-gantt (index.js) 167.99KB 41.37KB
plugin-grid (index.js) 215.46KB 58.88KB
plugin-kanban (index.js) 48.83KB 15.21KB
plugin-list (index.js) 113.90KB 28.11KB
plugin-map (index.js) 21.74KB 7.07KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.55KB 11.99KB
plugin-timeline (index.js) 30.68KB 8.95KB
plugin-tree (index.js) 10.56KB 3.71KB
plugin-view (index.js) 85.18KB 21.05KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 110.46KB 36.33KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.38KB 1.98KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.74KB 2.54KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 15.71KB 5.30KB
types (ai.js) 4.11KB 2.06KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 17.15KB 6.32KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c5cbe18d

① Derived judgments

  • One evaluator, one place — holds. evaluateConfigValue lives inside the existing evaluatedSchema memo and closes over the one ExpressionEvaluator that properties uses; no second evaluator exists in the diff.
    • Node-level params (never touched on main), properties.params (before the hoist) and props.params all go through it.
    • utils/paramsBag.ts is the single walk both the memo and the diagnostic import, so evaluation radius and report radius are one by construction.
  • Scope of the walk — verified in paramsBag.ts.
    • Only string leaves of plain objects and arrays inside a params OBJECT are visited; keys are never visited.
    • An ARRAY params (the ActionParam[] list) is untouched, pinned toBe(definitions).
    • Non-plain objects and functions pass by identity, cycles terminate, and it is copy-on-write, so the authored bag is never mutated (pinned).
  • Blast radius — re-derived independently. 0 authored object params bags in the tree carry ${; 0 carry a string source key (which main's envelope unwrap would have collapsed).
    • props.params is a third carrier beyond the ruling's two. It follows the file's own both-spellings rule and has 0 in-tree readers, and it is disclosed.
  • The diagnostic reports once per unresolved leaf, by path. The hoisted copy is skipped, so there is no double report, and the channel list now names params.
  • The pins assert what they claim. The e2e path is the real SchemaRenderer → action:button → runner on a record page with the CONTROL lit, plus 18 react pins. The ablation legs match their dependencies.
  • Open question, reported not decided: action:bar / action:group / action:menu members bypass the memo, so neither their properties nor their params evaluate.
    • The ruling's operative restatement, 「params values are templates, evaluated where properties are」, its 「same memo」 siting, its refusal of a second evaluator, and its five pins support reading 1: Fixes is honest.
    • Read literally, 「every surface that renders action:button」 would call for Part of plus a follow-up card.

② Semver level

  • @object-ui/react: minor is RIGHT (the ruling says minor, and Clause-②: yes).
  • Every changeset sentence is TRUE, and it makes no 「every surface」 claim.
  • record-edit-modes.md returns to "recordId": "${record.id}", and its failure behaviours are TRUE. One imprecision: 「is not an error」 for a misspelled field on a bound record. The template raises no diagnostic, but navigate_edit then answers its own objectName and recordId are required error. Non-blocking.

③ Boundary flags

  • The Acceptance notes are factual.
  • Two out-of-scope findings are real and seat-level:
    • (a) the shallow properties loop collapses any object value carrying a string source key;
    • (b) UIActionSchema.params / spec ActionSchema.params are ActionParam[]-only (the object form is refused by name), and spec PageComponentSchema declares no node-level params, yet the runtime and the guide use an object bag.
  • Clause-②: yes is on line 2, and the widening is fully named.
  • The fences are untouched.
  • Check-runs on c5cbe18d: 43 terminal, 40 success and 3 skipped by design.
  • Mergeable.

Implemented-by: claude/issue-7867-action-params-templates
Reviewed-by: session_01BA3nKVUwKQJf8DBxrSVtNC

VERDICT: PASS

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 24, 2026 16:00
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit 95bf128 Sep 24, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-7867-action-params-templates branch September 24, 2026 16:11
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…ly the input list (objectstack-ai#10289) (objectstack-ai#10460)

Fixes objectstack-ai#10289
Clause-②: yes

## What this does

This implements ruling A on the card (comment `5825589480`, maintainer
「批 objectstack-ai#224 同意」): an action's `params` is only the `ActionParam[]` inputs
list. A node's static execution values ride `properties.params`.

- `action:button` and `action:icon` read static values only from the
node's `properties.params`. They forward those values to the runner as
`ActionDef.params`, which is where `navigate_create` / `navigate_edit`
read `objectName` / `recordId`.
- A node-level `params` **object** is not read. It is ignored, and a
development build logs one warning per action (`[action:button] action
"X" carries an OBJECT under node-level params; it is ignored ...`). The
warning names `properties.params`, and `bodyExtra` for an api payload.
It is silent in production. The precedent is the dev-only, warn-once
`console.warn` that `auto-trigger.ts` and core `actionKeys.ts` use.
- A node-level `params` **array** still works as the input list and is
forwarded as `actionParams`. `action:icon` used to forward any `params`
raw; it now routes through the same `paramsPayload` as `action:button`.
The runner already treated an array `params` as `actionParams`, so the
input path behaves as before.
- The two channels are independent. An `action:bar` member, which is
mounted without `SchemaRenderer`, can carry inputs in `params` and
values in `properties.params`, and both are forwarded.
- The renderer reads `schema.properties.params` itself instead of the
hoisted `schema.params`. `SchemaRenderer` copies `properties.params`
onto the node, and `action:bar` members skip that hoist. An identity
check tells a hoisted copy apart from a node-level object. The helper is
`packages/components/src/renderers/action/static-params.ts`.

Docs: `content/docs/guide/record-edit-modes.md` and the
`@object-ui/app-shell` README now teach `properties.params` in both
examples. They say that a node-level `params` object is ignored, and how
to migrate. The README also had a stale claim that templates inside
`params` are not evaluated, which objectui#10282 had already made false.
That claim is replaced.

## Census (taken on the base `0348bc9f1`, before the change)

Instrument: a one-off scanner run over every tracked file (CHANGELOGs
excluded). It walks every JSON document for a `params` key holding a
plain object, and it matches `params` followed by an object literal in
ts/tsx/js/mjs/md/mdx/yaml text. Each text hit was then classified by
hand. Nothing re-derives this reading; it is a historical measurement,
not a live count.

**Authors of a node-level `params` object on an `action:button` /
`action:icon` node: 13.**

| where | sites | disposition |
|---|---|---|
| `content/docs/guide/record-edit-modes.md` | 2 | migrated |
| `packages/app-shell/README.md` | 2 | migrated |
| app-shell `AppContent.tsx`, the `navigate_*` handler comment | 2 |
migrated |
| `action-bodyShape-forward.test.tsx` (`action:button`) | 3 | migrated |
| `action-forward-precedence.test.tsx` (the shared fixture) | 1 |
migrated |
| `action-params-templates-7867.test.tsx` | 3 | 2 migrated; CASE A
flipped to pin the object form as not read |

- JSON metadata under `examples/`, `apps/` and `schema-catalog`: **0**.
The JSON walk found no `params` object anywhere.
- Published `skills/`: **0**. Its one action `params` is the
`ActionParam[]` form, in `skills/objectui/rules/protocol.md`. No
governed file is touched.
- Stored metadata outside this repo (`sys_metadata` rows): **NOT
MEASURED**, because this repo cannot read it.
- `.changeset/7867-action-params-templates.md` (pending) shows one
node-level example. It is another card's changeset and was not edited.
The new changeset says that the form is no longer read.
- The other text hits are the runner's own `ActionDef.params` (the
values channel that handlers and hosts build in code), query params,
nav-item params, i18n label params and similar. None of them is an
authored action node.

## Readers, and a premise correction

- The **authored-node readers** of the object form were the
`paramsPayload` non-array branch in `action:button`, and `action:icon`'s
raw `params` forward. Both are moved.
- app-shell `recordFormNavigation.ts` (`action.params?.recordId` /
`objectName`) and `useObjectActions.ts` read the **runner's**
`ActionDef.params`. They do not read the authored node. Core declares
that key as the values map (`params?: Record string-to-any`), and
`action:button` now fills it from `properties.params`. They cannot read
`properties.params` themselves, because the handler receives an
`ActionDef`, which has no `properties`. So they keep their reads. Only
their docs changed: the `NavigationActionDef` docblock and the
`AppContent` comment now describe the channel and teach
`properties.params`. The card's list of these two files as object-form
readers was half right: the keys they read are the right ones, but on
the runner layer.

## Boundary: surfaces left unchanged here

These also forward a non-array `params` as values, but they are spec
**action** entries, not SDUI nodes. They have no `properties` bag, and
another ruling governs them:

- `element:button`'s inline `action`;
- `action:group` / `action:menu` items;
- `page:header`'s `dispatchHeaderAction`.

For a `type: 'api'` action, the objectstack#5777 ruling keeps the runner
reading an object `params` as the payload for one version window, with a
dev warning, removed at 18. Spec already refuses the object form at the
authoring door, and the ADR-0087 conversion rewrites it to `bodyExtra`.
Retiring these surfaces now would pre-empt that window, so they are
listed rather than changed.

## Tests

New pin file
`packages/components/src/renderers/action/__tests__/action-params-properties-10289.test.tsx`
(21 tests). It covers `action:button` and `action:icon`, each on both
mounts (direct registry mount and through `SchemaRenderer`), and pins
the following:

- values come from `properties.params`;
- a node-level object is not read as values, and the warning fires once
and names `properties.params`;
- `properties.params` wins over a node-level object;
- the `ActionParam[]` path still arrives as `actionParams`;
- both channels together;
- the warning is once per action, not per click, and silent in
production.

Union at `c3aff649a` (final HEAD), all run from the repo root:

- `packages/components/src/renderers/action/`, the bodyShape / bodyExtra
/ element:button 8071 / page-header-actions suites, app-shell
`recordFormNavigation.test.ts`, and `scripts/__tests__/` for
doc-expression-carriage and both action-forward-parity suites: **32
files, 548 tests passed**.
- `@object-ui/components` `type-check` (`tsc --noEmit && tsc -p
tsconfig.test.json`, which includes the tests): green at `c3aff649a`.
- `@object-ui/app-shell` `type-check`: green at `5f7cb6fc5`. Only
comments and docs changed in app-shell after that.

## Ablation

Each leg ran through `ablation-replace.mjs`. The anchor was proven to
land (anchor 1 to 0, blob changed), and the restore was proven on disk
(blob equal to HEAD, `git diff HEAD` empty). These tests import the
renderers by relative path, so the mutated source is what runs. The
direction was predicted before each run.

1. `action:button` values read reverted to the old `params:
schema.params`: **10 red**. That is button direct-mount properties, both
not-read pins, direct-mount wins, the production pin, the 3 bodyShape
wire pins, 7867 CASE A, and precedence's carried values. The
SchemaRenderer-mount "reads from properties.params" pin stays green, as
predicted, because the hoist puts the same object on `schema.params`.
2. `action:icon` back to a raw `params` forward: **8 red**. That is the
icon properties, not-read (both mounts), wins, input list (both mounts),
both-channels, and the precedence carried-values pins.
3. The dev warning deleted: **5 red**. That is the four once-warning
pins and the per-action memo pin.

## Gates run locally

- Green: `check:action-forward-parity`, `check:handler-key-reads`,
`check:changeset-claims`, `check:pending-changeset-literals`,
`changeset:check`, `check:control-bytes`, `check:new-line-citations` (0
new), `check:doc-types`, `check:doc-fences`, `check:doc-example-ids`,
`check:doc-example-readers`, `check:unreferenced-sources`,
`check:spec-symbols`, `check:component-surface-parity`,
`check:test-path-roots`, `check:action-ref-convention`,
`check-changeset-presence`, `check-doc-links`,
`check-doc-expression-carriage` (report-only).
- ESLint on the 9 changed ts/tsx files: 0 errors. The warnings are the
files' existing `no-explicit-any` / react-refresh warnings.
- `check-governed-queue-guard --test` on the 12 changed paths: NOT
GOVERNED.
- NOT MEASURED: `check:readme-exports`, because it needs every package's
`dist/*.d.ts` and the README edit adds no import. Also NOT MEASURED:
`check:sdui-registration-pins`, because it needs a console build and no
registration changed. Both are left to CI.
- `packages/types` was not touched, so the Spec Main Shape Gate
type-check does not apply.

## Acceptance notes

- `SchemaRenderer` still evaluates a node-level `params` bag (carrier 1
of objectui#10282). No in-tree renderer reads that value any more, so
the evaluation is dead work, and the unevaluated-expression diagnostic
can still name a leaf inside it. `@object-ui/react` was left unchanged
to keep this PR to the renderers the ruling names. A follow-up can drop
carrier 1 there.
- Under `SchemaRenderer`, the `properties` hoist copies
`properties.params` over a node-level `params`. So one node cannot carry
both an input list (node-level) and values (`properties.params`) on that
path; the values win. Nothing in the repo authors both, and base behaved
the same way. Directly mounted `action:bar` members get both.
- The guide now says the diagnostic reports an unresolvable template
under `properties.params.recordId`. The 7867 pin now asserts that exact
path.
- objectstack-ai#10282's changeset (pending) shows the node-level form; see the
census.

Attribution: this change was written in session
`https://claude.ai/code/session_01877XiBYSaRCk2CU7cMSg3S`.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant