Skip to content

Commit 8fa217b

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-bhuiyr
# Conflicts: # ui/packages/components/src/renderers/complex/data-table.tsx # ui/packages/plugin-grid/src/__tests__/ObjectGrid.cellSelection-35684.test.tsx
2 parents 1f89d0a + 7dd1a2f commit 8fa217b

145 files changed

Lines changed: 5787 additions & 1278 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/scenarios': patch
3+
---
4+
5+
fix(scenarios): an irreversible operation the agent applied with its own `confirm: true` fails `pending_confirmation` again: the temporary relaxed grade is off, and its names are deprecated
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The scorer carried a temporary rule: a `pending_confirmation` operation was also met when the agent applied it through a business action declaring `ai.requiresConfirmation: true`, sending `confirm: true` itself, on an ask that named the target row. It existed because the platform could not tell a person's confirmation from the caller's own. The platform now refuses the caller's own `confirm`, and hands a gated call without it to the person, so the rule is off: `AGENT_CONFIRMATION_MEETS_PENDING` is `false`, and every `pending_confirmation` operation is graded strictly again (the agent asks first and writes nothing; the person's confirmation turn grades the write after it, as before). On the runner's door the hand-off of a call without `confirm` (`ACTION_CONFIRMATION_REQUIRED` on a host with no pending-confirmation service) reads as the agent stopping with nothing applied, which meets `pending_confirmation`; a call that still carries `confirm` is refused, and an agent that stops on that refusal fails.
11+
12+
No export is removed. The rule-only names stay exported and are marked `@deprecated`, to be deleted in the next major: `AGENT_CONFIRMATION_MEETS_PENDING`, `confirmedByAgent`, `AgentConfirmedObservation`, `AgentConfirmationRule`, `OperationObservation.agentConfirmed`, `GradeOperationOptions.agentConfirmation`, `GradeOperationOptions.acceptAgentConfirmation`, `actionGatesOf` and `ConfirmationTally.confirmedByAgent`. Until then a direct `gradeOperation` call that still wants the relaxed reading passes `acceptAgentConfirmation: true`; `gradeCardOperation`, and so the runner, takes no such option. `askNamesTarget`, `AskNaming`, `askedFirst` and `OperationGrade.confirmation` are unchanged: the confirmation turn reads them.
13+
14+
The scorecard's card line no longer says the agent's own confirmation is "accepted until real human confirmation lands"; a record that still counts one says it was met only under the retired relaxed grade.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/service-analytics': patch
4+
---
5+
6+
feat(units): a raw total over a `record`-mode quantity is refused unless it groups by the quantity's unit field
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
ADR-0158 U7 R1, mirroring ADR-0144 D6 and its record-currency doors. A `number` field declaring `unitConfig: { unitMode: 'record', unitField }` holds a bare quantity whose unit is each row's code in `unitField`. Before this change, `sum` over a row of 10 KGM and a row of 10 LBR answered `20`, and a `summary` roll-up over such child rows stored `20`.
12+
13+
- **The engine aggregate** (`@objectstack/objectql`, `ObjectQL.aggregate`): `sum`, `avg`, `min` or `max` over such a quantity is refused `INVALID_FIELD` / 400 before any driver is asked, unless the query's `groupBy` includes the quantity's `unitField`. The message names the quantity, its unit field and the grouping to add.
14+
- **A `summary` roll-up** (`@objectstack/objectql`, object registration): a `summary` that rolls up `sum`, `avg`, `min` or `max` of such a child quantity is refused `INVALID_METADATA` / 422, whichever object registers second. In R1 every such roll-up is refused: a child quantity cannot follow its parent's unit yet. Roll up with `function: 'count'`, or total the quantity with an aggregate grouped by its unit field.
15+
- **Analytics** (`@objectstack/service-analytics`): a dataset or cube measure of type `sum`, `avg`, `min` or `max` over such a quantity is refused `INVALID_FIELD` / 400 unless the query has a dimension over the unit field, on every cube path (declared, inferred, augmented), every `totals` grouping and the draft preview.
16+
- **The widening.** `AnalyticsServiceConfig.sourceFieldMeta` may answer one more optional key, `unitField`: a `number` field's `unitConfig.unitField`, under `unitMode: 'record'` only. `AnalyticsServicePlugin` relays it for a `number` under `unitMode: 'record'` and for nothing else. A host that does not answer it gets no record-unit judgment from the cube door; the engine aggregate door still refuses the same query on the ObjectQL strategy.
17+
18+
Not judged: `count` and `count_distinct`, a `fixed`-mode quantity, and a `number` field with no `unitConfig`. No new error code.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
fix(objectql): a system-context delete of a record with no organization now keeps it in the recycle bin instead of failing on `sys_recycle_bin.organization_id`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A delete made under `{ isSystem: true }` (the context flows, hooks and admin tooling use) of a record that names no organization, such as a record of a `tenancy: { enabled: false }` object, wrote its recycle-bin entry with no organization. On a SQL store, where the bin's tenant column is NOT NULL, the delete failed with `NOT NULL constraint failed: sys_recycle_bin.organization_id` and the record stayed. On the memory store the delete succeeded but left an entry no organization owned.
11+
12+
The entry now takes the organization any system-context insert takes (ADR-0131 D9): the record's own, else the context's, else the organization the engine derives. Under the `single` posture that is the Default Organization, so the record lands in the bin and can be restored. Under a walled posture (`isolated`, `group`), where no owner can be derived, the delete is refused with `ERR_SYSTEM_WRITE_ORGANIZATION_REQUIRED` before the record is removed, as a system insert is. A caller that deletes there passes the organization on the context (`{ isSystem: true, tenantId: '...' }`).

