Skip to content

Commit 3eb2bcf

Browse files
committed
Merge origin/main into claude/project-thread-zjehmt
Keeps both extraFields entries (lockOperandFields and #37449's quantityUnitFields) in objectGridRowLoad.ts.
2 parents c07eb98 + f71d488 commit 3eb2bcf

628 files changed

Lines changed: 27020 additions & 2872 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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@objectstack/runtime': patch
3+
'@objectstack/mcp': patch
4+
---
5+
6+
Clause-②: yes (widening)
7+
Metadata-protocol: none
8+
9+
The `no_confirmation_service` refusal (`428 ACTION_CONFIRMATION_REQUIRED`) of the MCP `run_action` and `resume_run` tools now names the route that works on the door that asked. On every door it says that a person performs the action in the app and that the same change must not be made with another tool. On the stdio door, for a client that did not advertise `elicitation`, it also says that a client that supports confirmation is asked in place on that server. The Streamable HTTP door, which asks no client, does not carry that sentence. The code, the status and `details` are unchanged. No type is made optional: `McpActionCallDoor` is unchanged, and it is still passed only when the client can be elicited. The added, optional surface is a new exported type `McpActionCallDoorFacts` (`{ elicitsCapableClients?: true }`) and an optional fourth parameter `facts` on `McpActionBridge.runAction` and `resumeRun`. The tools pass it, after an `undefined` door, only for a stdio client without `elicitation`. A bridge that does not read it compiles and answers as before.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The MCP `query_records`, `aggregate_records` and `get_record` tool descriptions now say what a refusal's `notRecorded` member means: what it names is not recorded in this app, so the model follows the refusal's `ifNotRecorded` sentence and never reports 0 or empty for it. The refusal members and their sentences are unchanged. A `where` (or an aggregation `filter`) that carries the search companion key `__search` beside a field the caller's schema does not show no longer names `__search` in `notRecorded.fields`: the key is the engine's own search column, never a field the caller's app records.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/platform-objects': patch
4+
'@object-ui/core': patch
5+
'@object-ui/fields': patch
6+
'@object-ui/types': minor
7+
'@object-ui/components': patch
8+
'@object-ui/plugin-grid': patch
9+
'@object-ui/plugin-list': patch
10+
'@object-ui/plugin-detail': patch
11+
---
12+
13+
feat(fields): a quantity displays with its unit's label and display decimal places in grid, form and detail (ADR-0158 R1 display)
14+
15+
Clause-②: yes (widening)
16+
Metadata-protocol: added
17+
18+
A `number` field that declares `unitConfig` now draws its unit beside the number on every face: grid and list cells, the record page (sections, highlights, the quick-look panel, related lists), and the form, both read-only and beside the edited box. A `fixed` quantity shows its one unit; a `record` quantity shows the unit its row's code field holds, and the list, grid and related-list reads fetch that field (and the row's organization) even when no column shows it. A `text` field declaring `unitConfig: { unitMode: 'code' }` shows the code's label.
19+
20+
- A standard code (`KGM`, `H87`, …) shows the platform's name for it in the reader's locale; an organization code shows its `sys_unit` label. `@objectstack/spec` now exports the English base name of every standard code, `STANDARD_UNIT_NAMES` and `standardUnitName(code)`, beside `STANDARD_UNITS`. `@objectstack/platform-objects` serves each locale's names through the i18n service, as `messages.standardUnit<CODE>` in every platform bundle, and a reader without a translation falls back to the English base.
21+
- Decimal places: a standard code takes its organization's `sys_standard_unit_setting` row, an organization code its `sys_unit.decimal_places`. The row is the record's own organization's, never merely the first one returned. The field's `scale` is the ceiling (ADR-0158 L4). The number is drawn at that fixed width, rounded half away from zero (ADR-0158 Open item 6, ruled A): `1.5` beside a unit of 0 places reads `2`. Only the display rounds; nothing is rounded at write, and footers, exports and the API keep the exact value.
22+
- A retired organization unit, and a unit whose row the reader may not read (an external member holds no `sys_unit` read), show the bare code, never an error.
23+
- One resolver (`resolveQuantityUnit` in `@object-ui/core`) and one formatter (`formatQuantity` in `@object-ui/fields`) serve every face.
24+
- `@object-ui/types`: `unitConfig` is now an authorable key on `FormField` and `FormFieldSchema` (by reference to the spec's `FieldSchema.unitConfig`, beside `currencyConfig`), so `objectui validate` accepts it on a hand-authored form field. The tolerant face now checks its value against the spec's `UnitConfigSchema`, where before it passed as an unknown key. On the form face the `number` widget reads it, and on a `text` field `unitMode: 'code'` makes the text widget the unit picker.
25+
- A unit code field is chosen, never typed (ADR-0158 Open item 8): a `text` field declaring `unitMode: 'code'`, and the `unitField` a `record` quantity on the same form points at, draw a searchable picker (`UnitCodeField`) of the organization's non-retired units and the standard codes, each by name and restricted to the declared `unitDimension`. It stores the code; read-only, it shows the unit's name. `@object-ui/core` exports the option list (`unitPickerOptions`) and the pointer helpers (`quantityUnitCodePointers`, `withUnitCodePointer`, `declaresUnitCode`).
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/platform-objects': patch
4+
'@objectstack/plugin-security': patch
5+
'@objectstack/cli': patch
6+
---
7+
8+
feat(platform-objects): an organization sets how many decimal places each standard unit of measure displays with (`sys_standard_unit_setting`, ADR-0158 U6)
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
An organization administrator can now give any standard unit of measure (UN/ECE Recommendation 20 codes such as `KGM` or `H87`) its own display decimal places, for example 3 for grams at a jeweller or 0 for kilograms at a gravel yard. The value lives in the new organization-owned object `sys_standard_unit_setting` (Setup → Configuration → Standard Unit Settings): one row per standard code, `decimal_places` a whole number from 0 to 12. Deleting the row clears the setting. The organization's own units keep their decimal places on their own `sys_unit` row.
14+
15+
- Every member reads the settings (`member_default`, read only); organization administrators and owners create, edit and delete them (`organization_admin`). External members get no read, as with `sys_unit`.
16+
- `organization_id` is injected and stamped on every row. Under the `isolated` tenancy posture the tenant wall (ADR-0095 D1) confines every read and write to the caller's organization, so another organization's setting is never read. As with every organization-owned object (ADR-0105 D1), the `single` posture raises no wall, and the `group` posture walls by membership, so a member of several organizations can read each one's settings.
17+
- Every set, change and clear is written to `sys_audit_log`, with field history on both columns.
18+
- The value is a display default only (ADR-0158 L4): a field's own `scale` stays the storage ceiling, and nothing is rounded at write by it. No reader ships in this change; the quantity display card (#35490) will read it.
19+
- Like an exchange rate, a setting is a record the organization owns, so an organization delete is refused (`DELETE_RESTRICTED`) until its settings are deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): the `metadata.endpoints.maintenance` describe names the unit code backfill door `POST /meta/_migrate-unit-codes` beside the record-currency one, which the switch already mounts and removes
6+
7+
Clause-②: no
8+
Metadata-protocol: none
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-ui teaches `navigation: { openNewTab: true }` for a list that opens records in a new tab
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Step 5 of the record-page rules told authors to omit `navigation.mode: 'new_window'` on an object's list and named no replacement. It now says a list that wants a new tab writes `navigation: { openNewTab: true }`, and that a phone opens the page in place. Text only; nearby prose in the same file is tightened to pay for it.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/data-objectstack': patch
3+
---
4+
5+
feat(data-objectstack): `MetadataClient.publish` sends `draftVersion`; `updateView` pins its draft write to the draft it read
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
`MetadataClient.publish(type, name, options)` takes an optional `draftVersion` and sends it in the publish body beside `message`, pinning the promotion to that draft (`409 METADATA_CONFLICT` when the draft moved). Omitted, the body carries no such key and the publish is unpinned, as before.
11+
12+
`ObjectStackAdapter.updateView` (Manage views' Rename, Pin and Set as Default) reads a pending draft through `MetadataClient.getDraft`, whose answer carries the draft's `version`, before the layered read it merges from, and writes the merged draft pinned to it (`If-Match`, or `If-None-Match: *` when the read found no draft). A draft another writer changed in between is refused `409 METADATA_CONFLICT` and `updateView` throws the refusal instead of merging over a body it never read. A server whose draft read carries no `version` gets the unpinned write it got before.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
---
5+
6+
fix(app-shell, console): "Save to this view" and the runtime draft bar's Publish publish only the draft they mean
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: added
10+
11+
"Save to this view" (and every save that publishes at once, `saveAndPublishRuntimeMetadata`) pins its publish to the draft its own draft write returned. When another admin's rename, pin or set-default lands on the same view between that draft write and the publish, the publish is refused, nothing is published, and the draft, which now holds that other change, stays pending for review instead of being discarded; the save answers as it does over a draft found pending. The runtime draft bar's Publish is pinned to the draft the bar read and shows: a draft changed since is refused with the server's message and stays pending. Against a server that serves no draft version, both publish unpinned, as before.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
feat(metadata-protocol): `publishMetaItem` refuses a draft that moved since the caller's `draftVersion`
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
`publishMetaItem` reads `draftVersion` (`PublishMetaItemRequestSchema.draftVersion`) and judges it against the draft row the promotion reads, before any authoring rule judges that draft: a token that is not that row's, or a pinned draft that is no longer pending, is refused `409 METADATA_CONFLICT` naming the draft's current token as `currentVersion`, with nothing promoted and the optimistic-conflict audit row recorded as for the other publish conflicts. The promotion stays locked to the same row through the write. Absent, any pending draft is promoted, as before; `parentVersion` still pins the active row.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/rest': patch
3+
---
4+
5+
feat(rest): `POST /meta/:type/:name/publish` takes `draftVersion` in its body, the pin on the draft it promotes
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added
9+
10+
The per-item publish door reads an optional `draftVersion` member from its JSON body, beside `message`, and forwards it to the promotion: a draft that moved since that version (another writer's draft save landing between a caller's draft write and its publish) is refused `409 METADATA_CONFLICT` with the draft's current version as `currentVersion`, and nothing is published. A present `draftVersion` that is not a string is refused `400 VALIDATION_ERROR` instead of being read as absent. `If-Match` / `If-None-Match: *` keep pinning the active row, as before.

0 commit comments

Comments
 (0)