Skip to content

Commit 507fac3

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-35901-extension-place
2 parents c151007 + 76cb366 commit 507fac3

171 files changed

Lines changed: 7194 additions & 2449 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/skills': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The record-page skills teach the parent-declared record page:
9+
10+
- `objectstack-ui` record-page rule: the parent's `relatedLists` is the tab list. Without it nothing changes; declared, only the named lists show, in order, with the attachments, approvals and activity tabs named by object (`sys_attachment`, `sys_approval_request`, `sys_activity`), and an entry `{ list, label, columns }` titles one list. "Put the tasks tab first" lists every tab to keep, tasks first, because a list naming only the task hides the rest. A child list another package adds is hidden by a `relatedLists` that does not name it.
11+
- The same rule's step 1 no longer teaches a stage bar or a key-field strip: the stage is the status tag beside the title, whose menu moves it, and `highlightFields` feed hover cards, pickers and related-list columns. A field group lists its own members in `fields`. The wide full page pins the details left beside the tabs, unless the details hold a child table or there is no other tab; the right summary rail and its switch are gone from the text, and the details column's dragged width joins the reader's own choices.
12+
- A `master_detail` child is a tab by default (`objectstack-data` relationships rule, the record-page rule and an eval); a parent field group naming the child list places its table among the fields, written only when asked, and the list keeps its tab too unless a declared `relatedLists` leaves it out.
13+
- `objectstack-data` field-groups example lists each group's members in `fields`; `objectstack-ui` navigation names `fieldGroups` alone.
14+
- Evals: the tasks-first case now writes the full tab list; new cases remove the attachments tab, place a Tax ID field after Industry in its group's list, and put a quote's line items above its amount section.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
fix(console): Studio's kanban card "Click to open" offers only Default and "Don't open"
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
On an object's list the record name opens the full page and the hover icon opens the side panel, so `navigation.mode` `drawer`, `page` and `new_window` parse there and change nothing; only `none` still counts. The kanban card section of Studio's list-view inspector offered all four. It now offers Default (no key) and "Don't open" (`none`). A view that already stores `drawer`, `page` or `new_window` shows that value flagged "(deprecated)" in the select, and picking Default removes the key. Opening such a view writes nothing. The spec is unchanged, and page blocks that carry `navigation` keep every mode.
13+
14+
The studio catalogue drops the three labels nothing reads any more: `engine.studio.inspector.listView.kanbanCard.mode.drawer`, `.mode.page` and `.mode.newWindow`.
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/data-objectstack': patch
4+
'@object-ui/react': patch
5+
'@objectstack/platform-objects': patch
6+
---
7+
8+
feat(console): a list's column widths, row height and tab order are kept in this browser only
9+
10+
Clause-②: no
11+
Metadata-protocol: none
12+
13+
On a Console object list, the column widths a reader drags, the row height they pick and the order they give the view tabs are now kept in their own browser only, per signed-in user and object (localStorage `list-layout:<user id>:<object>`). Nothing is sent to the server: the Console no longer reads or writes the per-user list preference row `sys_user_preference` `ui.list.<object>`, and its boot read of the reader's preferences no longer asks for that key family. A list opens at once, without waiting for that read.
14+
15+
- Another browser or device opens the list on its view's own widths, row height and tab order until the reader changes them there.
16+
- Signing out clears these entries with the rest of this browser's Console state, as before.
17+
- With nobody signed in, nothing is kept.
18+
- The record page's "show empty fields" choice (`ui.record.<object>`) is unchanged and still follows the reader.
19+
20+
Upgrade note: what an earlier Console kept for a reader's lists is not carried over. The `ui.list.<object>` rows are no longer read, so every reader's lists open on their views' own widths, row height and tab order until they change them again. This browser's old copies (`list-state:*`, `list-filters:*` and `viewOrder:*` in localStorage) are removed on the first list the Console opens. The server rows stay where they are, unread; leaving them does no harm.
21+
22+
`@object-ui/data-objectstack`, `@object-ui/react` and `@objectstack/platform-objects` change only comments and a README example that named the retired key. No metadata key, value or default changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
---
5+
6+
perf(console): an app route draws the console's frame right after the session read, and the chrome no longer waits for the route's own metadata
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Opening an app page by its URL (a reload, a pasted link) showed the full-screen splash until the permission answer, the app list, the admin verdict and the page's own metadata reads had all arrived. On a hosted environment the permission answer alone takes seconds.
12+
13+
- `LoadingFallback` (the console's boot-gate fallback) and `AppContent`'s readiness gate now draw `ConsoleBootShell` on an `/apps/:app/*` route once the session has answered with a user: the chrome's frame (the sidebar at the width the reader left it, from 768 px up with grey blocks where its head and foot put the app menu, the search, the bell and the account; the top bar on a phone, except on a record page, and on an app's docs pages, which have no sidebar; the route's skeleton in the slot: the shape the chrome draws on that route), with no app name, no navigation entry and nothing to press, because those are what the gates still decide. The splash stays for the session read itself and for every other route. The console's permission scope uses the same fallback.
14+
- `AppContent` mounts the console chrome once the app list, the permission answer, the admin verdict and the deployment flags (`/auth/config`, which the chrome's navigation gates read) are in; the route's own metadata reads no longer hold it on the first paint. The route slot draws the route's skeleton until they land, and a route element whose chunk is still loading draws the same skeleton instead of the full-screen splash inside the chrome.
15+
- The frame and the first route skeleton carry `data-boot-splash`, so readiness waits and the reads deferred to the first paint past the splash wait exactly as before; `data-boot-shell` tells the frame apart.
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/plugin-detail': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
feat(record-page): on a phone, the record's comments open as a page of their own: the threads first, a thread's replies inside it, the comment box docked at the foot, and a long press for a comment's actions
8+
9+
Clause-②: yes (widening) — `@object-ui/plugin-detail` adds the export `CommentsPage` and its type `CommentsPageProps`; `CommentThread` takes a third `mode`, `'page'`, and optional `itemInteraction`, `heldId` and `onHeldActions`; `CommentItem` an optional `interactionProps`; `CommentComposer` and `RichTextCommentInput` (exported) an optional `layout` (`'default' | 'phone'`). `@object-ui/app-shell` reserves the console URL parameter `comments` (`RECORD_COMMENTS_PARAM`, in `RESERVED_URL_PARAMS`). `@object-ui/i18n` adds four keys to every pack: `detail.addReactionEmoji`, `detail.commentThread`, `detail.formatBold`, `detail.formatItalic` (the toolbar's names without their shortcut). Nothing existing is removed or re-typed; the desktop's panel, toolbar and labels are unchanged.
10+
Metadata-protocol: none
11+
Skills-docs: none — no skill under `skills/**` teaches where the console draws a record's comments; `content/docs/frontend/plugins/plugin-detail.mdx` and the plugin-detail README gain the phone's page in this change.
12+
13+
On a phone the record page's top bar gains the comments icon, with the number of unresolved threads. A press opens the record's comments as a page over the record, which stays where it was under it; 「‹」 and the browser's Back return to it.
14+
15+
- The page lists each thread's first comment with 「N 条回复」 under it; a tap opens the thread, the comment first and its replies after it. 「‹ 评论」 returns to the list.
16+
- The comment box is docked at the foot of the screen and stands on the keyboard while it is up. One line until tapped; then a row under the text holds mention, bold, italic, list and code, and send at the right end. In the list it writes a comment, in a thread a reply. No 「Ctrl+Enter」 hint.
17+
- A long press on a comment (or its context menu) raises a sheet from the bottom: six reactions, 「标记已解决」 on a thread's first comment, 「编辑」 and 「删除」 (red, confirmed first), each offered exactly where the desktop's hover row offers it.
18+
- The filter at the top right is the desktop's: 「显示已解决」 and 「只看我参与的」.
19+
- The 动态 tab holds the system entries alone, as on the desktop. On a phone the comments live on this page: this replaces the lines of the two objectstack#36075 entries (the record comment panel, and resolved threads) that said the phone keeps the comments in its 动态 tab, or keeps its feed as before.
20+
- The page is in the URL (`?comments=` for the list, `?comments=<id>` for a thread), so a link or a reload opens it where it was.
21+
22+
Unchanged: the desktop; who may write, resolve, edit or delete a comment (the phone offers each exactly where the desktop does); a record page authored in full and an object with `enable.feeds: false` show no icon.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
'@objectstack/formula': minor
3+
'@objectstack/lint': minor
4+
'@objectstack/mcp': minor
5+
'@objectstack/service-automation': minor
6+
'@objectstack/spec': minor
7+
'@objectstack/scenarios': minor
8+
'@object-ui/app-shell': minor
9+
---
10+
11+
fix(formula)!: `validateExpression` refuses `==` / `!=` between a list-valued field and a scalar, which answers a constant on every row
12+
13+
Clause-②: no (narrowing)
14+
Metadata-protocol: narrowed
15+
Skills-docs: follow-up #36217
16+
17+
<!-- adr-0087: registered cel-list-equality-refused -->
18+
19+
**BREAKING** accept-set narrowing, shipped as `minor`. CEL compares the whole list with the scalar, so `record.labels == 'frontend'` is `false` for `['frontend', 'qa']` and for `null` alike, and `record.labels != 'frontend'` is always `true`: a condition written that way never fires (or always does), with no fault and no log line. The shared validator accepted it.
20+
21+
- **The refusal.** `validateExpression` refuses a `==` / `!=` between a read of a list-valued field on `record` / `previous` (`record.f`, `record['f']`, either operand order) — or, at a flattened (flow) condition, its bare name `f`, which the run binds to the trigger record's field, unless a flow variable holds the name or a node can bind names no reader sees — and a non-null string, number or boolean literal, as the new `list-equality` code (params `reference`, `operator`, `operand`, `answer`, `rewrite`), prescribing the null-guarded membership test.
22+
- **Which fields are lists.** A `fieldTypes` entry of an inherently multi-value type (`multiselect`, `checkboxes`, `tags`), or a field named in the new optional `ExprSchemaHint.multiValueFields` — the fields a caller reads as multi-valued through `isMultiValueField` (`@objectstack/spec/data`), which is how a `select` / `radio` / `lookup` / `user` / `file` / `image` field declared `multiple: true` becomes a list here. Absent, such a field is not judged, as before.
23+
- **Who fills it.** The publish lint (`os validate` / `os build`, every CEL site that types the object's fields), the MCP `validate_expression` tool (read off the served definition, `McpDataBridge.servedObjectDefinitionOf`, at the validation / formula / flow-condition sites; a bridge without it answers as before), `registerFlow`'s schema pass (`parseObjectFieldSchema` returns `multiValueFields`; logged, never thrown, like every finding of that pass), the scenario scorer, and Studio's object draft check (field rules, formulas, validation rules; `CelSchemaHint.multiValueFields`).
24+
- **Still accepted.** `S == null` / `S != null` (either side), `'a' in S`, a list compared with a list literal or with another list field, and a comparison whose other operand is not a literal.
25+
26+
FROM → TO:
27+
28+
- `record.labels == 'frontend'` → `record.labels != null && 'frontend' in record.labels`
29+
- `record.labels != 'frontend'` → `record.labels == null || !('frontend' in record.labels)`
30+
- at a flow condition, `labels == 'frontend'` → `labels != null && 'frontend' in labels`
31+
32+
One-line fix: test membership with `in`, null-guarded (`'a' in null` faults); compare the list with `null` to test whether it is set.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
fix(plugin-detail): a slotted page's record:chatter on the 动态 tab lists the system history alone while the comment panel holds the comments
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- A page whose `discussion` slot holds `record:chatter` or `record:discussion` draws that block on the record page's 动态 tab. While the comment panel is offered beside the record, on the page or in the drawer (objectstack#36075), the block now draws the system entries alone, as the platform's own 动态 stream does there: no comment and no reply, no comment box, no Comments-only filter, a count without the comments, the 动态 heading instead of 「讨论」, and the activity empty line instead of 「暂无评论」. A refused or failed comment read is the panel's to report, not this block's.
11+
- Not changed: the platform's own 动态 stream, the 动态 tab's label, a page an author composed whole, and the phone while it has no comment surface.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/lint': patch
3+
---
4+
5+
feat(lint): warn when a full record page's header title or action order differs from what the phone and the drawer draw
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
An object's hand-written full record page (`type: 'record'`, `kind: 'full'`) is drawn on the desktop full page only; on a phone, in the side drawer, in a split pane and in an interface page's preview the record draws the standard page, built from the object. Two new advisories name a header that makes the same record read differently between the two:
11+
12+
- `record-page-header-title-differs`: the `page:header` declares a `title` that is not exactly the object's name field token (`{nameField}`, or the derived title field). The standard page, lists, search and lookups all title the record by that field.
13+
- `record-page-header-actions-differ`: the header's `actions` list gives a different primary button, or a different order within the row of buttons or within the `⋯`, than the actions' own `order` / `variant: 'primary'` and their declaration order give on the standard page.
14+
15+
Both are warnings. They run on `os validate`, `os build` and `os lint`, and on a page publish at the metadata save door, where they come back as advisories and refuse nothing. Nothing about how a page renders changes. The fix each names: drop the header `title` (or set `nameField` on the object), give the actions an `order` and the main one `variant: 'primary'`, or move a header that should differ everywhere into a `kind: 'slotted'` page's `header` slot. `os explain` on either id prints what the check cannot see: visibility predicates and permissions, actions another package attaches, and the served declaration order, which it estimates.

‎.changeset/sec2-535v.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/plugin-auth': patch
4+
'@objectstack/runtime': patch
5+
'@objectstack/cli': patch
6+
---
7+
8+
feat(security): `server.trustProxy` gains a trusted-network form, and the client address is read from the trusted hop
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: added
12+
Skills-docs: none — no skill under `skills/**` teaches `server.trustProxy` or forwarded headers; `docs/HARDENING.md`, `content/docs/deployment/production-readiness.mdx`, `content/docs/protocol/kernel/http-protocol.mdx` and `content/docs/permissions/authentication.mdx` gain the form in this change.
13+
14+
`server.trustProxy` accepts a third form beside `false` and `true`: `{ networks, header }`, naming the reverse proxies a deployment runs.
15+
16+
```ts
17+
defineStack({
18+
server: {
19+
trustProxy: { networks: ['10.20.0.0/28', '2001:db8::10'] }, // header defaults to 'x-forwarded-for'
20+
},
21+
});
22+
```
23+
24+
- A forwarded header is believed only on a connection whose peer address is inside `networks`. From any other peer the client is the peer itself.
25+
- `X-Forwarded-For` is read from the right: every entry inside `networks` is a hop of the deployment's own, and the first entry outside them is the client. When every entry is inside them, the leftmost is the client. An entry a trusted hop reports that is not an address establishes no address.
26+
- `header: 'x-real-ip'` reads `X-Real-IP` instead. Under this form the header it does not name is never read.
27+
- Each entry of `networks` is an address or a CIDR range, IPv4 or IPv6, read the way an `allowed_ip_ranges` entry is read. Every address inside `networks` is taken for a proxy hop, so list the proxies' own addresses, never a range clients connect from. A range of prefix length 0 is refused: it would stand in for `true`.
28+
- `os validate` and `defineStack` refuse an entry not shaped like an address or a CIDR range, a prefix length of 0, an empty list, an unknown header and an unknown key. The runtime reads every entry in full at boot and refuses, naming the entry, what passes the shape but names no range (an address with a port, an IPv4-mapped prefix wider than the mapping), so a form is never read as "trust nobody".
29+
- A malformed `server.trustProxy` object, which used to read as `false`, now fails the boot.
30+
- A forwarded header sent as several lines is read as one list, under every form.
31+
32+
Every consumer of the client-address rule reads the new form: the inbound rate limiter, the per-endpoint rate limiter, and the authentication plugin's IP allow-list, `last_login_ip` login audit and vendored-library limiter. `objectstack serve` hands the authored value to both `AuthPlugin` and the dispatcher as it is, in either form. A host that composes them itself passes the same value to `AuthPlugin({ trustProxy })` and `createDispatcherPlugin({ rateLimit: { trustProxy } })`; `@objectstack/plugin-auth/client-address` exports `readTrustProxy`, the one reading of the declaration, with `ClientAddressTrust` and `TrustedProxyNetworks`.
33+
34+
`server.trustProxy: true` reads as before, and is sound only behind a proxy that overwrites `X-Forwarded-For` on every request, never one that appends to it. Under `true` the server now logs one `warn` per process the first time an `X-Forwarded-For` with more than one entry arrives, naming the trusted-network form. The IP allow-list's two operator warnings say the same. `true` is refused at boot from the next major; to move now, replace it with `{ networks: [...] }` listing your proxies' addresses or ranges.

‎content/docs/deployment/cli.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ os compile --json # JSON output for CI pipelines
937937
→ Normalizing stack definition...
938938
→ Lowering inline handlers...
939939
→ Validating protocol compliance...
940-
→ Running author-time rules (74)...
940+
→ Running author-time rules (75)...
941941
→ Checking that every required capability has a provider installable in this edition...
942942
→ Collecting package docs (ADR-0046)... 0 collected
943943
→ Writing artifact...

0 commit comments

Comments
 (0)