From ca586a66488af1297eb4fc6426a674ee6cb66ad0 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 6 Sep 2026 04:03:01 +0000 Subject: [PATCH] docs(guide): teach the action:button node, not the unread `events` bag The Next Steps -> Add Actions section declared the `events` bag as THE way to author actions ("Define them in schema events:") and showed a `button` node carrying `events.onClick`. Nothing reads that key. Measured on this tree: git grep -nE '\??\.events\b' -- 'packages/*/src' 'apps/*/src' -> 0 hits git grep -n 'EventableSchema' -- packages apps -> exactly 3: packages/types/src/api-types.ts:278 own declaration (a TS interface) packages/types/src/api-types.ts:470 one union member packages/types/src/index.ts:729 barrel re-export no extender, no mirror, no reader. `packages/core/src/utils/dom-props.ts:24` cites `events="[object Object]"` as an example of the DOM leak its pass-through whitelist exists to close, and the `handlerKeyRefusal` remedy string points authors at a NODE TYPE ("an action:button node with a declared action"), never at the bag. The bag is an authored key an interface declares and `.passthrough()` keeps, not a channel: objectui#6182's 2026-08-25 Option A ruling re-priced it to an ADR-0049 retirement. Prose and fence are replaced together, since fixing only the fence would move the contradiction rather than remove it. The replacement is the landed dialect (objectui#7898 / PR objectui#7931): an `action:button` node whose `actionType` names the executor and whose `target` carries the location. Spelling measured against the BUILT artifacts, not carried over from the ButtonSchema sweep: node_modules/@objectstack/spec/dist/action.zod-CLgwKXBA.d.ts:275-282 ActionType = url | form | flow | script | api | modal packages/types/dist/ui-action.d.ts:168,191,202 RunnableActionType = ActionType | 'navigation' ('navigation' is objectui's own alias of `url`; the source note prefers `url`) packages/types/dist/ui-action.d.ts, interface UIActionSchema target?: string -- "the **only** handler slot" packages/core/src/actions/ActionRunner.ts:1418 executeUrl reads `action.target || action.redirect` (not params.url) packages/components/src/renderers/action/action-button.tsx:160,166 forwards `type: schema.actionType` and `target: schema.target` Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3 --- content/docs/guide/quick-start.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/content/docs/guide/quick-start.md b/content/docs/guide/quick-start.md index 9759068262..c3242ed4ac 100644 --- a/content/docs/guide/quick-start.md +++ b/content/docs/guide/quick-start.md @@ -139,22 +139,17 @@ Open [http://localhost:5173](http://localhost:5173). You should see a card and d ### Add Actions -Actions are data, not inline functions. Define them in schema events: +Actions are data, not inline functions. Declare one as an `action:button` +node: `actionType` names the built-in executor the action runner dispatches to, +and the action's own keys carry that executor's arguments — `target` is the +location a `url` action navigates to: ```json { - "type": "button", + "type": "action:button", "label": "Open details", - "events": { - "onClick": [ - { - "action": "navigate", - "params": { - "url": "/users/ada" - } - } - ] - } + "actionType": "url", + "target": "/users/ada" } ```