Skip to content

Commit 39ff806

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-36511-studio-save-cancel
2 parents 0a019af + d24e4ab commit 39ff806

183 files changed

Lines changed: 8782 additions & 623 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/skills': patch
3+
---
4+
5+
docs(skills): `objectstack-automation` teaches that clearing a state-machine field is a transition to `''`, and how to make a state clearable
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The state-machine notes in `references/state-machines-and-approvals.md` gain one entry: an update that sets the state field to `null` or `''` is judged from the stored state as a transition to `''`. A state meant to be clearable lists `''` in its targets, e.g. `paused: ['open', '']`; from any other state the machine lists, the clear is refused with `invalid_transition`, and the refusal's `constraint` carries `to: ''` beside `from`. A stored state that is not a key of `transitions` stays unguarded, as before.
11+
12+
This is the behaviour `@objectstack/objectql` already ships; the skill only teaches it.
13+
14+
Paid for by deletion in the same file, with the token ceiling unchanged (5936): the wording of the section's intro and of six neighbouring notes was shortened, each keeping its fact — one rule per field, `initialStates` gating insert, guards and reactions living outside the machine, the introspection route, the unguarded unlisted `from` state, and the `record.<field>` scope of sibling predicates.
15+
16+
Ride-along, same theme: in the `objectstack-data` eval `objects-fields-relationships.json`, the `employee` lifecycle case's expected answer declared a `state_machine` with `transitions` only, which publish refuses for a machine that runs on insert (`state-machine-no-initial-states`). It now declares `initialStates: ['draft']` with the reason, and the case's `must_contain` requires `initialStates`.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
'@objectstack/driver-turso': patch
4+
---
5+
6+
Clause-②: no
7+
Metadata-protocol: none
8+
9+
A column's literal DEFAULT now follows the field's declaration on a table an earlier release created, not only on a fresh database. When a field drops its literal `defaultValue`, schema drift reports the column's leftover DEFAULT (`drop_column_default`); when the declared literal changes, it reports the old one (`set_column_default`). Both are `safe`: dev auto-reconcile, a publish of the object, the artifact-pinned boot and `os migrate apply` apply them, in place on PostgreSQL and MySQL and by the table rebuild on SQLite. Before, the table kept the old DEFAULT, every insert that left the field unset stored the old value where a new database stored the declared one (or nothing), and `os migrate plan` showed nothing. Stored rows are never rewritten, and a DEFAULT that is an expression (a `NOW()` default, a sequence) is left alone. A plain production boot still alters no existing column: it logs the entry, and `os migrate apply` applies it.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
fix(components): a New Invoice in the home currency fills a picked product's price on its line again
6+
7+
Clause-②: no
8+
9+
The currency code picker's trigger now carries the selected code as its `value`, and a changed code bubbles a `change` event from it, as a native select does. The master-detail form reads its header's live values off the header's named elements, and read this one as empty: since the line grid withholds a picked amount from a line whose currency it cannot tell (objectstack#36249), a New Invoice in the home currency left Unit Price empty with the note "no currency is chosen here yet". The grid now reads the header's code once the header has been edited, and reads a picked code when it is picked. A line picked before any header edit still withholds the price and says so.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@object-ui/plugin-kanban': minor
4+
'@object-ui/plugin-list': minor
5+
'@object-ui/app-shell': minor
6+
'@object-ui/i18n': minor
7+
'@object-ui/plugin-view': minor
8+
'@objectstack/lint': minor
9+
---
10+
11+
feat(kanban): the board's own 视图设置, a lane header 「+」 and 「⋯」, and a lane statistic and card toggles on `KanbanConfig`
12+
13+
Clause-②: yes (widening)
14+
Metadata-protocol: added
15+
16+
`KanbanConfigSchema` gains three optional keys, none with a default; a view that declares none of them renders as before:
17+
18+
- `summary` — a lane statistic drawn at the foot of each lane (`KanbanLaneSummary`): `{ type: 'count' }`, or `{ type: 'sum', field }` of a number field over the cards the lane has loaded, not every record of the lane; `{ type: 'none' }` shows nothing. It takes precedence over `summarizeField`. A sum over a lane holding more cards than were loaded says so (「仅已加载的卡片」). The whole-lane sum, and average, minimum and maximum, wait for a server lane read (#36520).
19+
- `showFieldLabels` — absent means `true`: a card names each field beside its value; `false` draws the values alone.
20+
- `hideEmptyFields` — absent means `true`: a card leaves out an empty field; `false` keeps its line.
21+
22+
On a board, the view settings show the lane field, which lanes show and in what order, the card fields (order, hide, add), the two card toggles and the lane-foot statistic, in place of the table's columns, group, row height and row colour. Each change applies at once and is held as the list's draft until Save. Each lane header gets 「+」 (a new record with the lane prefilled; an empty lane also gets a 「+ New」 row) and 「⋯」 (collapse, kept in this browser; hide). Hiding a lane moves its cards into 「未分类」, as `kanban.lanes` (#28211) always has, and the menu and the lanes list say so. The lane field picker offers select and radio fields; collapse is kept per reader, object and view. The Console now relays the view's `kanban.lanes`, which it used to drop, and both producers of the board node (`ListView` and `ObjectView#generateViewSchema`) relay the three new keys. `ObjectKanban` takes the host's `laneMenu` request (`KanbanLaneMenuRequest`). `@objectstack/lint` walks `kanban.summary.field` and refuses a `sum` over a field that is no number, a yes / no field included (`list-view-summary-field-type-refused`). Saving a board whose view declares no `kanban` block stores the lane field the board draws with the changed keys.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(record-page): an empty field in the synthesized "More details" section is counted and revealed by "Show N empty fields"
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On an object's default record page, a field the page moves to its synthesized "More details" section (a long-text field such as `notes`) no longer disappears from read mode when it is empty. Before, a "More details" section whose fields were all empty drew nothing, the field list's closing "Show N empty fields" row left the field out of its count, and pressing it did not draw the field; it appeared only in edit mode. The section now folds its empty rows the way every other group does: the row counts them, and showing empty fields draws them in place under the "More details" heading.
11+
12+
The default page's derived sections (the untitled primary section, "More details", and the "Other" section of fields no field group claims) now carry `hideEmpty: false`, the value the `record:details` section contract already declares for keeping an all-empty section. A record page Studio seeds from these sections saves the same value. Pages that authors write are unchanged: an authored section that omits `hideEmpty` still disappears when all its fields are empty.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(console): the bare data page keeps its list's search, sort, grouping and Filter panel when a record is opened and closed, and on a reload
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On the bare data page (`/apps/APP/OBJECT/data`) a search, a sort, a grouping or a Filter panel condition was lost as soon as the reader opened a record and came back, or reloaded the page: the page kept only its own URL conditions in its address. It now keeps the list's own state there too, under the same parameters an object's list uses (`uf__search`, `uf__sort`, `uf__group`, `uf__filter`), written with replace so typing a term adds no history entries. The record page's close, a reload and a copied link open the list as the reader left it.
11+
12+
The page's own URL conditions (`filter[FIELD]`, the removable 「Filtered by」 tags) are unchanged and stay a separate layer: the list applies them and the Filter panel together, and changing one never rewrites the other. "Save as view" still saves only the URL conditions. A Filter panel in the address that names a field the object does not declare, or one the reader cannot read, is refused whole with the same notice an object's list shows. 「Reset」 on a list opened from a record's related list, which already removed every `uf_` parameter from the address, now also opens the list again without them: no search, sort, grouping, Filter panel or quick-filter selection is left applied on screen.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
feat(cli): the Console's content-security-policy lets a PDF preview frame the file from the deployment's S3 store
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On a deployment that stores files in S3 or an S3-compatible store (R2, MinIO), the Console document's `frame-src` now names that store's origin beside `'self'`, so the in-page file preview can show a PDF from its signed download link. It is the same origin `connect-src` already names for presigned uploads: the store signs uploads and downloads on one origin. Nothing wider is added: not the hosts named in `OS_CONSOLE_CSP_CONNECT_SRC`, never a scheme or a wildcard. With local storage, or when the storage service cannot name its origin, `frame-src` stays as before (left to `default-src 'self'`, or `'self'` plus the Turnstile frame while that challenge is on).
11+
12+
The storage service's answer is now accepted only as an exact `http(s)` origin: an answer that is a scheme alone, a wildcard, a path or a WebSocket source is left out of both `connect-src` and `frame-src` and reported once, where `connect-src` used to take it. The storage adapters that ship answer an origin, so no deployment changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/fields': patch
3+
---
4+
5+
fix(fields): an html or richtext cell holding a heading keeps the list row one line high
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
An `html` or `richtext` value that holds a heading drew it as a heading element in a grid cell, at the typography scale's heading size, so the row grew taller than the other rows (45 px against 36 px in Chromium for a stored `<h1>`). In a grid column the cell now draws the value in the same cell face a `markdown` cell uses: every heading level is a bold line at the cell's own text size, and the body takes the cell's font size and line height. What the sanitiser keeps and drops is unchanged. The record page and readonly form fields keep their full-size headings.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/plugin-list': patch
3+
---
4+
5+
fix(plugin-list): a condition chip names an operator only the advanced filter panel writes in that panel's own words, never by its id
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A list or drill dialog whose conditions carry `is_not_null`, `is_null`, `greater_than`, `less_than`, `not_equals`, `icontains` or `ends_with` used to show the operator id on its chip ("Deal Value: is_not_null"). The chip, and the quick filter's operator choice, now read the advanced panel's word for it in every language ("Deal Value: Is not null", "金额:不为 null"). Any other operator spelling the chip cannot word is shown as "Condition" instead of its id; a view filter's comparison symbol (`>=`, `=`) still reads as written. A chip with no value no longer ends in a space.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/rest': patch
3+
---
4+
5+
fix(rest): `/meta` reads a regional request tag in the language of the pack the deployment holds
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The metadata reads handed the translators the request's `Accept-Language` tag as written. In a deployment authored in English (`i18n.sourceLocale: 'en'`) that defaults its users to Chinese and holds an `en` pack, an `en-US` request was therefore not the authored language: it walked the declared fallback chain and `GET /meta/object/account` served `客户`, while a write refusal on the same request, which objectql renders with the tag negotiated against the deployment's locales, named the object `Account`.
11+
12+
The translation options every metadata read builds now carry the request tag negotiated against the locales the i18n service reports (`getLocales()`), by the platform's one locale ladder (`resolveBundleLocale`), the same negotiation objectql and plugin-approvals run. An `en-US` request in that deployment reads `Account`. A request for a locale the deployment holds no pack for is unchanged: it walks the declared chain to the default locale. The item and list reads on both transports, the metadata types listing and the public form's object labels read through the same options.
13+
14+
The cached item read's validator is unchanged: it still varies by the tag the request sent, and a validator issued for one language never revalidates a request for another.

0 commit comments

Comments
 (0)