Skip to content

Commit e2133d6

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/sec2-ph96
2 parents 37b748d + fecd2e9 commit e2133d6

149 files changed

Lines changed: 6944 additions & 447 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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/driver-sql': patch
4+
'@objectstack/objectql': patch
5+
'@objectstack/service-analytics': patch
6+
---
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: added — `supports.zonedDateBucketing` is a new key a driver author can write on `DriverCapabilities` (`DriverConfig.capabilities`), recorded in `packages/spec/authorable-surface/data.json`.
10+
Skills-docs: follow-up #34597
11+
12+
PostgreSQL now buckets a non-UTC reference timezone in the database (ADR-0053 Phase 2 D2 as amended). A dashboard grouped by day, week, month, quarter or year in a zone such as `Asia/Taipei` or `Europe/Berlin` no longer pulls every scoped row into the application on PostgreSQL: the bucket is computed by `to_char((col)::timestamptz AT TIME ZONE $zone, …)` with the zone bound, DST-correct, and its labels equal the in-memory ones. A `Field.date` keeps its calendar day under every zone.
13+
14+
- `@objectstack/spec`: new driver capability bit `supports.zonedDateBucketing`, and `DriverAggregateQuery` (a `DriverQuery` plus `timezone`), the query `IDataDriver.aggregate` receives. Additive; existing drivers keep compiling and keep today's path.
15+
- `@objectstack/objectql`: `engine.aggregate` resolves the request's `timezone` through the runtime first. A name that resolves to `UTC` (`Etc/UTC`, `GMT`, `Zulu`) takes the native UTC path; an area/location name (`CST` resolves to `America/Chicago`) is pushed down as the resolved name to a driver that declares the bit; anything else stays in memory, as before.
16+
- `@objectstack/driver-sql`: declares the bit on PostgreSQL only. SQLite (no tz database), MySQL, SQL Server and Oracle keep the in-memory path. A zoned `aggregate()` call made directly against a dialect without the bit is refused `NOT_IMPLEMENTED`/501, and a zone string that is not its own resolved area/location name is refused `INVALID_QUERY`/400, instead of being read as UTC.
17+
- `@objectstack/service-analytics`: the `/analytics/sql` dry-run refusal for a non-UTC zone now says the query is bucketed in the database or in memory depending on the driver.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(app-shell): a record under approval shows the approver one folded band: a status line, the two decisions as buttons, and one menu for the rest
7+
8+
Clause-②: yes (widening — new @object-ui/i18n en keys only; no metadata/schema accept set)
9+
Metadata-protocol: none
10+
11+
An approver who opens a record under approval used to see every declared decision action as its own button above the page body (Approve, Reject, Reassign, Send back, Request info, Reply, and Recall for an approver who also submitted), beside the record's own action row in the header. The band is now folded for any viewer the server says can act (`viewer.can_act === true`) once more than two of its actions are shown:
12+
13+
- a status line names the task, the step's number on the served route and its label, and the submitter ("You submitted this" for an approver who also submitted);
14+
- the actions whose declared `variant` is `primary` or `danger` (today Approve and Reject) stay buttons; on a phone they share one row at equal width;
15+
- every other action, including one declared with no variant, goes into one neutral "More approval actions" menu. Reply stays in that menu, so it is reachable on every layout.
16+
17+
The business record page and the approval request page draw the same band. Each folded action keeps its own `visible`, `disabled` and permission gates and its own dialog, and sends the same request. Menu actions still count as drawn for `onDrawnActionsChange`. The record's header actions do not move.
18+
19+
Unchanged: the submitter who holds no slot, the override-only administrator (who keeps the existing admin-override fold), a backend that sends no `viewer` block, and any host that does not pass the new `foldDecisions` prop to `DeclaredActionsBar`.
20+
21+
New `@object-ui/i18n` keys, in every pack: `approvalsInbox.awaitingYourDecision`, `approvalsInbox.stepNumber`, `approvalsInbox.submittedByName`, `approvalsInbox.moreDecisionActions`.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
fix(spec)!: a `record:activity` feed whose `types` leaves out `comment` is refused while its comment composer is on
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: narrowed
9+
Skills-docs: follow-up #34534
10+
11+
<!-- adr-0087: registered record-activity-types-without-comment-beside-composer-refused -->
12+
13+
**BREAKING** for a page whose `record:activity` block (or the `feed` of a `record:chatter` / `record:discussion` block) authors a `types` list without `'comment'` while `showCommentInput` is not `false`. `types` is the allow-list of feed item kinds the feed shows, and `comment` is one of them, so on such a feed a comment posted through the composer was stored and then filtered out of the very feed it was posted to. The `record:activity` renderer already withholds the composer on such a feed; the contradiction is now refused where it is written.
14+
15+
What moves (each line FROM → TO):
16+
17+
- `RecordActivityProps` (`@objectstack/spec/ui`, the `record:activity` row of `ComponentPropsMap`) with `types` present, `'comment'` not in it, and `showCommentInput` absent or `true`: FROM parsed clean TO refused with one `custom` issue at `showCommentInput` (the composer the list rules out; `types` itself is not refused) whose message names both fixes. `os lint`, `os validate`, `os build` and the page authoring door report it at error as `component-props-invalid` at `properties.showCommentInput`.
18+
- `RecordChatterProps.feed` (the same object, on `record:chatter` and `record:discussion`): the same, reported at `properties.feed.showCommentInput`.
19+
20+
The fix: add `'comment'` to `types` when the block should take comments, or set `showCommentInput: false` when it should stay comment-free. Which one is a judgement about the block, so nothing is converted (ADR-0087 D3, entry `record-activity-types-without-comment-beside-composer-refused`).
21+
22+
Unchanged: a feed with no `types` (every kind), a `types` that lists `'comment'`, and any `types` beside `showCommentInput: false`. Entries are still never judged against the built-in kinds. Matching is exact, as the renderers match, so `'Comment'` is not the comment kind. Measured first-party exposure: zero — no example app, platform page, skill or docs sample authors `types` on a feed.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
fix(cloud-connection): install-local connects a composed bundle's package-body datasources, judges their names before any write, and names their connector credentials
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A composed bundle (`dist/objectstack.json` with `packages[]`, ADR-0130 D4) carries its datasources, connectors and objects in each package body, and none at the top level. `POST /api/v1/marketplace/install-local` read those three from the top level only. A composed install answered 200, but `connectPackageDatasources` was handed no datasources and no objects, so a datasource declared in a package body was never registered or connected, and the objects bound to it had no driver. The install answer carried no `datasources` and no `credentialRefs`. The held-name check (step 2a) never saw a body's datasource names either.
11+
12+
Install, upgrade and the restart's rehydrate now read datasources and objects through `resolveStackCollection`, the reader the seed datasets and translations already use: the top-level list when the bundle carries one, otherwise every package body's, in package order. A composed bundle now hands the runtime the same lists as the same declarations in a flat bundle, and the answer lists the same `datasources` and `credentialRefs`.
13+
14+
Step 2a now judges every package body's datasource names. A composed install that declares a name another holder owns is refused `409 RESOURCE_CONFLICT` before any write, as a flat bundle declaring that name already was. Before this, such an install answered 200 and left the name with its holder. A `packages` the artifact resolver refuses is answered at this step with the resolver's own `422`, and nothing is written.
15+
16+
The side effects no longer read a top-level array `i18n` as extra translation bundles. `i18n` is a configuration object in the spec, and the boot path never read an array there.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
fix(objectql)!: a multi-row insert counts its earlier rows into the parent summary a field-level `parent.` predicate reads, as one-by-one inserts do
6+
7+
Clause-②: no (narrowing)
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 changes shape. What moves is the summary value a field-level parent. predicate reads during one multi-row insert: no stored row, registry key or authored value changes, so there is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** for a multi-row insert under one master-detail header whose detail object declares a field-level `requiredWhen` that reads a roll-up `summary` of the header (`parent.line_count >= 2`). A bulk create already equals one-by-one creates for a validation rule that reads a parent summary through a reference; this extends that to the header a `requiredWhen` reads as `parent`.
13+
14+
- FROM: `insert(object, rows[])`, `insertMany`, the generic batch create and the import's batched creates read the header once for the batch, so every row judged the summary as it stood before the batch: three bare lines under a header with no lines, against `requiredWhen: 'parent.line_count >= 2'` on `description`, were all admitted.
15+
- TO: each row judges the summary as the batch's earlier admitted rows move it (`count`, and `sum` / `min` / `max` over numbers, the same set the reference arm accumulates): the third line is refused with `VALIDATION_FAILED` (`description`, `required`), as the third of three single inserts is. `insert(array)` refuses the whole batch; `insertMany` reports that row `ok: false` and writes the first two. The multi-row insert preview (`validate` with `mode: 'insert'`, the import's dry run) answers the same.
16+
17+
**Not moved.** A `parent.` predicate that reads a header field that is no summary (`parent.status == 'sent'`), a single-row insert, an update, an unbound header, and an `avg` summary (it keeps reading the stored value) answer as before.
18+
19+
The fix for a caller: supply the field on every row the requirement now names.
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): the Users import wizard maps a manager column, sent to import-users as `manager_id`
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`POST /api/v1/auth/admin/import-users` already reads a `manager_id` column (the manager's email, or phone number where phone sign-in is on, linked after every row lands), but the Users import wizard offered no such target column, so a file's manager column could not be mapped and never reached the request. The wizard now offers `manager_id`, labelled by the `sys_user` field (`Manager`), and its options panel explains the column (`console.identityImport.managerHint`, in every `@object-ui/i18n` pack). What the endpoint accepts is unchanged.
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+
fix(metadata-protocol): the publish probes skip a widget whose dataset does not exist instead of checking the read's envelope
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The by-name read `getMetaItem` answers an item that does not exist with its envelope, `item` empty, not with `undefined`. The publish probes' reader (`publishedItemReader`) fell back to that envelope when it carried no `item`, so a dashboard widget naming a dataset nothing holds was handed the envelope as its dataset. The widget was counted in `checked.widgets`, and its query ran over a body that binds no object, which could report a false `widget_query_failed` on the publish receipt and in `verify_build`. The reader now answers no body when the envelope carries no `item`, so such a widget takes the dangling-dataset path again: an L1 graph finding, not probed and not counted. A dataset that exists is read exactly as before.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/skills': patch
3+
'@objectstack/lint': patch
4+
---
5+
6+
docs(skills): `objectstack-ui` keeps a long form `simple`, and both skills name the `bulk` an `inlineEdit` save needs; `os lint`, `os validate` and `os build` warn when it is withheld
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`skills/objectstack-ui/SKILL.md` § Form Views no longer caps `simple` at 15 fields or sends objects with many field groups to `tabbed`. `simple` (stacked sections on one scrolling page) is the default at any field count. `tabbed` is for sections read apart, and the row names its cost: a required field missed on another tab is flagged only on its tab, and the tab strip overflows on a phone. A new paragraph says how a long form stays `simple`: `collapse: 'collapsed'` on the object's `fieldGroups` entry or `collapsed: true` on a form section, `columns` as a per-row ceiling (unset, a section draws two), and `modalSize` for the New / Edit dialog (unset, `lg` or `xl` by field count). One eval case asks for a 42-field form and fails an answer with `type: 'tabbed'`.
12+
13+
The parent's form saves an `inlineEdit` child's rows with the parent in one `/api/v1/batch`, and that route asks every object in it for `bulk`. Master-Detail Forms in `objectstack-ui` and § Inline Editing in `objectstack-data` `rules/relationships.md` now say so: a parent or child that declares `enable.apiMethods` must list `'bulk'`, or the save is refused `405 OBJECT_API_METHOD_NOT_ALLOWED`. An undeclared `apiMethods` allows it.
14+
15+
A new authoring rule, `relationship/inline-edit-needs-bulk` (`lintInlineEditBulk`, exported with its id constant `RELATIONSHIP_INLINE_EDIT_NEEDS_BULK`), warns on an `inlineEdit` relationship (`true`, `'grid'` or `'form'`) whose parent or child declares `enable.apiMethods` without `'bulk'`: once per object, at that object's `enable.apiMethods`, with a fix line naming the value to add. It is registered for all three commands, so `os lint`, `os validate` and `os build` (and `objectstack dev`) report it. It is advisory and never fails a build. `references/lint-rules.md` lists it.
16+
17+
The skill files pay for most of this by cutting text stated elsewhere, and the `objectstack-ui/SKILL.md` token ceiling moves by the measured remainder.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/types': patch
3+
'@objectstack/plugin-approvals': patch
4+
'@objectstack/rest': patch
5+
---
6+
7+
fix(approvals): a decision stranded by a refused next step says which refusal stranded it
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
Say an approval flow's next step after the decision is an `update_record`, and a record hook refuses that write (a declared refusal, a validation rule, a permission). `POST /api/v1/approvals/requests/{id}/approve` answers `500 RESUME_FAILED`. The status code and the four #13807 facts are unchanged: the decision stands (`finalized: true`), and `runId` and `repairable` name the stranded run. The body did not say why the run stopped. The engine reported the refusal (`AutomationResult.innerRefusal` and `.userMessage`), and the approvals service dropped it before it built the error.
13+
14+
The `RESUME_FAILED` body now also carries that refusal when there was one:
15+
16+
- `innerRefusal`: `{ code, message }`, the same member the flow doors serve in their `FLOW_FAILED` details;
17+
- `userMessage`: the refusal's marked end-user text at the top level, for example a hook's declared sentence in the caller's locale.
18+
19+
Both are absent when the run met a fault rather than a refusal. `StrandedDecisionDetails` (`@objectstack/types`) declares them as optional members, and `strandedDecisionDetails` drops a malformed one without dropping the four facts.
20+
21+
A flow author who wants the refusal handled instead of stranded can draw a `fault` edge from that step. The engine routes the refusal down it, and the decision then answers normally. This is now pinned and documented in the approvals guide.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/plugin-list': patch
3+
---
4+
5+
fix(plugin-list): the list toolbar no longer offers the "In a queue" toggle on a view whose own filter pins `owner_id`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The "In a queue" toggle adds `owner_id is_empty` and `queue is_not_empty` to the list's query. On a view whose own filter already requires an owner, such as a "My records" view filtered by `owner_id equals {current_user_id}`, the two conditions contradict each other, so turning the toggle on always showed an empty list. The toggle is now withheld when the view's filter has a top-level AND condition on `owner_id` with `equals` (a non-empty value), `in` (a list of non-empty values) or `is_not_empty`. A condition inside an OR group does not count, because the other members of the group can still match unowned records.
11+
12+
While the toggle is withheld it adds nothing to the query. If it was on when the user switched to such a view, it is turned off, so switching back to a view that offers it shows it off.
13+
14+
Nothing changes on views without an owner condition, and no metadata or server behaviour changes.

0 commit comments

Comments
 (0)