Skip to content

Commit f85988a

Browse files
committed
Merge origin/main into claude/issue-34604-modal-form-maximize
Keeps the section nav strip (#34642) and the maximize switch side by side: the flat arm's header drops its bottom rule when the nav strip draws one. Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-authored-by: Claude <noreply@anthropic.com>
2 parents ea132c4 + b1da9f5 commit f85988a

182 files changed

Lines changed: 8631 additions & 2924 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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/core': minor
4+
'@objectstack/runtime': minor
5+
'@objectstack/lint': minor
6+
'@objectstack/service-automation': patch
7+
---
8+
9+
feat(hooks): a hook writes the sentences it declares in the organization's language
10+
11+
Clause-②: yes (widening) — a hook may now declare `texts` and its code may call `ctx.text`; translation bundles accept `hooks.<hook>.texts.<key>.message`; `@objectstack/core` exports `readOrganizationTextLocale`. Nothing that was accepted before is refused
12+
Metadata-protocol: added
13+
Skills-docs: follow-up #34546
14+
15+
A hook can now declare the sentences it writes into records for people to read, and ask for one by key: `texts: { follow_up_subject: { message: 'Follow up with qualified lead: {{ lead }}', params: ['lead'] } }`, then `await ctx.text('follow_up_subject', { lead })`. The answer is in the organization's language, because everyone in the organization reads the record: the Localization setting (`localization.locale`) when somebody set it, else the app's declared `i18n.defaultLocale`. It is never the language of the person whose save fired the hook. The translation `hooks.<hook>.texts.<key>.message` is picked first, then its `{{ }}` holes are filled from `params`.
16+
17+
- A missing translation, or no language to pick, answers the declared sentence, and the hook goes on.
18+
- A Localization setting that cannot be read rejects the call, so another language is never stored over a choice that may exist. A host that registers no `localization` setting has none set, so the app's declared default answers.
19+
- Only declared text is translated: a string the hook builds itself is written as it is. A key `texts` does not declare is refused when the hook is saved if the hook asks for it literally (`ctx.text('key')`), otherwise when the hook runs, as a fault naming the hook and the key. `texts` on an `expression` body, or on a hook with neither a body nor a handler, is refused. A text with no `params` is plain text, and a `{{ }}` hole in it is refused.
20+
- A text with `params` is compiled like a declared refusal's sentence: a hole over another name is refused when the hook is saved, and `objectstack validate`, `compile` and the publish gate refuse a hole holding logic, an unknown formatter, an empty hole and `{{ amount | currency }}` with no code. A translation whose holes do not render at run time is dropped for the declared sentence, filled.
21+
- `ctx.text` is the same on a sandboxed `js` body and on an in-process `handler`.
22+
- `os i18n extract` scaffolds the key, and the existing coverage check counts it. `objectstack validate` refuses a `hooks.<hook>.texts.<key>` translation over a key the hook does not declare.
23+
- Text is picked when it is written. Records already written are not changed.
24+
25+
`@objectstack/core` exports `readOrganizationTextLocale`: the one reading of the organization's language that every writer of such text shares, with an unregistered Localization setting answered as not set. The flow record write (`@objectstack/service-automation`) now reads through it; its answers are unchanged.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
feat(approvals): the approval request page shows the whole business record, not a six-field summary
8+
9+
Clause-②: yes (widening — new @object-ui/i18n locale keys only; no metadata or schema accept set)
10+
Metadata-protocol: none
11+
12+
An approver used to see the request's amount and at most six fields under "As submitted", and had to open the business record to read the rest. The request page (`sys_approval_request_detail`) now draws the request whole, with no tabs: the header, the highlights, then the decision panel (`record:approval_decision`), last.
13+
14+
- **On top:** the deciding comment on a decided request, and the request's declared decision actions, unchanged.
15+
- **Left, "As submitted":** every field of the request's snapshot the reader may read, in the sections and order of the target object's default record page, each through the record page's own cell. Field-level security is unchanged: the service's per-reader redaction and the client's field verdicts both apply. The panel reads the target record once (`findOne`, no params). A field whose current value differs from the submitted one is marked "Changed" with its current value. If the record cannot be read, nothing is marked and the card says so. Below the card are the record's child tables (owned `master_detail` children and `relatedList: 'primary'` tables). They are read-only and show CURRENT rows, with a note saying so, because the snapshot keeps the record's own row only.
16+
- **Right rail, in this order:** approval progress (the step line, the decision tally, and who the request waits on), the record's attachment fields, and the request's activity (its `sys_approval_action` thread, newest first). The activity is read only when the reader's verdict allows reading that object. In the console the approvals route answers that read for every party to the request.
17+
18+
Nothing is editable on the page, and the snapshot's storage is unchanged. The record approvals panel and the request page now share one action-timeline component. New `approvalsInbox.*` keys in all eleven `@object-ui/i18n` packs: `snapshotChanged`, `snapshotCurrentValue`, `snapshotOpenRecord`, `snapshotCurrentUnreadable`, `snapshotChildCurrent`, `progressTitle`, `attachmentsTitle`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(app-shell): the notification bell opens a full-height panel on the right, with pending approvals on top and decidable in place
7+
8+
Clause-②: yes (widening) — two new locale keys in the `notifications` namespace of every `@object-ui/i18n` pack (`needsYou`, `viewApprovalDetails`); nothing that worked before is refused
9+
Metadata-protocol: none
10+
11+
The bell in the console header (and the `global:notifications` page block) used to open a 384 px popover whose lists stopped at 320 px, about three rows. It now opens a panel the full height of the window on the right, 440 px wide, and the lists take all the height the header and tabs leave.
12+
13+
- **The page stays usable.** The panel has no overlay, and a click in the page does not close it. Opening a notification takes the page to its record while the panel stays open on the next one. The panel closes from its close button, Escape or the bell, and it gives way when the record drawer opens, so the two never stack on the right.
14+
- **Approvals come first.** The Notifications tab opens with "Needs your action": the pending approval requests the bell counts, each with its approve and reject buttons and "View details". The buttons are the request's own declared actions (`approval_approve`, `approval_reject` at `list_item`), run through the same declared-actions bar the request's record page uses. So a viewer sees a button only when its `visible` rule passes, a request that needs decision fields collects them in the action's dialog, and the request sent is the declared one. A decided request leaves the list and the badge at once, and the approvals are read again. The Approvals tab lists the same requests.
15+
- **"Mark read" is an icon** that shows when a row is hovered or focused, instead of a column on every row. "Mark all read" and "View all notifications" stay.
16+
- **On a phone the panel fills the screen**, and following a link closes it.
17+
18+
The notification data, its grouping and the three tabs are unchanged.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
feat(plugin-detail): the default record page shows Activity last — after the related panels, attachments and approvals
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On a record page nobody wrote by hand, the Activity stream used to come first in the right column, right after the details on a narrow screen, and second in the tab row. Members open the related records far more often than the stream, so the stream now comes last everywhere the default page draws it:
11+
12+
- wide and two-column layouts: the right column reads related panels, then attachments, then approvals, then Activity;
13+
- one-column layout (a phone, the split pane): details, related panels, attachments, approvals, then Activity at the very bottom;
14+
- the tab row: Overview, the related panels, then Activity. While the panels' first counts are still loading, the Activity tab waits off the row with them, so no tab moves when they arrive;
15+
- the synthesized `page:tabs` strip (`buildDefaultTabs`, `buildDefaultPageSchema`, and what Studio seeds a new record page with): Details, Related, Approvals, then the Activity stream.
16+
17+
A hand-written record page keeps the order its author wrote. Nothing an author writes changes: every tab keeps its `value` (`details`, `related`, `approvals`, `timeline`), so `?tab=` links still open the same tab. Code that splices a custom tab into `buildDefaultTabs(...).items` by position should find its place by `value`, since the Activity stream's index moved from second to last.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/layout': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
feat(console): on a phone, an app's menu is a bar along the bottom edge, and 「More」 opens the full menu with a star on every entry
8+
9+
Clause-②: yes (widening — one @object-ui/layout export + new @object-ui/i18n locale keys; no metadata key)
10+
Metadata-protocol: none
11+
12+
Below 768 px, inside an app, the Console draws a menu bar at the bottom of every list, dashboard, report and page. Before, the app's menu was only in the sidebar drawer, behind an unlabeled icon at the top left.
13+
14+
- The bar holds up to four of the app's entries, then **More**. The four are the entries the user pinned in this app, in their pinned order, then the app's own entries in menu order. Pins are the existing per-user pins (the desktop sidebar's Favorites), so a pin made on one device shows on the others. No metadata key is involved.
15+
- **More** opens the full menu: the app's groups, a search box, and a star on every entry. A tap on the star pins or unpins the entry, and the bar follows at once.
16+
- The top-left control on a phone now goes back to the environment's home. From 768 px up it is still the sidebar toggle.
17+
- A record page and a record form (create or edit) draw no bar: their bottom edge belongs to the record's actions and the form's buttons.
18+
19+
`@object-ui/layout` exports `drawnNavigationEntries(items, options)`: the entries a navigation tree draws, in the sidebar's reading order, through the sidebar's own guards. `AppSchemaRenderer`'s bottom navigation now uses it too, with no change in what it shows.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/components': patch
3+
'@object-ui/plugin-form': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
feat(plugin-form): a sectioned form shows its sections as a navigation strip; a click scrolls to the section, and a section with errors carries the count
8+
9+
Clause-②: yes (widening — one @object-ui/components export + new @object-ui/i18n locale keys; no FormSchema or spec key)
10+
Metadata-protocol: none
11+
12+
The new export is `FormSectionNavContext` with its `FormSectionNavItem` / `FormSectionNavSink` types; the new locale keys are `form.sectionNav` and `form.sectionNavErrors`. Nothing that worked before is refused.
13+
14+
A create or edit dialog whose form is stacked in sections now shows one entry per visible section between the title and the scrolling body; a full-page sectioned form shows the same strip above its sections, sticky at the top of the page. A click scrolls to the section, unfolding it first when it is collapsed, and the entry of the section in view is highlighted while the form scrolls. When a submit is refused, each entry shows how many fields in its section need fixing, and the count drops as the fields are fixed.
15+
16+
The strip appears only with two or more visible sections. A section hidden by its `visibleWhen` is not listed. A tabbed form keeps its tab strip and gets no section strip. Nothing is configured: no form, section or field key turns it on or off.
17+
18+
For hosts: the `form` renderer reports the section headings it draws, with each section's error count, to a sink provided through `FormSectionNavContext`; each heading row now carries a stable `id` and a `data-form-section` attribute naming its section.

‎.gitattributes‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@
105105
# markers, rebuilt by `node scripts/check-system-context-census.mjs --write`. It
106106
# stays unrouted, as `tenant-audit-census.mdx` beside it (a generated region that
107107
# `node scripts/tenant-audit-census.mjs --write` rebuilds) always has: both are
108-
# MIXED pages that git text-merges, so neither side's prose is dropped, and the
108+
# MIXED pages that git text-merges, so neither side's prose is dropped; the
109109
# register carries one line per symbol and no total, so two read-adding branches
110-
# merge apart. ⚠️ What catches a merge that leaves a region wrong is that page's
110+
# merge apart; and since #33942 the tenant-audit region carries no population
111+
# figure (the totals live in per-package ledger shards under `docs/audits/`), so a
112+
# branch adding a write site does not touch that page. ⚠️ What catches a merge that leaves a region wrong is that page's
111113
# gate, which holds the region equal to its `--write` output on every PR in the
112114
# required `Lint & Repo Gates` job (`scripts/check-system-context-census.mjs`,
113115
# `scripts/check-tenant-audit-census.mjs`). Why neither is routed is recorded in

‎.github/CODEOWNERS‎

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
#
1111
# The owner list on EVERY row mirrors `GOVERNED_APPROVERS` in
1212
# scripts/pm/check-governed-queue-guard.mjs — the one list of accounts whose
13-
# APPROVED review lands a Tier H surface (「os-zhuang hotlong 批准算数」). The
14-
# rows mirror the Tier H rows of `GOVERNED_SURFACES` in
15-
# scripts/pm/check-governed-merges.mjs. This file is static and can import
13+
# APPROVED review lands a Tier H surface. Since 2026-11-17 that is `os-zhuang`
14+
# alone (maintainer, triage session, verbatim: 「hotlong 从批准账户中去掉,只保留
15+
# os-zhuang」), superseding the membership of 2026-08-27 (「os-zhuang hotlong
16+
# 批准算数」), which this line carried until then. The rows mirror the Tier H
17+
# rows of `GOVERNED_SURFACES` in scripts/pm/check-governed-merges.mjs. This file is static and can import
1618
# neither, so the two stay in step the only way a static file can:
1719
# `node scripts/pm/check-governed-queue-guard.mjs --self-test` reads this file
1820
# (`codeownersMirrorVerdict`) and reds when a Tier H row has no line here, when
@@ -36,10 +38,12 @@
3638
# code owner without write access is ignored by GitHub without a word:
3739
# `GET /repos/{owner}/{repo}/codeowners/errors` reads this file's own verdict.
3840
#
39-
# Both logins are verified, not assumed: `hotlong` authors the bulk of main's
40-
# history as 50353452+hotlong@users.noreply.github.com (GitHub's {id}+{login}
41-
# noreply form ties the login to the account); `os-zhuang` is named by the
42-
# ruling above and has readied and reviewed this repository's pulls.
41+
# The login is verified, not assumed: `os-zhuang` is named by both rulings
42+
# above and has readied and reviewed this repository's pulls. Until 2026-11-17
43+
# every row also named `@hotlong` (verified then as the account authoring the
44+
# bulk of main's history, 50353452+hotlong@users.noreply.github.com); the
45+
# 2026-11-17 ruling removed it, because `hotlong` runs seats and an approver
46+
# account never does.
4347
#
4448
# The enforcement chain is routed the same way, deliberately: a PR that edits
4549
# the audit script, the approver constant or this file is a governance change —
@@ -48,21 +52,21 @@
4852

4953
# Tier H governed surfaces — the register's rows with tier H, less the
5054
# low-risk arm's `/docs/adr/` and `/skills/` rows (see the header)
51-
/AGENTS.md @os-zhuang @hotlong
52-
/CLAUDE.md @os-zhuang @hotlong
53-
/docs/NORTH-STAR.md @os-zhuang @hotlong
54-
/.github/workflows/ @os-zhuang @hotlong
55+
/AGENTS.md @os-zhuang
56+
/CLAUDE.md @os-zhuang
57+
/docs/NORTH-STAR.md @os-zhuang
58+
/.github/workflows/ @os-zhuang
5559

5660
# Tier H governed surfaces of the nested `ui/` workspace (#25712) — the same
5761
# register rows, under `ui/`; `ui/.claude/` is Tier H, unlike the root tree;
5862
# `/ui/skills/` carries the low-risk arm too and has no line
59-
/ui/docs/adr/ @os-zhuang @hotlong
60-
/ui/.claude/ @os-zhuang @hotlong
61-
/ui/AGENTS.md @os-zhuang @hotlong
62-
/ui/CLAUDE.md @os-zhuang @hotlong
63-
/ui/.github/workflows/ @os-zhuang @hotlong
63+
/ui/docs/adr/ @os-zhuang
64+
/ui/.claude/ @os-zhuang
65+
/ui/AGENTS.md @os-zhuang
66+
/ui/CLAUDE.md @os-zhuang
67+
/ui/.github/workflows/ @os-zhuang
6468

6569
# The enforcement chain
66-
/.github/CODEOWNERS @os-zhuang @hotlong
67-
/scripts/pm/check-governed-merges.mjs @os-zhuang @hotlong
68-
/scripts/pm/check-governed-queue-guard.mjs @os-zhuang @hotlong
70+
/.github/CODEOWNERS @os-zhuang
71+
/scripts/pm/check-governed-merges.mjs @os-zhuang
72+
/scripts/pm/check-governed-queue-guard.mjs @os-zhuang

‎content/docs/automation/hook-bodies.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ The script sees only what the surrounding `ctx` object exposes:
103103
| `ctx.api.object(name).insert\|update\|delete` | Cross-object writes. | `api.write` |
104104
| `ctx.title()` | This record's title — the object's `nameField`, **including when it is a `formula`** (evaluated server-side against the record already in hand: no extra read over the record's own columns, one read per lookup a title such as `record.book.title + ' · ' + record.reader.name` reads through). | none |
105105
| `ctx.title('<lookup field>')` | The related record's title, through a lookup / master_detail / user / tree column. Costs one `findOne` (plus the lookups that record's own title reads through). | `api.read` |
106+
| `ctx.text('<key>', params?)` | A sentence the hook declared under `texts`, in the **organization's** language (translated, holes filled from `params`), for a value it writes into a record. Hook bodies only. See [Writing a sentence people read](/docs/automation/hooks#writing-a-sentence-people-read--texts). | none |
106107
| `ctx.crypto.randomUUID()` | UUID generation. | `crypto.uuid` |
107108
| `ctx.log.{info,warn,error}` | Structured logging. | `log` |
108109
| `ctx.email.send({ to, subject, text })` | Sends mail through the mail service, from the configured sender, as the calling user and under the caller's organization. An action or a job body only: a hook body cannot send mail, because a message cannot be taken back if the write that runs the hook rolls back. A hook whose body is granted `email.send` is refused when it is saved, validated, built or bound, and the Console does not offer the grant on a hook. Send mail on a record change from an action, a job or a flow. See [Email service](/docs/kernel/runtime-services/email-service#from-a-script-body). | `email.send` |

0 commit comments

Comments
 (0)