Skip to content

Commit d074b4a

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-35735-filter-flag-and-comparand-edges
2 parents 2dd91cd + 1d7015a commit d074b4a

101 files changed

Lines changed: 3958 additions & 1247 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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/plugin-sharing': patch
3+
'@objectstack/cli': patch
4+
---
5+
6+
fix(plugin-sharing): a hierarchy scope that falls back to owner-only for want of a resolver now says so once per boot
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
When a permission set grants a hierarchy scope (`own_and_reports`, `unit`, `unit_and_below`) and no `hierarchy-scope-resolver` service is registered (the `hierarchy-security` capability, provided by `@objectstack/security-enterprise`), the sharing layer fails closed to owner-only. It used to do so without a word, so a runtime booted without the CLI gave an operator nothing to explain why every user saw only their own records.
12+
13+
- The first time the fallback is taken, the sharing service logs one `warn` naming the capability, its provider and the owner-only consequence. It is logged once per service instance, which is once per boot, never once per request.
14+
- Nothing is logged for an app that never asks for a hierarchy scope, or when a resolver is registered.
15+
- The answer does not change: the scope still resolves to the caller alone.
16+
- `os validate`, `os verify` and `os serve` no longer end the `hierarchy-security` advisory with "and no log line says so": for that token they now say the runtime logs one warning, opening `[sharing] hierarchy scope NOT widened`, the first time it falls back. Other enterprise tokens keep their wording.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
fix(scenarios): the `travel_expense` figure questions write the measure's own word, so a governed answer is no longer asked back
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Three figure questions of the `travel_expense` card (`paid_reimbursement`, `claims_by_status`, `claimed_last_month`) lifted the word "claims". That word matches no member of the card's datasets. It is a near miss on two `reimbursement` measures, Claimed amount (synonym "expense claims") and Claim count (synonym "number of claims"), so `list_datasets` offers both as candidates and an agent following ADR-0149 D3 asks back instead of answering. This is a card defect: the door behaves as ruled. Each ask now writes a word that matches exactly the measure its truth computes, in English and Chinese: "claimed amount" / 报销金额, "number of claims" / 报销单数, and "expense claims" / 报销金额. The truths, datasets and verified build are unchanged. The build provenance records the new card sha256, so ask-round records split at this card hash.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@objectstack/spec': patch
4+
'@objectstack/formula': patch
5+
---
6+
7+
fix(app-shell): Studio's formula inspector asks whether the formula still computes money before it keeps a `currency` result type
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
When an author edited a formula field in Studio, the inspector re-stamped `returnType` from the expression's inferred CEL type, and kept a declared `currency` under every `number` or unproven verdict, because that type never says "money". So a formula edited from an amount (`record.amount * 0.1`) into a count (`record.est_hours * 2`) kept `returnType: 'currency'` and its `currencyConfig`, and its value was still shown as an amount.
13+
14+
The stamp now also asks `@objectstack/formula`'s `inferFormulaReturn`, over the object's declared fields, whether the edited expression computes money:
15+
16+
- Provably money: `returnType` is stamped `currency`, with the currency the source amounts are in as the formula's `currencyConfig` (absent for the tenant default currency). This holds for a formula that was `number` too.
17+
- An edit it answers `number` for withdraws a declared `currency`: `returnType` becomes `number` and the `currencyConfig` is removed.
18+
- An unproven verdict (a field-over-field quotient, two currencies meeting) keeps a declared `currency`, as before, and so does an engine that does not offer `inferFormulaReturn`.
19+
- A declared `percent` is unchanged: it survives a `number`, unproven or money verdict, and is never re-stamped `currency`. A verdict that proves `text`, `boolean` or `date` still stamps, and now also removes a stale `currencyConfig`.
20+
21+
`@objectstack/formula`'s `inferFormulaReturn` now answers `{}` (unproven) where it used to answer `{ returnType: 'number' }` on the numeric path, unless the unit proof succeeds or every read of the record (`record.x`, `record['x']`, `record.?x`, `record[?'x']`, or a bare `x`) is one segment naming a declared field whose unit can be read and is not money. FROM `inferFormulaReturn('record.rollup * 0.9', fields)` → `{ returnType: 'number' }` TO → `{}`. The same holds for `100 / record.amount`, `record.amount % 3`, `record.amount * 1.0 + record.fee_eur * 1.0` (two currencies), `double(record.amount) * double(record.tax)`, an amount whose `currencyConfig` does not parse, a hop through a reference (`record.account.balance * 0.9`), a formula operand that declares no `returnType` (`record.subtotal * 0.2`), the indexed and optional spellings of an amount (`record['amount'] * 0.1`), and a name the field map does not declare (`record.unknown_field * 2`). A call with no field map therefore answers `{}` for any numeric expression that reads the record (`inferFormulaReturn('record.amount * 0.1')` was `number`). So a `number` answer means "proved not money", and only that answer withdraws a declared `currency`.
22+
23+
What still answers `number` is an expression over declared fields of readable non-money units: number, percent and other plain fields, a formula declaring a non-`currency` `returnType`, and a `count` roll-up whose `summaryOperations` is passed. A bare ratio of two amounts in one currency (`record.amount / record.tax`) types `dyn` and answers `{}`, as before. A caller that read the old `number` for these shapes should read the expression's CEL type (`inferExpressionType`) instead. In Studio, a new formula over such an amount is still stamped `number` from that CEL type.
24+
25+
Widened: the published `FormulaSourceField` type gains one optional member, `summaryOperations` (a `summary` field's roll-up, as declared). A `count` roll-up is read as a plain number only when it is passed. A roll-up passed without `summaryOperations`, a `count` included, is read as possibly money, so an expression over it answers `{}`.
26+
27+
The stamp still runs only after the author edits the expression; selecting a field writes nothing. The `returnType` description in `@objectstack/spec` now says the same: `currency` is stamped when the expression provably computes money and withdrawn for `number` when an edit leaves it a plain number, and a declared `percent` is kept under a money verdict.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
feat(mcp): export the app-docs answer-order rule and its served-check from the package barrel
6+
7+
Clause-②: yes — widening: four new exported symbols on the published `@objectstack/mcp` barrel (`packageDocAnswerRule`, `packageDocToolsServed`, `definitionReaderOf`, `DEFINITION_READER_TOOL_NAMES`); nothing removed or refused. Seat runs a contract read before ready.
8+
Metadata-protocol: none
9+
10+
`@objectstack/mcp` now exports `packageDocAnswerRule(definitionReader?)`, `packageDocToolsServed(bridge, options)`, `definitionReaderOf(toolNames)` and `DEFINITION_READER_TOOL_NAMES`. A host that writes its own `initialize` text (`instructions` / `dataOnlyInstructions`) can carry the same "read the manuals first, end with sources" rule the open server appends to its default text: send it where `packageDocToolsServed` is true, naming the reader `definitionReaderOf` picks from the tool names the connection lists. The open server calls the same exports, so there is one copy of the sentence. Nothing else changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
'@object-ui/components': minor
3+
'@object-ui/core': minor
4+
'@object-ui/plugin-grid': minor
5+
'@object-ui/plugin-list': minor
6+
'@object-ui/i18n': patch
7+
'@object-ui/app-shell': patch
8+
---
9+
10+
feat(list): a list's cells are selected by a click and edited by a double-click, Enter or typing, with no inline-edit toggle
11+
12+
Clause-②: yes (widening)
13+
Metadata-protocol: semantic
14+
Skills-docs: none — `skills/objectstack-ui/rules/list-views.md` already teaches that inline editing is on by default for a user who may update the object, with `userActions: { editInline: false }` as the opt-out, which the list page now does with no toggle; no skill teaches the toggle or a single-click edit.
15+
16+
**The list page (`ListView`) has no inline-edit mode and no toggle.** Its grid is editable in place wherever the reader may update the object and the view does not declare `userActions.editInline: false`; a view's boolean `inlineEdit` still folds into that switch, so `inlineEdit: false` reads off and `inlineEdit: true` reads on. Before, a view that declared neither opened read-only with an "Edit inline" toggle in the toolbar and in the Display menu, the mode lasted for the session, and a click on a cell edited it. Both toggles are gone, and `ListViewProps.onInlineEditChange` is deprecated and never called; the console stops passing it.
17+
18+
**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):
19+
20+
- 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.
23+
- 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.
24+
- 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.
25+
- 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.
26+
27+
Every grid a `ListView` draws has this model, because `ListView` passes `cellSelection` to each `object-grid` view: the console's object list pages, interface list pages, the object data page (`/apps/:app/:object/data`), the Studio Data pillar's records artboard, and every `list-view` block, whether an SDUI page node or a `ListView` on a `kind: 'react'` page; a grid no `ListView` draws mounts no provider and keeps its click-to-edit (`singleClickEdit`) and click-to-open behaviour unchanged: an authored `object-grid` node, `ObjectView`'s own grid (the `object-view` block, or a host that passes no `renderListView`), a related list, a dashboard table, the record picker and the designer's grids.
28+
29+
On every `ListView` grid (the select-first model) the table's trailing edit column, which holds a changed row's Cancel and Save, is drawn only while a row has changes, so the list at rest ends on its last data column. `@object-ui/core` exports `resolveAffordanceGrant`, the grant half of `resolveAffordance`, which the list cell's read-only reason reads.
30+
31+
New locale keys, in every pack: `table.cellReadOnly` and `grid.readOnlyReason.*` (nine reasons). No key is removed: `list.inlineEditShort` and `list.inlineEditLabel`, the toggle's words, stay in every pack, though the list no longer draws the toggle.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/rest': patch
3+
'@object-ui/plugin-detail': patch
4+
---
5+
6+
feat(rest): a refused cross-object batch names the operation that caused it, and a related list's multi-pick add names that record
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
`POST {basePath}/batch` (the cross-object transactional batch) now adds `failedOperation: { index, object }` to its refusal body when one operation is the cause: `index` is that operation's position in the request's `operations`, and `object` is the object it named. It rides beside the existing `error`, `code` and `userMessage`. It is present when an `update` or `delete` op is refused up front for naming no row (`400 VALIDATION_FAILED`), and when an op fails while the transaction runs (for example `404 RECORD_NOT_FOUND`, a `400 VALIDATION_FAILED` validation refusal, `400 BATCH_UNRESOLVED_REF`, `409 RESOURCE_CONFLICT`). It is absent when the request as a whole is refused (schema, `atomic: false`, size, no transaction), on the per-object API exposure and API-key management refusals, which are judged once per object and action, and on a failure after the last op ran.
12+
13+
The key is additive. The success body does not change, and the batch stays all or nothing: a refused batch writes no row. Through `@objectstack/client` the key reaches `err.details.failedOperation`, because the client hands a flat refusal body with no `details` of its own over as `err.details`. A refusal that carries its own `details` (a package-scoped `409 RESOURCE_CONFLICT` with `details.candidates`) still carries the key on the body, but the client exposes only its `details` there.
14+
15+
The related list's "Add" picker (`@object-ui/plugin-detail`) uses it: when a multi-pick add is refused for one picked record, the inline error names that record by the label the picker shows, followed by the server's reason. A refusal without an index inside the operations sent shows the server's reason alone, as before.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/i18n': patch
3+
'@object-ui/plugin-detail': patch
4+
---
5+
6+
feat(record-page): a related list's tab moves left or right and hides, and 「更多」 restores the default order
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
**Reader arrangement is back.** The related cards' ⠿ handle, ⌥↑ / ⌥↓ and 「隐藏」 left the page with objectstack#35595, and with them the reader's way to reorder or hide a related list. This note supersedes the "Reader arrangement leaves with the cards" bullet of that release's note: 「左移」, 「右移」 and 「隐藏」 now sit on each related tab's own menu, 「恢复默认顺序」 sits in 「更多」 (in a drawer and an embedded pane too), and an arrangement already stored keeps applying.
12+
13+
- **A related list's tab is its menu.** Open a list's tab and click it again (or press Enter, Space or ↓ on it): 「左移」 and 「右移」 move it one place among the related lists, and 「隐藏」 takes it off the row into 「更多」's hidden lists and returns to Overview. The open tab draws a ▾ to say so.
14+
- **「更多」 restores the default.** While the order or the hidden set is not the default, 「更多」 ends with 「恢复默认顺序」: the default order with every list shown. It is in a drawer and an embedded pane too, which have no rail.
15+
- **Fixed tabs.** Overview, Attachments, Approvals and Activity have no menu and never move.
16+
- **One stored arrangement.** The tabs write the same per-reader, per-object arrangement the related cards wrote, so an order or hides already stored keep working, and the rail's 「已隐藏 N · 显示」 and 「恢复默认顺序」 still undo them.
17+
18+
`@object-ui/i18n` adds `detail.recordTabMoveBefore` / `detail.recordTabMoveAfter` (左移 / 右移) in every pack. `@object-ui/plugin-detail` removes the unused `RelatedCardStack` and `useRelatedArrangement` modules (not exported from the package). Nothing an app authors changes.

