Skip to content

Commit 0119b3b

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-nnpg3i
# Conflicts: # packages/spec/src/system/metadata-form-zod-reconciliation.test.ts
2 parents e83f4fa + 49a078e commit 0119b3b

71 files changed

Lines changed: 2515 additions & 162 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: 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/i18n': patch
4+
---
5+
6+
fix(console): an empty report index points at the apps that have reports
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
An app's report index with nothing to list, such as Setup's All reports, said only "This app has no reports you can open." It now also lists the other apps whose report index has a report for the reader, each linking to that app's index: an app counts when it ships at least one report whose datasets the reader may read, the same served reports and read rule the index uses. The current app, an app that ships no report, and an app whose reports the reader may not read are not listed. The sidebar entry stays static by design. One key is added in all ten locale packs: `console.reportIndex.otherApps`.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The approval node's field help now opens in business words. Every `.describe()` on the approval
9+
node config (approvers, the approver row, escalation and decision outputs) is the help line the
10+
Studio flow inspector shows under the field, and several opened with a decision id, a storage
11+
column or an enum literal — `excludeSubmitter` named `submitter_id` and the empty-slate policy
12+
values, and the approver `organization` opened with a decision id and the `$root` / `$parent`
13+
tokens. Each first sentence now says what the setting does to the request; the key or literal an
14+
author has to write follows it, and the engineer detail moved to the JSDoc. No key, type, default
15+
or accepted value changed.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/metadata-core': minor
4+
'@objectstack/driver-sql': minor
5+
---
6+
7+
feat(spec): a `percent` field declares its read-only face with `percentDisplay` (`bar` or `plain`)
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: added
11+
12+
A `percent` field had no key to choose how it is drawn read-only, so every host showed a progress bar, even for a rate or a probability (an opportunity's win probability is not progress). `FieldSchema` gains an optional `percentDisplay`:
13+
14+
- **absent** (unchanged): the renderer's default face, the progress bar today;
15+
- **`bar`**: the author pins the progress bar;
16+
- **`plain`**: the percentage as text alone (a stored `0.25` reads `25%`, at the field's `scale`), with no bar.
17+
18+
```ts
19+
probability: Field.percent({ label: 'Probability', percentDisplay: 'plain' }),
20+
```
21+
22+
Display only: the stored value, its validation and its decimal places are unchanged. The key is declared ahead of its renderer: the Studio UI does not read it yet, so every percent field still draws the bar until the console's percent face reads it. No existing metadata changes meaning.
23+
24+
`@objectstack/metadata-core` classifies the new key for field-level security (ADR-0106 D1) as `keep`: it names no field, so a served object schema keeps an authored `percentDisplay` whatever the caller may read. Unclassified, a value that happened to spell a denied field's name (`bar`, `plain`) would have been scrubbed. `@objectstack/driver-sql` classifies it `presentation` in its FieldSchema storage/presentation table: the DDL never reads it.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/metadata-protocol': minor
4+
'@objectstack/objectql': minor
5+
'@objectstack/client': minor
6+
---
7+
8+
feat(spec): a hook can tell the person who saved a record what the save set in motion
9+
10+
Clause-②: yes
11+
Metadata-protocol: added
12+
13+
A `beforeInsert` / `beforeUpdate` / `afterInsert` / `afterUpdate` hook had no way to tell the person saving what the save started, such as sending a deal for approval. The single-record write answer carried `warnings` (advisory validation-rule hits) and nothing else a save could say. Now a hook can attach one message to the save's answer.
14+
15+
- **Spec.** `CreateDataResponseSchema` and `UpdateDataResponseSchema` declare an optional, response-only `notice`: one author-written message, info severity, separate from `warnings`. When more than one call sets it, the last one wins. The key is omitted when no hook set one, and it is never stored on the record. `WriteObservabilityOptions` declares the in-process listener a hook calls to set it, `onNotice(message)`, beside `onFieldsDropped`, `onValidationAdvisory` and `onMentionsWithheld`. Like them it never crosses the wire.
16+
- **metadata-protocol.** `createData` and `updateData` pass the listener and answer the last non-empty message as `notice`. A nested write that a hook or a flow makes inside this one carries its own options, so its notice never reaches this answer.
17+
- **client.** `CreateDataResult` and `UpdateDataResult` declare `notice?: string`, mirroring the two schemas.
18+
- **objectql.** `engine.update` accepts the `onNotice` option. The engine never calls it; it carries it to the hooks with the rest of the caller's bag.
19+
20+
How a hook sets it: read the write's own options bag off `ctx.input.options` and call the listener when it is there.
21+
22+
```ts
23+
const opts = ctx.input.options as WriteObservabilityOptions | undefined;
24+
opts?.onNotice?.('Sent to your manager for approval');
25+
```
26+
27+
A hook whose handler runs as code in the server process (registered with `registerHook`, or a declarative `handler` bound as a function) can call it today. A hook that runs in the sandbox (a `body`, including a `handler` the build lowers into one) cannot yet, and neither can a record-triggered flow: both are follow-up work.
28+
29+
Nothing to do for existing clients: a client that does not read `notice` sees the same answer as before.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): a `record:path` block may opt in to `allowStageChange`, so a stage can be pressed to move the record there
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: added (record:path allowStageChange)
9+
10+
A `record:path` block draws the status field's stages as a progress rail, and nothing on it can be pressed: moving a deal to the next stage means opening the edit form and changing the picklist.
11+
12+
- **Spec.** `RecordPathProps` (`ComponentPropsMap['record:path']`) declares an optional boolean `allowStageChange`. Off unless authored, with no schema default, so every existing path keeps its read-only look and parses exactly as before. Any value other than a boolean is refused at the key.
13+
- **Meaning.** With the key on, each stage the reader may move the record to is a button, offered only to a reader who may edit `statusField`. A press asks for confirmation, then saves `statusField` through the same record update `record:details` uses, carrying the record's concurrency token, so the object's state machine validation and the field's edit rights decide the move like any other edit. A refused move (an illegal transition, a missing required field) is shown in place. Nothing new is judged on the server.
14+
- **Renderer.** The console does not read the key yet; the path stays a readout until the `plugin-detail` path renderer honours it. The block's registry does not publish the input until then.
15+
16+
Nothing to do for existing pages. Once the console honours it, add `allowStageChange: true` to a `record:path` node's properties to let readers change the stage from the path.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): `os migrate meta --stored` lists a stored `connector_action` node whose `connectorConfig.input` carries a `{…}` token, which boot refuses
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** The stored-shape listing judged a flow node's value slots with the node's `config` alone, so it never read the value slot rooted in a `connector_action` node's `connectorConfig.input`. A stored flow with `input: { text: '{record.name}' }` was refused by `registerFlow` at boot (skipped with a `warn`, its trigger not armed), yet the preview listed nothing for it.
11+
- **Now.** The listing hands the value-slot judge the whole node, as `registerFlow` and `objectstack validate` do, so it lists such a value as a TODO under the `connector-action-input-value-slot-judged` entry, by flow, node and path (`connectorConfig.input.text`), with the value's CEL spelling. A loose `config.input` the conversions lift onto `connectorConfig` is listed at its lifted path. Nothing is rewritten.
12+
- **Unchanged.** A `config` value slot is listed under `flow-value-slot-template-dialect-refused`, as before. A CEL value envelope or a literal in `connectorConfig.input` is not listed.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/service-analytics': patch
3+
---
4+
5+
fix(service-analytics)!: the dataset draft preview mints and judges a measure the dataset does not declare as the live strategies do, so a misspelled measure is refused `INVALID_FIELD` instead of answered as a row count
6+
7+
Clause-②: no (narrowing) — a draft-preview dataset query (`queryDataset` with `previewDrafts: true` over a pending seed draft) now refuses a selected measure that the native and ObjectQL strategies refuse, which it served before. Nothing is widened: no export, answer member, error code or status is added.
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export or type changes: the draft preview now answers an undeclared measure the way the published dataset already answers it. The refusals are the live faces' existing ones, so there is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** accept-set narrowing on the draft preview of `queryDataset` (`@objectstack/service-analytics`).
13+
14+
- **Before.** The preview read every measure the dataset does not declare as `count(*)`. A misspelled `nope` or `ghost_avg` answered a row count per group under the typo, where both live strategies refuse it `INVALID_FIELD` / 400 ("Measure 'nope' on cube … aggregates field 'nope', which object … does not have. Valid measures: …"). A working spelling read the wrong number too: `amount_sum`, or a bare `amount`, answered the row count where the live strategies answer `SUM(amount)`.
15+
- **Now.** The preview mints an undeclared measure with the live strategies' own mint (the `<cube>.` qualifier rule, then the `_sum` / `_avg` / `_min` / `_max` / `_count_distinct` suffix convention, a bare field name meaning its sum) and asks the same gates before it reads a seed row: a field the object does not have is refused `INVALID_FIELD` / 400 with the same message; an aggregate the field-type table refuses (`region_sum` over a text field) is refused `INVALID_FIELD` / 400; a spelling that is not a column reference (`amount + 1`) is refused `PERMISSION_DENIED` / 403; and the field-level read gate judges a minted measure by the field it aggregates.
16+
- **Answers that change value.** On the preview, the answer for an inferred measure over a real field (`amount_sum`, `amount`, `amount_avg`, …) changes from a row count to the live value, the number the published dataset serves.
17+
- **Unchanged.** A declared measure, a duration measure, a derived measure and the undeclared `count` serve what they served. The live strategies are unchanged.
18+
- **Who sees it.** A Studio author whose draft widget names a measure the dataset does not declare: a typo now shows the refusal it meets once published, instead of a plausible count.
19+
20+
**The remedy.** Name a measure the dataset declares, or spell an inferred one over a field the object has (`<field>_sum`, `<field>_avg`, …).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/platform-objects': patch
4+
---
5+
6+
fix(spec): the permission-set form's Name help says when the name is filled from the label, and when to type it
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The Console's create form fills a new permission set's Name from the Label's Latin letters and digits only, so a label written all in Chinese or Japanese fills nothing. The Name help used to say the name is derived from the label in every case, so a zh-CN or ja-JP administrator saw an empty, required Name under a hint that said it had been filled. The help now names both outcomes: filled from the label's Latin letters and digits, otherwise typed by the administrator, in snake_case. The zh-CN, ja-JP and es-ES translations follow. No schema, accepted value or create behaviour changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
---
4+
5+
fix(plugin-approvals): a revise-window recall on a batch sign-off item resumes the batch, which records the item as cancelled and goes on
6+
7+
Clause-②: no (a batch run that nothing could wake after the recall now continues, in the shape the cancelled-item ruling already set; no schema, accept set, error code or result field changes)
8+
Metadata-protocol: none
9+
10+
A batch sign-off is a `map` node over the items, and each item's run parks on its own `approval`. When the submitter recalled an item from the revise window, the recall cancelled the item's run with `cancelRun`, which never touches the parent. The batch run stayed parked on that item with no request open for the next one, and nothing woke it short of an operator resuming the batch run by hand.
11+
12+
- **Now.** After the cancel, the recall resumes the batch run parked on that item. The map records the item's slot as `{ $status: 'cancelled', $itemRunId }`, leaves it out of `count`, and opens the next item, or runs on past the map when it was the last one.
13+
- **Only the built-in `map`.** A run is woken only when it is parked at a `map` node on that item's run. Any other node parked on such a link is left alone, because nothing records the cancelled item for it.
14+
- **Failures are told the way the recall tells its own.** A batch resume the engine refuses or strands does not fail the recall: the withdrawal stands, `resumeError` says which run did not move and why, and an engine-stranded batch is reported on `resumeFailure` with code `RESUME_FAILED`.
15+
- **Unchanged.** A recall while the request is still `pending` (the item resumes down `reject` and the map records its output), a revise-window recall with no batch above it, and a batch whose items are all decided.

‎content/docs/api/data-api.mdx‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,13 @@ the requester's own answer only. The comment is saved
239239
with every mention, and nothing about the withheld users is stored on it. With
240240
nobody withheld, the key is absent.
241241

242+
When a hook on the write tells the person who saved what the save set in motion
243+
("Sent to your manager for approval"), the answer also carries `notice`: that one
244+
author-written message, info severity, separate from `warnings`. Show it with, or
245+
in place of, your own success message. If more than one hook sets it, the last one
246+
wins. A hook on a nested write never reaches it, nothing about it is stored, and
247+
with no notice set the key is absent.
248+
242249
### `PATCH /data/:object/:id`
243250

244251
Update an existing record (partial update).
@@ -249,6 +256,8 @@ Update an existing record (partial update).
249256
A `sys_comment` update answers `withheldMentions` the same way, for the mentions
250257
the update added. A mention the comment already carried is not judged again.
251258

259+
It answers `notice` the same way as a create, when a hook on the update set one.
260+
252261
### `DELETE /data/:object/:id`
253262

254263
Delete a record.

0 commit comments

Comments
 (0)