Skip to content

Commit e22d26d

Browse files
committed
Merge origin/main (6211ddf) into the ADR-0160 second-amendment branch
Takes the ADR-0150 addendum's note in ADR-0160 D1 and the outline cap of service-record-context, both merged since the branch point. No conflict. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi13yZRqVcp2mGonWK
2 parents 0a7ff7c + 6211ddf commit e22d26d

224 files changed

Lines changed: 4047 additions & 445 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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
'@object-ui/plugin-detail': patch
4+
'@object-ui/app-shell': patch
5+
---
6+
7+
feat(plugin-approvals): a record's activity shows its approval steps, to the users who can read its approvals
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
A record under approval used to show no approval in its activity: nothing wrote an activity entry for an approval step, so the activity stream's one-line approval entry was reachable only from items a host supplied by hand.
13+
14+
- **One activity entry per approval step.** plugin-approvals now appends one `sys_activity` entry for each step it records in its decision log, about the record the request governs: submitted, approved (`Approved · Manager review`, the step's label after the dot), rejected (`Rejected · Manager review`), sent back for revision (`Sent back for revision · Manager review`), resubmitted, recalled, and cancelled (the record was deleted). Other actions (a reminder, a reassignment, a thread comment, …) write none, and an object that sets `enable.activities: false` gets none, as the CRUD mirror writes none for it. The entry carries no decision comment. It follows ADR-0052 §5, so no published vocabulary changes: `type` is the built-in `system`, the domain kind is `metadata.kind: 'approval'` (with the step's action, its label and the flow and step names beside it), and `source_object` / `source_id` name the request. A deployment without plugin-audit has no `sys_activity` and gets no entries.
15+
- **Each entry reads in the reader's language.** The stored `summary` is the English line from plugin-approvals' own catalog (`approvalActivity*` messages, shipped in all eleven of its locales). A read that carries a locale is served the line re-composed in that locale, and the step's label is read from the app's language pack (`flows.<flow>.approvals.<node_id>.label`) the way the approvals tab reads it, else the stored label: a zh-CN reader sees `已批准 · 经理审批`. A system read, or a read with no locale, gets the stored English line. A failed append never fails the approval step; it is logged once at `error`.
16+
- **Only the users who can read the record's approvals read those entries.** A read of `sys_activity` keeps an approval entry only when the approvals service would serve the caller its request: a participant (submitter, current or past approver), the override actor, or a reader of the record where the object opts into `enable.approvalsVisibleToReaders`. Every other entry is served as before, and plugin-audit's rule that the record must be readable still applies. The record page's activity count and its rows agree.
17+
- **The stream draws each entry as the approval line, and 「看审批」 opens the approvals.** The console reads an activity row with `type: 'system'`, `metadata.kind: 'approval'` and a `sys_approval_request` source as the `approval` feed kind (`APPROVAL_ACTIVITY_FEED_TYPE`, exported from `@object-ui/plugin-detail`), so `approval` now counts as produced. The record page supplies the new `RecordViewApprovalsContext`, and the approval line's 「看审批」 opens the record's 审批 tab, the same place the approval tag in the header opens; with no approvals the reader is served, the line has no link. The entry keeps `sys_activity`'s own lifecycle (reaped after 14 days); the 审批 tab keeps the full history.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/plugin-charts': patch
3+
---
4+
5+
fix(plugin-charts): a chart's value axis prints its dataset measure's percent and currency units
6+
7+
Clause-②: yes
8+
Metadata-protocol: none
9+
10+
- **A value axis over a dataset measure reads in the measure's units.** The chart renderer's internal series props carry one more producer-filled key, `series[].measureFormat` (the measure's `format`, `currency` and `percentScale`), beside `series[].aggregate`. The report chart and the dashboard widget fill it from the dataset answer; it is not meant to be authored, and objectstack#37214 refuses it on a static chart node. A value axis whose series all carry the same one prints its ticks, and the data labels that share its format, in that measure's units:
11+
- a percent pattern prints through `formatMeasure`, the function the table uses, at the column's own `percentScale`. A measure stored in percentage points (`percentScale: 'whole'`) reads `0.0%` … `36.0%`, where the axis printed `0` … `36`;
12+
- a measure with one ISO currency prints the compact default with that currency's symbol (`CN¥3K` … `CN¥12K`, `¥30万` in Chinese), where the axis printed `3K` … `12K`.
13+
- A declared axis `format` still wins over the measure's units. A measure with a per-row currency (`currencyField`) has no single currency, so its axis keeps plain numbers. Two series on one axis that are formatted differently also keep the default axis.
14+
15+
Nothing to migrate: no metadata key changes, and the widened series type is the renderer's internal one.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-dashboard': patch
3+
---
4+
5+
fix(plugin-dashboard): a dashboard chart widget's value axis prints its measure's percent and currency units
6+
7+
Clause-②: yes
8+
Metadata-protocol: none
9+
10+
A dataset chart widget's series now carry the format facts of the measure they plot (`format`, `percentScale` and its single currency) as the chart's internal `series[].measureFormat`. The value axis then prints a percent measure as percents (`0.0%` … `36.0%` for a rate in percentage points, which drew `0` … `36` before) and a currency amount with its symbol, as the widget's table prints them. A measure with a per-row currency (`currencyField`) keeps plain numbers. A dimensionless chart that plots several measures carries a format only when they all share it.
11+
12+
Nothing to migrate: no metadata key changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-report': patch
3+
---
4+
5+
fix(plugin-report): a report chart hands its chart the measure's format, so the value axis reads `33.3%` and `¥` beside the table
6+
7+
Clause-②: yes
8+
Metadata-protocol: none
9+
10+
A report chart's series now carry the plotted measure's `format`, `percentScale` and single currency as the chart's internal `series[].measureFormat`. The chart's value axis then prints a measure stored in percentage points (`percentScale: 'whole'`) as percents and a currency amount with its symbol, as the table beside it does. A measure with a per-row currency (`currencyField`) hands no currency, so its axis keeps plain numbers. The fraction-scale percent pattern still travels on the value-axis `format` key as before.
11+
12+
Nothing to migrate: no metadata key changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/console': patch
3+
---
4+
5+
fix(console): the developer pages and the device sign-in approval send the stored sign-in token, so a session held by its token alone works there too
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The developer integrations page, the agent-connect section (discovery and creating an API key) and the device sign-in approval (claim, approve, deny) asked this server with the session cookie only, so a session held by its sign-in (bearer) token alone was refused there. They now send the stored token as well, as the other same-server console requests do. The session cookie is still sent, so a cookie session behaves exactly as before, and a refused request now reaches the console's session-ended check. Nothing changes in what the server accepts.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(app-shell): the package list, Studio, AI chat and draft screens send the stored sign-in token, so a session held by its token alone keeps its packages, Studio and design entries
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
These screens asked this server for their data with the session cookie only, while the other same-server console requests also send the stored sign-in (bearer) token. A session held by its token alone (a second local runtime on the same host replaced the cookie, the browser blocked it as a third-party cookie, or the cookie jar was cleared) was refused there. The most visible case was the package list behind the sidebar, the app header, the command palette and the Studio entries: every package went missing, and the Studio and design entries with it, with no error shown.
11+
12+
They now send the token as well:
13+
14+
- packages: the package list and the package switcher, creating a package's customization package, duplicating a package, a package's customizations, and the package form;
15+
- Studio: the automation status, cloning a flow, cloning a permission set, the flow picker and connector inputs, a flow's run history and node palette, the page preview, the sharing-rule catalog and catalog activation, and the packaged action and flow ledgers in Setup;
16+
- drafts: the pending drafts, the unpublished-app bar, the draft changes panel and its flow checks, and the commit history with its revert;
17+
- AI: the conversation list and conversations, the build-debug report, AI usage, and suggested bindings;
18+
- the inbox bell, the approval feeds and a record's approvals, and changing a record's owner;
19+
- the shell: the no-access state, the deployment notice, the connect-agent widget, the context selectors (only for requests to this server's own origin), the design-mode language list, and the marketplace's install steps on this server.
20+
21+
The session cookie is still sent, so a cookie session behaves exactly as before, and a refused request now reaches the console's session-ended check. A few requests stay cookie-only for now, among them sign-in, the OAuth hand-off, public forms and calls to the cloud control plane; they are unchanged. Nothing changes in what the server accepts.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(console): on a desktop the way-home controls name the app start page they open, and the app pill drops its duplicate 「All apps」 row
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
From 768 px up the platform home page is retired: Home is where `/` lands, the last-used app's start page. Four desktop controls still named a home page or a list of apps:
11+
12+
- The app pill's menu ended with 「All apps」, which opened the same app start page as the 「Back to app start page」 row above it. A desktop has no page that lists the apps; the menu's 「Switch Application」 group is that list. On a desktop the row is gone.
13+
- The 「Back to home」 button on the not-found, access-denied and app-verdict screens, and on a record that cannot be read, now reads 「Back to app start page」 (zh: 返回应用起始页) on a desktop.
14+
- The no-assistant screen at `/ai` does the same.
15+
- The product mark's accessible name, 「PRODUCT home」, is 「Back to app start page」 on a desktop. Its tooltip is still the product's name.
16+
17+
A phone, whose Home is still its app list at `/home`, keeps 「Back to home」, 「PRODUCT home」 and its drawer's 「All apps」. No targets change. The wording reuses the existing `layout.appSwitcher.backToHome` key, so no locale key is added or removed. No props or exports change.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/service-record-context': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
feat(ai): `get_record_context` caps a body outline's entries and states the cut
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
A long body comes back as an outline of its headings. That outline had no cap, so a long body that is mostly headings made an outline answer as big as the body. The outline is now bounded whatever the body holds.
12+
13+
- **`RECORD_CONTEXT_OUTLINE_MAX_ENTRIES` (80), new export of `@objectstack/service-record-context`.** An outline lists at most 80 headings, and its listing, serialized, stays within `RECORD_CONTEXT_BODY_MAX_CHARS` (8000). When a body has more, the outline keeps the shallowest levels first and lists them in body order, so a listed section's text holds the headings left out under it. Every heading's `anchor` still reads its section, listed or not, and a listed anchor is the same whether or not the outline was cut.
14+
- **New note kind `outline_truncated`** on `RecordContextNoteKind` in `@objectstack/spec/ai`. When the cap cuts, the answer carries one such note beside `body_outline`, and its sentence says how many headings are not listed. A consumer that switches over note kinds exhaustively must handle the new value.
15+
- A body whose only heading is too long to list within the bound is carried as text up to the bound and marked `truncated`, the same as a long body with no headings.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
chore(studio): one table holds the order and the 常用 / 高级 tier of every type Studio's left menu lists
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`studioMenuPlacement.ts` adds `STUDIO_MENU_PLACEMENT`, one ordered list of `{ type, tier }` rows. The common rows are object, app, page, dashboard, report, flow, permission, agent, tool and skill, in that order; every other type the directory lists is advanced, picklist, email template and `ai_context` included. The table holds order and tier only: a type's group stays its served registry `domain`. A test holds the list against `DEFAULT_METADATA_TYPE_REGISTRY`, so a newly registered type fails until it has a row, and against the Order and Tier columns of ADR-0084's type-to-group table, so the record and the code cannot drift apart. Nothing reads the table yet, and the menu draws exactly what it drew before.

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ edited (`is_edited` on the row).
510510
511511
### Feed kinds with no producer
512512

513-
`FeedItemType` publishes thirteen kinds. ObjectUI produces **five** of them:
513+
`FeedItemType` publishes thirteen kinds. ObjectUI produces **six** of them:
514514

515515
| kind | produced by |
516516
|---|---|
@@ -519,22 +519,23 @@ edited (`is_edited` on the row).
519519
| `event` | `sys_activity` type `scheduled` |
520520
| `system` | `sys_activity` type `system`, **and** any author-extended type the map has never seen (it renders through the generic presentation rather than vanishing), **and** a `completed` row a milestone fired (`metadata.kind: 'milestone'`) |
521521
| `comment` | `sys_comment` rows, merged in by the console's record page and handed to the block through the discussion context |
522+
| `approval` | `sys_activity` type `system` with `metadata.kind: 'approval'` and `source_object: 'sys_approval_request'`, which plugin-approvals writes once per approval step (submitted, approved, rejected, recalled); served only to the users who can read the record's approvals |
522523

523-
The other eight — `email`, `call`, `note`, `file`, `record_create`,
524-
`record_delete`, `approval`, `sharing` — have no producer on any ObjectUI
524+
The other seven — `email`, `call`, `note`, `file`, `record_create`,
525+
`record_delete`, `sharing` — have no producer on any ObjectUI
525526
surface. A `types` list of only such kinds renders a **permanently empty**
526527
timeline. Since objectui#5877 it also emits one `console.warn` per distinct
527528
kind, so the emptiness is diagnosable instead of looking like "a working
528529
feature with no data yet".
529530

530531
Beside the default composer such a list is refused before it ever renders.
531-
`types: ['approval']` leaves out `'comment'` while `showCommentInput` defaults
532+
`types: ['call']` leaves out `'comment'` while `showCommentInput` defaults
532533
to `true`, so `os lint`, `os validate`, `os build`, the page save door and the
533534
console's schema mirror report it at error as `component-props-invalid` at
534535
`properties.showCommentInput` (`properties.feed.showCommentInput` on
535536
`record:chatter` / `record:discussion`). Add `'comment'` to `types` when the
536537
block should take comments, or set `showCommentInput: false` when it should
537-
stay comment-free; `types: ['approval']` with `showCommentInput: false` parses
538+
stay comment-free; `types: ['call']` with `showCommentInput: false` parses
538539
and renders the empty timeline above. A page already stored with the shape
539540
still loads; its next save is refused.
540541

0 commit comments

Comments
 (0)