Skip to content

Commit 88dc577

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-ta4g7t
2 parents 359c749 + 57cde8c commit 88dc577

51 files changed

Lines changed: 2651 additions & 149 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): the connector docs say where an undeclared key's refusal is located: at the entry, with the key named in `keys`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A connector entry refuses a top-level key it does not declare, through `DeclarativeConnectorEntrySchema` and `defineConnector()`. The TSDoc on both said the refusal was "located at the key". It is not. zod raises one `unrecognized_keys` issue at the entry itself: its path is empty when the entry is parsed alone and `connectors.N` inside a stack, and it lists every undeclared key in `keys` and in its message. An author or agent looking for an issue at the key's path found none.
11+
12+
The TSDoc now says this. The same correction is made in the reason of the protocol-18 upgrade note for undeclared connector keys (`connector-entry-undeclared-key-refused`), which is not released yet.
13+
14+
Prose only. The refusal, its code, its path, its message and what the connector schema accepts are unchanged.

‎.changeset/28856-action-stale-summary-answer.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ When a declarative update action (`operation: 'update'`) writes its record but a
1515
- **MCP `run_action`**: the usual `{ ok, action, objectName, recordId, result }`.
1616
- The action's invocation audit row records `succeeded`, the outcome the door answers.
1717

18-
The runtime composes the action's result once and attaches it to the refusal through the existing carrier; each door relays it. The stale summary column is logged at `error` once per field per process. A refusal before the write answers exactly as before. Other action kinds are unchanged: an `api` action's forward already lands on a data door that answers success, a `flow` action's record nodes turn the refusal into a node failure, and a script or body action is a separate follow-up.
18+
The runtime composes the action's result once and attaches it to the refusal through the existing carrier; each door relays it. The stale summary column is logged at `error` once per field per process. A refusal before the write answers exactly as before. Other action kinds: an `api` action's forward already lands on a data door that answers success, and a `flow` action's record nodes and a script or body action's own writes answer a landed write's success since #28861.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/runtime': patch
3+
'@objectstack/service-automation': patch
4+
---
5+
6+
fix(runtime,service-automation): a write in an action, hook or job body, or a flow record node, that landed under a failing roll-up answers its own success (#28861)
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
When a child write is stored but a parent's roll-up summary cannot be recomputed after it (`ERR_SUMMARY_RECOMPUTE`, "the triggering records WERE written"), the data doors and MCP tools already answer the write's success. The write surfaces an author's code holds now do the same, so the code's next line runs instead of stopping on a write that landed. Each answers exactly what the same write answers when every roll-up recomputes — no new code, member or shape:
12+
13+
- **`ctx.engine`** in an action handler: `insert` resolves `{ id }`, `update` and `delete` resolve. A multi-id `delete` deletes every id; a stale roll-up after one id no longer leaves the later ids undeleted.
14+
- **`ctx.api`** in an action handler, and every context it derives (`sudo()`, `withRunAs(...)`, a `transaction(fn)` callback's context): each repository write verb resolves with the engine's result.
15+
- **A sandboxed hook, action or job body's `ctx.api.object(...)`**: the write resolves in the body with the engine's result, so a hook no longer refuses the write that fired it, an action body returns its own value, and a job run reports its own outcome.
16+
- **Flow `create_record`, `update_record` and `delete_record`**: the node succeeds with the output it gives on a clean write (`output`, `outputVariable`, `droppedFields`, `acted`), and the run goes on to its next node.
17+
18+
The stale summary column is logged at `error` once per field per process, with the fix, as on the data doors. A refusal raised before the write is stored (validation, permission, constraint) reaches the author's code exactly as before. No transaction is added: a body's earlier writes stay committed, as they always did. Inside a transaction the body opens itself (`ctx.api.transaction(fn)`), such a write now answers its success in the callback too, so that transaction commits where the refusal used to roll it back.
19+
20+
The REST and MCP action doors answer a refusal carrying a write's attached answer as the action's success only for a declarative update action, whose refusal carries the action's own result. Any other action that throws such a refusal is answered as the failure it is, and its invocation audit row records `failed`.

‎.changeset/28912-hide-fields-default-on.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A declared default moves. A list view whose `userActions` block says nothing abo
1212

1313
- **Before.** `UserActionsConfigSchema.hideFields` defaulted to `false`, and the list renderer drew the control only for an explicit `hideFields: true`. Generated apps and the CRM example never declared it, so their lists had no way to hide a column.
1414
- **Now.** The default is `true`, and the list renderer reads `hideFields !== false`, so the spec default and the renderer agree. A view with no `userActions` block parses with none, and the renderer reads the absent key as the new default.
15-
- **Interface pages.** A page `interfaceConfig.userActions` block that omits the key parses to `true` as well, but an interface page keeps its own closed-by-default toolbar, as it already does for `filter`, `rowHeight` and `group`: it draws the control only for an explicit `hideFields: true`.
15+
- **Interface pages.** A page `interfaceConfig.userActions` block that omits the key parses to `true` as well, and the interface page reads the same default: a page that omits the key, or has no `userActions` block, offers the control, and `hideFields: false` withholds it.
1616
- **Where the choice is kept** does not change. The control only subtracts from the columns the view draws. On a view that declares `columns`, or a saved view, the choice is stored on the reader's own list state and survives a reload for that reader only. On a system view that declares no `columns`, it lasts for the session. It never writes the shared view.
1717
- **To withhold the control**, write `userActions: { hideFields: false }`. Every authored `hideFields` parses exactly as before, and a non-boolean is still refused.
1818
- **Compiled artifacts.** A document that serialised an earlier parse (an `os compile` artifact) carries the old written `false` and keeps withholding the control. Recompile it, or delete the key.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
fix(app-shell): a landed Studio draft autosave names what it saved
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
A Studio draft autosave used to land with no feedback but the top bar's "Saved HH:MM", which names nothing. Now, once the save lands, Studio shows a toast that names the item: "Draft saved: Task" for an object (or for its customization, in a package that customizes a base), for an Interfaces page, dashboard or report, for an app's navigation, and for a flow. The toast uses one id per item, so the saves that follow each editing pause update the toast already on screen instead of stacking more toasts; another item saved meanwhile gets its own. The top bar's saved hint stays. A refused save keeps its refusal strip and shows no "saved" toast.
12+
13+
- **`@object-ui/app-shell`**: the Data, Interfaces and Automations pillars announce each landed draft autosave by the item's label.
14+
- **`@object-ui/i18n`**: one new studio-namespace string, `engine.studio.draftSaved` ("Draft saved: {item}"), in English and Chinese.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@object-ui/plugin-list': patch
3+
---
4+
5+
fix(plugin-list): a list view whose `sharing` sets `lockedBy` and no `type` shows its lock indicator
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The list toolbar drew its read-only sharing indicator only when the view declared `sharing.type`. `ViewSharingSchema` defaults `type` to `collaborative`, and the served view carries the authored body without that default, so a view authored as `sharing: { lockedBy: 'admin@objectos.ai' }` showed no lock: other readers did not learn the view was locked.
11+
12+
- **Now.** The indicator draws when `sharing` declares a `type` or a `lockedBy`; the lock keys on `lockedBy` alone. An absent `type` shows the spec's default type label ("Shared view"), read from `ViewSharingSchema` rather than restated in the renderer.
13+
- **Unchanged.** A view with `type` set renders as before, a `sharing` block with neither key shows nothing, and no key, value or copy changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/core': patch
3+
---
4+
5+
refactor(core): dashboard date presets read their bounds from the spec's window table
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`dashboard-filters` no longer keeps its own preset-to-bounds table. Each of the thirteen dashboard date presets now lowers to the window `@objectstack/spec` declares in `DATE_RANGE_PRESET_MACRO_WINDOWS`, so the preset list and its windows live in one place and cannot drift.
11+
12+
The emitted condition spells the current period with the bare macro aliases the spec uses (`{month_start}` instead of `{current_month_start}`, and the same for week, quarter and year). Both spellings name the same day, so a dashboard returns the same rows, and a compare-to widget keeps the same comparison window and trend label. A stored dashboard that writes the `{current_*}` tokens itself, as a custom range or as a date default, still filters as before.
13+
14+
Preset membership is now the spec's exact `isDateRangePresetName` check. A stored preset name that matched only an inherited object member (such as `constructor`) was dropped without a word; it is now dropped with the usual unknown-preset warning.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/app-shell': minor
3+
'@objectstack/spec': minor
4+
---
5+
6+
fix(app-shell): an interface page's list toolbar reads the published `userActions` defaults — Filter, Row height, Group and Hide Fields are on unless the page writes `false`
7+
8+
Clause-②: no
9+
Metadata-protocol: semantic
10+
11+
An interface page's `interfaceConfig.userActions` is the same `UserActionsConfigSchema` a list view uses, and that schema declares `filter`, `rowHeight`, `group` and `hideFields` on by default. The interface list page read those four as `=== true`, so a control appeared only when a parse had already written the default into the block. The same page drew two different toolbars depending on how it reached the console.
12+
13+
- **Before.** A page whose `userActions` block omitted one of the four drew that control only if the page had been parsed (a code package through `defineStack`). A page with no `userActions` block, or a stored page that was never parsed, drew none of the four.
14+
- **Now.** The page reads `filter`, `rowHeight`, `group` and `hideFields` as on unless the block says `false`. A page with no block, an unparsed stored page and a parsed block that omits the key draw the same toolbar: Filter, Row height, Group and Hide Fields appear, beside Search and Sort, which already read this way.
15+
- **Unchanged.** `rowColor` is off by default in the spec and stays opt-in: the page draws it only for `rowColor: true`. Export stays off on an interface page. A list view's toolbar is unchanged.
16+
- **To keep a control closed** on a curated page, write it: `userActions: { filter: false, rowHeight: false, group: false, hideFields: false }`, or any one of them. Code-package pages that declare a `userActions` block already drew Group and Hide Fields after their parse, so they see no change.
17+
- **Wording.** The `list-view-hide-fields-default-on` semantic entry and the default-change ledger no longer say an interface page keeps a closed-by-default toolbar.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/service-datasource': patch
3+
---
4+
5+
fix(service-datasource)!: creating a runtime datasource refuses `drivers`, the name the driver-catalog route answers, so a datasource is never created that its edit form cannot load (#29164)
6+
7+
Clause-②: no (narrowing) — `POST /api/v1/datasources` with `name: 'drivers'`, which answered 201 before, now answers 400 `DATASOURCE_ADMIN_ERROR` naming the reserved name. Nothing is widened.
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, export or stored shape changes: the runtime datasource-admin create door refuses one more name, the way it already refused `default`. A stored row of that name is not rewritten or refused, so there is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** accept-set narrowing at the datasource-admin create door (`@objectstack/service-datasource`).
13+
14+
- **Before.** `GET /api/v1/datasources/drivers` is the driver catalog, mounted ahead of `GET /api/v1/datasources/:name`. A runtime datasource named `drivers` was created and listed, but its detail read always answered the catalog, so Setup → Datasources could never open its edit form.
15+
- **Now.** Create refuses every literal path segment the admin routes mount beside a same-method `/datasources/:name` route; today that is `drivers` alone. The refusal is the same 400 `DATASOURCE_ADMIN_ERROR` that `default` already answers. `test` stays creatable: `POST /datasources/test` (the unsaved-draft probe) sits beside no `POST /datasources/:name`, so a datasource named `test` keeps every by-name door.
16+
- **Stored rows.** A `drivers` row created before this release is not refused or rewritten. It stays listed, patchable, removable and probe-able by name; its detail read still answers the catalog.
17+
18+
**The remedy.** Create the datasource under another name. For a stored `drivers` row, create the same connection under another name, move the objects bound to `drivers` onto it, then remove `drivers` (`DELETE /api/v1/datasources/drivers`, which refuses while any object is still bound).
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): a form view naming a field its object lacks reads with the lint's `form-field-unknown` warning in `_diagnostics`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A form section that names a field the bound object does not have (a typo, or a field deleted later) is valid against the view schema, so the `/meta` door saved it, published it and served it with `_diagnostics: { valid: true }`, while the record form skips the field. The `validateFormLayout` lint rule that reports it ran only in the CLI (`os validate`, `os build`, `os lint`).
11+
12+
The served view read (`GET /api/v1/meta/view/NAME`, the strict draft read and the draft preview) now runs that rule on the body it serves and adds each `form-field-unknown` finding to `_diagnostics.warnings`, located at the field reference (for a stored form view item, `config.sections.N.fields.M`) and worded exactly as the rule words it:
13+
14+
- **A warning, not a refusal.** `valid` stays the schema's answer. A draft still saves and a publish is not refused by it.
15+
- **The object the door serves.** Field names are judged against the object the registry serves for each object name the view spells, extensions included. A view whose object does not resolve is not judged, so it gets no warning.
16+
- **Single-item reads only.** The list read (`GET /api/v1/meta/view`) is unchanged and pays no object lookup.

0 commit comments

Comments
 (0)