‎content/docs/frontend/plugins/plugin-grid.mdx‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,38 @@ through the host's data source (`dataSource.update`) with no callback to wire.
350350
To own persistence in a React host, supply `onCellChange` as a **component
351351
prop** — it is not a schema key.
352352

353+
#### On an object's list page
354+
355+
The console's list page draws its grid with the **select-first** cell model
356+
(objectstack#35684, objectstack#35687), which its host turns on (the
357+
`cellSelection` component prop, not a schema key). There is no inline-edit
358+
mode and no toggle: the grid is editable wherever the reader may edit the
359+
object and the view does not declare `userActions.editInline: false`, and
360+
`singleClickEdit` is not read there.
361+
362+
- **A click selects** a cell (a ring around it); it neither edits nor opens the
363+
record. A link a cell draws (the name, a lookup, a phone or an email) keeps
364+
its own click. On a touch screen a tap opens the record.
365+
- **Editing** starts on a double-click, Enter or F2 (the value kept, caret at
366+
its end), or by typing, which replaces the value; an input method's
367+
composition is kept whole. Backspace or Delete opens an empty editor and
368+
saves nothing yet.
369+
- **While editing**, Enter commits and moves down, Tab / Shift+Tab commit and
370+
move right / left, and Escape cancels and keeps the cell selected. In a
371+
multi-line editor Enter is a new line and Ctrl/Cmd+Enter commits. A click
372+
elsewhere commits.
373+
- **Selected cell keys:** the arrows and Tab move the selection; Space opens the
374+
record (a checkbox cell flips instead, as does a second click on it);
375+
Ctrl/Cmd+C copies; Ctrl/Cmd+V converts the text to the field's type and
376+
commits it; Escape clears the selection.
377+
- **A cell that opens no editor says why** on the cell: the field is read-only,
378+
calculated or not editable in a list, the reader may not edit the field, the
379+
object or the record, the view turned editing off, or the record is locked
380+
by an approval.
381+
382+
Commits are the grid's own staged edits: the row's Save / Cancel and the Save
383+
All bar save them, as before.
384+
353385
### Keyboard navigation
354386

355387
`keyboardNavigation` turns the grid's data cells into one roving Tab stop, on the

0 commit comments

Comments
 (0)