‎.changeset/35684-35687-list-cells-select-first.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Skills-docs: none — `skills/objectstack-ui/rules/list-views.md` already teache
1818
**The select-first cell model** (`data-table`, behind the new `GridCellSelectionProvider` in `@object-ui/components`; `ObjectGrid` mounts it when its host passes the new `cellSelection` prop, and `ListView` passes it for every `object-grid` view it draws, on the hosts listed below):
1919

2020
- A click selects a cell (a ring around it) and neither edits it nor opens the record. A link the cell draws (the name, a lookup, a phone or an email) keeps its own click. A touch tap opens the record and never edits in place.
21-
- Double-click, Enter or F2 edits, keeping the value with the caret at its end; typing a character replaces the value with it (a picker or a date opens instead); Backspace or Delete opens an empty editor and saves nothing.
22-
- While editing, Enter commits and moves down, Tab and Shift+Tab commit and move right and left, Escape cancels and keeps the cell selected; in a multi-line editor Enter is a new line and Ctrl/Cmd+Enter commits. Commits are the grid's staged edits, saved by the row's Save and Save All as before.
21+
- Double-click, Enter or F2 edits, keeping the value with the caret at its end; typing a character replaces the value with it (a picker or a date opens instead); Backspace or Delete clears the cell and saves at once, and a required field keeps its value and says it is required (objectstack#36023).
22+
- While editing, Enter commits and stays on the cell (objectstack#36023), Tab and Shift+Tab commit and move right and left, Escape cancels and keeps the cell selected; in a multi-line editor Enter is a new line and Ctrl/Cmd+Enter commits. Commits are the grid's staged edits, saved by the row's Save and Save All as before.
2323
- On the selected cell the arrows and Tab move the selection, Space opens the record (a checkbox cell flips and commits instead, as a second click on it does), Ctrl/Cmd+C copies, Ctrl/Cmd+V converts the text to the field's type and commits it, and Escape clears the selection.
2424
- An input method's composition is kept whole: keys pressed while composing, and the 229 Enter Safari raises after it, never commit, cancel or move, and a composition started on a selected cell opens the editor with the composed text. This guard applies to every `data-table` editor.
2525
- A cell that opens no editor says why on the cell: the field is read-only, calculated or not editable in a list, the reader may not edit the field, these records or this record, the view turned editing off, or the record is locked by an approval. The approval lock is read from the approvals service's per-record lock when a cell of the row is selected, through the record page's rule (`resolveApprovalLock`); until it answers, the row's `approval_status` stands in only where the view fetches that column, which a view that authors its columns does only when a column, a row predicate or a grouping names it.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): cloning a record whose file fields are set answers 201
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`POST /data/:object/:id/clone` with no `overrides` answered `400 VALIDATION_FAILED` ("… has an invalid file value: … expected string, received object") for any record holding a file in a `file`, `image`, `avatar`, `video` or `audio` field, single or `multiple`. The clone read the source the way the caller reads it, with each file expanded to its `{ id, name, size, mimeType, url }` object, and inserted that object back; the insert takes a file field's stored value, the `sys_file` id, only.
11+
12+
The clone now reads the source's file fields in their stored form (the bare id, or the list of ids for a `multiple` field). Each one then follows the same rule a clone naming the id in `overrides` already followed: the file's bytes are copied into a new `sys_file` that the clone's field owns, and the source record keeps its own file. A file field named in `overrides` still takes the override. Because a clone with no body now reaches that same copy step, it also gets that path's answer when a source file's `sys_file` row exists but its stored bytes are missing: `500 FileReferenceCopyError`, the error the `overrides` path already returned in that case.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/plugin-auth': patch
3+
---
4+
5+
fix(plugin-auth): a kernel without SSO answers 404 again on the SSO discovery endpoints, with no error log
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Since SSO discovery began connecting only to addresses that are public at connect time, a kernel that does not mount SSO (the default without `OS_SSO_ENABLED` or `plugins.sso`) answered `POST /sso/register`, `/sign-in/sso` and `/sso/callback/*` with `503 SERVICE_UNAVAILABLE` ("SSO is unavailable: this server cannot judge its reads of an identity provider") and logged one error line per request. The discovery scope opened on the path alone, while the adapter observer it requires is mounted only with SSO.
11+
12+
The scope now opens only when the built auth instance mounts the vendor's `sso` plugin, read off the composed plugin list rather than the configuration re-read at request time. A kernel without SSO answers the vendor's own 404 on those paths and logs nothing. A kernel that mounts SSO is judged exactly as before: provider reads go through the connect-time guard, and a context whose adapter is not observed is still refused `503` before the endpoint runs. No configuration, export or response shape changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
'@object-ui/plugin-list': patch
5+
---
6+
7+
feat(console): a change on a list is a draft, with Discard and Save
8+
9+
Clause-②: yes (widening) — new `console.objectView.draft.*` keys in every `@object-ui/i18n` locale pack (`discard`, `discardTitle`, `save`, `heading`, `partSeparator`, `saveToView`, `saveAsMyView`, `copyName`, `saved`); nothing removed or renamed
10+
Metadata-protocol: none
11+
12+
On a Console object list, a header sort, a filter change, grouping, the search, Hide Fields, an added field and a column drag apply at once and are now a draft: they are kept nowhere. They used to be saved at once into the reader's own list preference (`sys_user_preference`, key `ui.list.<object>`) and followed them to every device.
13+
14+
- While the list holds a draft, **Discard** and **Save** sit at the end of the condition row, where the 「Personalized · Reset to view」 marker was. On a narrow list or a phone they fold into one **Save** whose menu also holds Discard.
15+
- **Save** names what is unsaved and offers **Save to this view** (on a view of the reader's own) and **Save as my view**, which asks a name first (the view's name with "copy"), saves the draft as a new view of the reader's own and opens it. Either says "Saved", and the buttons go while the conditions stay.
16+
- **Discard** puts the list back as its view declares it and removes the list's `uf_*` parameters from the address bar.
17+
- Where the reader may not save (no personal view can be created or updated), both faces are Discard alone.
18+
- The draft survives opening a record (as a page or in the side panel) and coming back. Opening another view or object, or reloading the list's page, drops it. A reload of another page does not drop the state an in-app link to a list carries.
19+
- Column widths, the row height and the views' order are not a draft. They are still remembered for the reader in the same `ui.list.<object>` row.
20+
21+
Upgrade note: a sort, filter, search, column order, hidden column or added column that an earlier Console stored in a reader's `ui.list.<object>` row no longer applies; the list opens as its view declares it. Nothing stored is deleted by this change; a later column-width change rewrites that row's column state with the widths alone. A reader who wants such a list kept saves it as a view of their own.
22+
23+
Saving into a shared view, and saving the Display panel's layout and row colour, are not offered yet. `@object-ui/plugin-list` changes only its README, which now describes added fields as part of the draft. No metadata key, value or default changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
---
4+
5+
fix(driver-sql): on Oracle, a read scoped by a parent with a RAW(16) uuid key answers its rows on a driver that has not read the parent yet
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A child read whose composed `ReadableIds` scope names a federated parent with a `RAW(16)` uuid key, such as the read plugin-security derives for a `controlled_by_parent` object, answered no row on Oracle, and its negation answered every row, with no error. It recovered only once something had read the parent on that driver. The driver reads a federated table's `RAW(16)` columns from the Oracle catalog before it binds a comparand, and it read them for the door's own object only, so the parent's ids bound as text and Oracle compared them with the column's upper-case hex.
11+
12+
Each door that compiles a filter (`find`, `findOne`, `count`, `distinct`, `aggregate`, its measure filters and its joined parents, `updateMany`, `deleteMany`, `findWithWindowFunctions` and `analyzeQuery`) now also reads the `RAW(16)` columns of every object a composed `ReadableIds` scope in that filter names, at any depth. The parent's ids bind through `HEXTORAW`, for a list of ids and for the share-grant subquery alike. Nothing changes for any other dialect.

‎.changeset/35970-catalog-units.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The platform catalog (`objectstack-project/references/platform-catalog.md`) now lists units of measure as shipped. `sys_unit` has a row beside `sys_exchange_rate`, and the row names the declaration that uses it: `unitConfig` on a `number` field (`unitMode: 'fixed'` with `unit`, or `'record'` with `unitField`) or on a `text` field that holds a unit code (`unitMode: 'code'`). A stored code is a standard UN/ECE Rec 20 code or one of the organization's own units, added in Setup, so an app no longer builds a unit table or a unit picklist. The Planned row narrows to what is still missing: showing the unit beside a quantity, totals per unit and conversion. The page no longer describes an interim unit field, and `objectstack-data` eval 22 expects the shipped answer.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
'@object-ui/plugin-view': patch
5+
'@object-ui/i18n': patch
6+
---
7+
8+
fix(ui): a view a read-only package ships hides only Delete in Manage views and opens its view panel read-only
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
This applies to a list view that ships inside a read-only package (a code or installed package). The console no longer offers that view the two writes the server refuses:
14+
15+
- Manage views hides Delete on its row.
16+
- The row's configuration entry reads "View config". It opens the admin's view panel read-only: the configuration is shown read-only, no edit reaches the list, and there is nothing to save. The panel has no Save, no draft bar to publish or discard, and only Close.
17+
18+
Rename, pin and set as default stay offered. They land in that package's customization (the console creates it on first use), so no lock icon is drawn on the row. The list's options menu offers Rename on such a view again. A shared view the console saved into the customization package, and the reader's own view, are unchanged. The toolbar's personal list changes keep saving to the reader's preferences.
19+
20+
`@object-ui/plugin-view`: `ViewTabItem` gains an optional `definitionReadonly` field. When it is `true`, `ManageViewsDialog` hides Delete and labels the configuration entry "View config" (`view.showViewConfig`, a new key in every locale of `@object-ui/i18n`). Rename, pin, set as default and the configuration entry stay. `readonly` still wins when both are set. Without the field a row behaves as before. `ViewTabBar` does not read it.
21+
22+
The read-only verdict is the one the footer calculation menu already uses. The console takes the package the view row was served under and reads the server's `writable` verdict for it from the package list it holds for the session. While that list is unread, or when the read fails or does not name the package, everything stays offered as before and the server's refusal still applies. The view panel reads the same answer that drew the Manage views row, so a row's "View config" never opens an editable panel. If the answer arrives after the admin has started editing, the panel turns read-only and discards the edit: the list's preview goes back to the stored view.

0 commit comments

Comments
 (0)