Skip to content

Commit 68effe3

Browse files
committed
Merge origin/main into claude/project-thread-l8wnbr
Keeps the read-only mark linking nowhere (ADR-0146 D11, ruling 3) over #28818's link into Studio's All metadata item page, whose save names no package and is refused onto a packaged item. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5ni5yjiTswP6crgAkX
2 parents 8437d51 + 45efba2 commit 68effe3

129 files changed

Lines changed: 4858 additions & 1105 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@object-ui/types': patch
3+
'@object-ui/react': patch
4+
'@object-ui/plugin-detail': patch
5+
'@object-ui/app-shell': patch
6+
---
7+
8+
feat(console): a record open is one request — the discussion, the activity, the attachments and the related rows' names come with the page payload (#28470)
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
After the record page payload answered, a record open still sent the comment thread, the activity feed, the attachment list, the mention list and one `?top=1` name read per object the related rows point at. They are gone from the open:
14+
15+
- The page asks the payload for the discussion and the activity when a block that draws the feed is on screen at open (the 动态 panel of a laid-out page, or a feed block on the tab the page opens on), and for the attachments when the page draws them. The feed, the Attachments panel and the Attachments tab badge draw those parts; a refused part draws the refusal the panel draws today. There is no fallback read: a part the payload carries is never read again on the open.
16+
- Each related list asks the lookups of its rows to resolve, as its own read expands them, so the rows carry their names. The related list's name fallback no longer resolves the parent record's own id, which no column draws.
17+
- The mention list (`sys_user`, 50 rows) is read on the comment composer's first focus, not when the record opens. A reply or an edit whose text holds an `@` before then reads it when written, so its mentions still resolve.
18+
19+
- `@object-ui/types`: `RecordPagePayload` gains `discussion`, `activity` and `attachments`.
20+
- `@object-ui/react`: `DiscussionContextValue.onMentionSuggestionsWanted`.
21+
- `@object-ui/plugin-detail`: `RichTextCommentInput`, `RecordActivityTimeline` and `RecordChatterPanel` take `onMentionSuggestionsWanted`, called on the editor's focus; `record:activity` and `record:chatter` pass the context's hook.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/rest': minor
4+
---
5+
6+
feat(rest): the record page payload carries the record's discussion, activity and attachments, and the related rows' names (#28470)
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: added
10+
11+
`POST /api/v1/data/{object}/{id}/page` answers the reads a record page still made on its own after the payload arrived. Each new part is the read it replaces, asked as the same caller behind that object's own exposure gate, and each is refused on its own:
12+
13+
- **`related[].expand`** (request): the lookups of a related list's rows to resolve, as that list read's own `$expand`. The rows carry the referenced records the caller may read in place of their ids, so no name lookup follows the payload.
14+
- **`discussion: true`** (request) → **`discussion`** (response): `{ comments, reactions }` — the record's comment thread (`sys_comment` where `thread_id` is `{object}:{id}`, oldest first, no page size) and those comments' `sys_comment_reaction` rows (oldest first). The reactions carry their own refusal, which leaves the comments answered.
15+
- **`activity: { top }`** (request, 1–200) → **`activity`** (response): `{ total, records }` — the record's newest `sys_activity` rows with their count, `actor_id` expanded.
16+
- **`attachments: { top }`** (request, 0–100) → **`attachments`** (response): `{ total, records }` — the record's newest `sys_attachment` rows with their count.
17+
18+
A stream part is its rows or its refusal (`RecordPageStreamRefusalSchema`), never both and never neither. The body stays strict, the query-parameter set stays empty, and a record the caller cannot read still refuses the whole request. New exports in `@objectstack/spec/api`: `RecordPageActivityRequestSchema`, `RecordPageAttachmentsRequestSchema`, `RecordPageStreamRowsSchema`, `RecordPageStreamRefusalSchema`, `RecordPageDiscussionSchema`, `RecordPageDiscussionReactionsSchema`, `RECORD_PAGE_MAX_ACTIVITY_ROWS`, `RECORD_PAGE_MAX_ATTACHMENT_ROWS`, and their types.
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/i18n': patch
5+
'@objectstack/platform-objects': patch
6+
'@objectstack/plugin-security': patch
7+
'@objectstack/plugin-sharing': patch
8+
---
9+
10+
feat(setup): Setup's metadata pages open Studio's All metadata area, the catalog's Active switch moves to each item's page, and Studio stops linking into Setup
11+
12+
Clause-②: no
13+
Metadata-protocol: none
14+
15+
Setup no longer has a metadata editor or a metadata catalog (ADR-0146 D1). Studio's "All metadata" area serves those pages now.
16+
17+
- **Setup's metadata URLs redirect.** Each `/apps/<app>/metadata/...` route opens the same page in Studio's "All metadata" area: the directory, `_diagnostics`, a type's list, an item, its history and its create page. The legacy aliases redirect too: `component/metadata/{directory,resource}` in the shell, and `system/objects`, `system/metadata` and `system/{roles,positions,permissions}` in the console. `?package=`, `?scope=environment` and `?review=1` carry over, and each URL lands in one hop on the leg its query names.
18+
- **The datasource stays in Setup.** Its routes render Setup's pages as before. It is runtime configuration, not metadata authoring, and the area sends datasource URLs back to Setup.
19+
- **A bookmark of the retired Setup › Packaged automation page lands in Studio.** `/apps/<app>/component/automation/packaged?package=<id>` opens that package's Automations pillar, where a packaged flow's switch and New similar are, with the query kept. With no package named, it opens the area's cross-package list of flows.
20+
- **The catalog entries leave Setup.** Positions, Capabilities, Permission Sets and Declared Sharing Rules leave Setup's navigation, and their labels are retired in all four locales. Home loses the "Manage Objects" quick action, and the sidebar loses its Objects entry.
21+
- **The Active switch moves to the item's page.** A permission set, a position or a declared sharing rule is now switched on and off on its own page in the area. It is the same switch the catalog list had: switching off asks first and names how many users lose the access, and switching on writes at once. The area's type lists keep their switch column. **An admin with `setup.access` but no `studio.access` now switches these items in Studio.** Grant `studio.access` to anyone who managed the catalog from Setup.
22+
- **Studio stops linking into Setup.** The landing page's environment-overlay link is gone. The read-only item link and the chat's "Review changes" now open the item in Studio's area.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/service-analytics': patch
3+
---
4+
5+
fix(service-analytics): a dataset selection asking one column twice is refused with a repair the selection can make, not the engine's "own 'alias'"
6+
7+
Clause-②: no — the accept set of `queryDataset` is unchanged on every face: each selection served on `main` is served, each refused is refused with status 400. Only the refusal's prescription moves, and the ObjectQL strategy now refuses these keys itself, right before `engine.aggregate`. Nothing is widened: no export, public member, answer member, error code or status is added.
8+
Metadata-protocol: none
9+
10+
A `queryDataset` selection that asks one column for two values under one name (the column raw beside its own bucket, such as `dimensions: ['closed_at']` with `timeDimensions: [{ dimension: 'OBJECT.closed_at', granularity: 'month' }]`, or two buckets of it) is refused `INVALID_QUERY` / 400 on the native strategy, the ObjectQL strategy and the draft preview, with the same `param`, `path`, `object` and `fields` as before. The message used to be the engine's, which tells the caller to "give one of the group entries its own 'alias'"; a dataset selection has no alias. It now names the selection's members over the column and a repair:
11+
12+
- raw beside its bucket: "The selection asks for 'closed_at' both raw and bucketed (`dimensions` 'closed_at'; `timeDimensions` 'OBJECT.closed_at' by month). Drop the raw dimension from `dimensions`, or drop the granularity from the `timeDimensions` entry."
13+
- two buckets: "The selection asks for 'closed_at' at two granularities (`timeDimensions` 'closed_at' by month, 'closed_at' by year). Ask one granularity of it in `timeDimensions`."
14+
15+
The three faces answer one refusal, `dataset-group-column-door.ts` (formerly the draft preview's copy of the engine's): the ObjectQL strategy calls it on the keys it built on its direct and cross-object paths, and the preview on the keys the direct path would build. The engine's own refusal in `@objectstack/objectql` is unchanged, and a direct `engine.aggregate` caller, who can alias, still gets its prescription.
16+
17+
One selection carrying two faults answers the other one now. Example: `dimensions: ['region']` beside `timeDimensions: [{ dimension: 'zone', granularity: 'month' }]`, where `zone` is declared over the text column `region`. The engine judges a bucket over a text column (`INVALID_FIELD`) before a column named twice, and both live faces answered that. They now answer the column refusal, as the draft preview already did. It is still a 400 refusal, and fixing it meets the other one.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/objectql': minor
3+
---
4+
5+
fix(objectql)!: the registry fold judges an option patch against the options the object's owner declares, as the install door and `os validate` do (#28809)
6+
7+
Clause-②: yes (narrowing) — the object fold every read serves no longer applies a `fieldPatches` option patch whose option the owner's field does not declare: one an extension's `fields` redeclaration adds (applied on `main` when the redeclaring extension folded first), or one a tenant overlay base adds (applied on `main`). Nothing is widened, and no door's accept set moves.
8+
Metadata-protocol: narrowed
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export is added or removed: the install door and `os validate` already refuse this patch, so a package that installs today never carries it. No package or example in this repository declares `fieldPatches`, so there is nothing for a migration to rewrite. -->
11+
12+
**BREAKING** narrowing in the object fold every read serves (`@objectstack/objectql`).
13+
14+
- **Before.** An extension can take an owner field over through `fields` and add an option the owner does not declare, and a tenant overlay base can add one too. A `fieldPatches` option patch of such an added option was judged by the fold against the field as merged so far, so it applied whenever the added option was already there: a tenant overlay base's option, or a redeclaring extension that folded first (a lower `priority`, or the same extension). The install door and `os validate` judge the owner's own declaration and refused the same patch.
15+
- **Now.** The fold asks the one judge (`fieldPatchTargetMisses`, `@objectstack/metadata-core`) of the owner's fields as the owner declares them, and applies only what it admits. A patch of an option the owner does not declare is not applied and is named once in the log, whatever the priorities, as any other unmatched patch is. Which fields a patch reaches is unchanged: the owner's own.
16+
- **Residual, unchanged rule.** When an earlier layer leaves out an option the owner declares (an extension's `fields` redeclaration, or a tenant overlay base), a patch of that option is admitted at all three readers, and the fold has no such option to relabel, so nothing of it applies. The fold asks the same judge once more of the merged fields, which only names: the patch is named once, as on `main`. Nothing is dropped or refused by that second asking.
17+
- **Who sees it.** A package whose extension patches an option the owner does not declare, which only an extension's `fields` redeclaration or a tenant overlay base adds. Both doors already refused such a package. Measured in this repository: none (`fieldPatches` appears in no package or example outside the implementing code and tests).
18+
19+
**The remedy.** Set that option's label where the option is declared: in the `fields` entry of the extension that redeclares the field, or in the tenant's own customization of the field.
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 layered read on a base's address answers an email template locale added in the base's `.custom` pair with the pair's layer (#28830)
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
`GET /meta/email_template/<name>/layers?package=<base>&member=<locale>` (and the same read naming no package) answered `404` for a locale the base does not ship and its `.custom` pair adds, while the by-name read, the base's lists and `sendTemplate` serve that locale since #28802. It now answers the pair's row as the `overlay` and `effective` layers (`code: null`, the base ships no such locale), from the one read the by-name read uses. Another package's added locale stays `404` there and answers under the read naming that package; the base's own locales, the pair's declared overrides and every type whose identity is its name alone are unchanged.
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(app-shell): the condition builder offers `user.isPlatformAdmin` instead of `user.isAdmin` and `user.role`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The no-code condition builder's subject list offered `user.isAdmin` and `user.role`. Neither builds an admin gate. `user.isAdmin` is not a member of the identity the browser evaluates against, so a row on it faults: a field or action `visible` gate then shows the item to everyone, and a navigation gate hides it from everyone. `user.role` is better-auth's legacy scalar, which ObjectStack never writes and which reads `user` for a signed-in platform admin too.
11+
12+
The list now offers `user.isPlatformAdmin`, the platform-admin flag the identity carries on every branch (`false` when signed out), and no longer offers `user.role`. The raw editor's example placeholder teaches `user.isPlatformAdmin` as well. A stored condition on either old subject still opens in row mode with its subject intact and is never rewritten. A new test evaluates every offered `user.*` subject against the real expression scope, so the list cannot drift from it again.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
"@objectstack/metadata-protocol": minor
3+
---
4+
5+
fix(metadata-protocol)!: an `object_extension` item's refusals fit the item door, and an extension names its target by the key the object is registered under (#28834)
6+
7+
Clause-②: no (narrowing) — the save, publish and restore doors refuse an `object_extension` whose `extend` is a short name the registry folds to a different, legacy `<ns>__<name>` key, which they admitted before. Nothing is widened.
8+
Metadata-protocol: narrowed
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export or type changes. One spelling of an existing key's value is refused at the item doors, with a sentence naming the key the object is registered under; a manifest's objectExtensions and stored rows at rest are untouched, so there is nothing for a migration to rewrite and no tombstone. -->
11+
12+
**BREAKING** accept-set narrowing at the `object_extension` item doors (`@objectstack/metadata-protocol`).
13+
14+
- **Before.** `getObject` resolves a short name to a legacy `<ns>__<name>` key (a key `computeFQN` no longer produces, so only an object whose name carries `__` has one). The gate checked that the target resolved, and the registry then filed the extension under the short name it was written with: a second, phantom object beside the real one.
15+
- **Now.** The gate refuses that write with `VALIDATION_ERROR` / 400 on `extend`, and the sentence names both spellings. Save the extension under the key the object is registered as, with `extend` set to it.
16+
- **Who sees it.** No one measured: no manifest or object in this repository or in `hotcrm` has a `__` key, the item door itself landed one change earlier (#28574), and the boot hydration does not run this gate, so a stored row of that spelling is not refused at rest.
17+
18+
Two refusal sentences change wording. Their rule, code and status stay (`NOT_OVERRIDABLE` / 403):
19+
20+
- An `object_extension` carrying `overrides` is told an extension takes no override and is stored under the name of the object it extends, so the fix is to edit the extension itself. It is no longer told to create one "under a new name".
21+
- An `object` carrying `overrides` is told both places an extension is written: an `object_extension` item saved through `/api/v1/meta/object_extension`, or an `objectExtensions` entry of the pair's manifest.
22+
23+
Every other type's override sentence is unchanged.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
fix(mcp): `update_record` and `delete_record` answer a write that landed under a failing roll-up with their own success (#28844)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
Skills-docs: none — no file under `skills/**` teaches what an MCP write tool answers when a parent roll-up cannot be recomputed after the write.
10+
11+
When a child update or delete is applied but a parent's roll-up summary cannot be recomputed after it (`ERR_SUMMARY_RECOMPUTE`, "the triggering records WERE written"), the MCP `update_record` and `delete_record` tools now answer the success result they already publish, the way #28782 made `create_record` answer: `{ object, id, record }` for an update and `{ object, id, success: true }` for a delete, instead of an `isError` result that told an agent its write failed and invited it to apply it again. No new code, member or shape.
12+
13+
- **Runtime bridge**: the tools relay the answer the protocol's `updateData` / `deleteData` already attach to the refusal (#28781).
14+
- **stdio bridge**: `update` and `remove` attach their own answer to the refusal, as its `create` does.
15+
16+
The stale summary column is logged at `error` once per field per process, with the fix. A refusal before the write (validation, permission, not found, exposure) answers exactly as before. `run_action` is unchanged.

‎content/docs/data-modeling/object-extensions.mdx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ reason.
141141
`os validate` when the target is in the same stack. A field whose options come from a
142142
shared picklist has no option labels of its own to patch. At boot, an unmatched patch
143143
is not applied and is named once in the log; the boot carries on.
144+
- **Options are the owner's too.** A patch is judged against the options the owner
145+
declares, everywhere: an option another extension (or your own) adds by replacing the
146+
field through `fields`, or one a tenant's customization adds, is not one a patch can
147+
name, so the install door and `os validate` refuse it and at boot it is not applied
148+
and is named once. If an earlier layer leaves out an option the owner declares, a patch
149+
of that option is admitted but has nothing to relabel, and the boot names it once.
144150

145151
---
146152

0 commit comments

Comments
 (0)