Skip to content

Commit f576d3d

Browse files
Merge branch 'main' into claude/sec2-ph96
2 parents e2133d6 + f02f4f6 commit f576d3d

427 files changed

Lines changed: 14096 additions & 4431 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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/core': patch
3+
'@objectstack/spec': patch
4+
'@objectstack/cloud-connection': patch
5+
---
6+
7+
fix(core): a composed artifact whose packages depend on each other in a cycle is refused as `422 CYCLIC_ARTIFACT_PACKAGES` naming the cycle, and install-local answers every artifact-resolver refusal instead of a 500
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
- `@objectstack/core`: `resolveArtifactPackageEntries` / `resolveArtifactPackageOrder` refuse packages that depend on each other in a cycle with the ADR-0112 envelope their other refusals carry: `code: 'CYCLIC_ARTIFACT_PACKAGES'`, `status: 422`, and `details.cycle` listing the package ids along the cycle (each depends on the next, the first repeated last). Before, the cycle was a bare `Error` with no `code` or `status`. A caller that matched on the old message still finds `Circular dependency detected` in it. `resolvePluginOrder` now throws its cycle as `PluginOrderCycleError`, a new exported `Error` subclass that carries `cycle`. Its message is unchanged and it carries no `code`, so a kernel boot that hits a plugin cycle reads exactly as before.
13+
- `@objectstack/spec`: `CYCLIC_ARTIFACT_PACKAGES` is registered in `ERROR_CODE_LEDGER` under `@objectstack/core`, so `ErrorCode` accepts it.
14+
- `@objectstack/cloud-connection`: `POST /api/v1/marketplace/install-local` answered `500 INTERNAL_ERROR` with no reason for a composed artifact the resolver refuses: a `packages` that is not a list, a malformed entry, a duplicate package id, or a dependency cycle. On a real runtime, the step that judges the package's jobs and hooks reads the packages first and let the refusal escape. That step now answers the refusal itself, with its own status, code and `details`, and nothing is written. Every other step that reads the packages already did.
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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/components': patch
3+
'@object-ui/plugin-detail': patch
4+
---
5+
6+
fix(ui): on a phone the record page keeps Edit in its bottom bar, names the current stage in full, and lays its key fields out in two columns
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Three phone-width changes to the record page. Desktop layouts are unchanged.
12+
13+
- **Bottom action bar.** On an editable record the bar is now Edit, the primary action, then the `⋯` menu with every other action. Before, the page's own actions took both slots first, so an object with two record actions pushed Edit into the `⋯`. The primary is the action declaring `variant: 'primary'`, else the first action. A record the reader cannot edit keeps the primary and one more. A destructive host action (Delete) still always goes in the `⋯`. `page:header`'s `mobileMaxVisible` still sets how many buttons the bar holds; a budget of one is Edit's.
14+
- **Stage bar (`record:path`).** Below the `sm` breakpoint the path draws one progress segment per stage and no stage names, then one line with the step and the current stage's full name ("Step 5 of 6 · Negotiation", the existing form `stepOf` copy). The step counts the forward stages; a record on a lost stage shows that stage, marked lost, with no step. Tapping the line lists every stage by its full name, and on a path that allows stage changes each reachable stage there moves the record, behind the same permission and state-machine checks as on desktop. Nothing is authored for this: the viewport picks the mode.
15+
- **Key-field strip on a hand-written page.** Below `sm` the strip is a two-column grid, as the default page's is, so six key fields read as three rows instead of six lines. A value too long for its cell ends in an ellipsis.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/components': patch
3+
'@object-ui/types': patch
4+
---
5+
6+
fix(components): an editable list's lookup column is wide enough for its record picker
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
With inline editing on, a lookup column in a list was sized from the short names its cells draw, often 80 to 121px. Its cell editor is the record picker, so the picker's trigger got a few dozen pixels and the option list it opened cut every name ("C..", "W."). In an editable table, a foreign-key column (a lookup, master-detail, tree or user field) whose cells edit is now never narrower than 168px, the width the inline line-item grid already gives its lookup columns. A wider name still widens the column as before. A width the view pins, or the user's own resize, is drawn exactly as written, and read-only tables and columns that do not edit are unchanged.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/plugin-sharing': patch
4+
'@objectstack/plugin-hono-server': patch
5+
'@objectstack/client': patch
6+
'@object-ui/permissions': patch
7+
'@object-ui/plugin-list': patch
8+
---
9+
10+
feat: the list toolbar offers the "In a queue" toggle only on objects that actually use queues
11+
12+
Clause-②: yes (widening)
13+
Metadata-protocol: added
14+
15+
Until now the toggle appeared on every list of an object with a user owner as soon as the organization had a single queue, although on most of those objects no record ever sits in a queue, so it could only return an empty list. It now appears only on an object where a queue can hold something:
16+
17+
- a record of the object sits in a queue now (no owner, a queue set), or
18+
- an active assignment rule routes the object's new records into a queue: one of the organization's own rules, or a rule an installed package declares that is not switched off.
19+
20+
Nothing is authored for this. The server works it out from the rules and the records.
21+
22+
`GET /auth/me/permissions` carries the answer as a new field beside `hasAnyQueue`: `objectsUsingQueues`, a list of object names, declared in `MePermissionsAuthenticatedResponseSchema`. It names only objects the caller may read, and never a queue name or a count. It is empty when the organization has no queue, when no ownership-queue service is registered, and on the closed body. The ownership-queue service contract gains the optional method `objectsUsingQueues(organizationId)`, implemented by `@objectstack/plugin-sharing`. The method checks each owned object for one sitting record (`limit 1`) and reads the routing rules once. The route asks only when `hasAnyQueue` is true, so an organization with no queue pays nothing extra.
23+
24+
**Migration.** `objectsUsingQueues` is required on the strict `MePermissionsAuthenticatedResponseSchema`. Code that builds a `MePermissionsAuthenticatedResponse` (a test fixture, a stub server) adds `objectsUsingQueues: []` beside `hasAnyQueue`. Code that parses a body from a server older than this release with the schema gets a parse failure for the missing key: parse with `.partial({ objectsUsingQueues: true })` or default it to `[]` until the server is upgraded. The console does not parse; it reads the field and treats its absence as "no object".
25+
26+
The console reads the field from the payload it already loads once per session. A record that starts sitting in a queue on an object not listed yet shows the toggle from the next time the permissions are read. An answer without the field is treated as "no", the same way an unknown `hasAnyQueue` is.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@object-ui/plugin-form': patch
3+
---
4+
5+
feat(plugin-form): the form dialog's header has a maximize / restore button, like the record drawer's, and remembers the choice per object
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A create or edit dialog could not be made bigger: a long form, or a form with line items, stayed in a dialog capped at 90% of the window height. The dialog header now has the record drawer's maximize button (the same icon, size and labels, "Maximize" / "Restore size"), just before the close (X) button.
11+
12+
- **Maximize** widens the dialog to the `full` size (95% of the window width) and makes it fill 95% of the window height. The form body scrolls inside the dialog.
13+
- **Restore size** puts the dialog back to its declared or inferred size.
14+
- The form stays open the whole time. Typed values, the unsaved-changes prompt on close, and line items added in a form with `subforms` are all kept.
15+
- Both dialog kinds have the button: a plain form and a form with `subforms` (line items).
16+
- A maximized dialog with no declared `columns` uses the `full` column count, so a form with sixteen or more fields shows four per row.
17+
- The choice is remembered per object in the browser's local storage. The next dialog for that object opens the same way. Other objects are not affected.
18+
- On a phone the dialog already fills the screen, so the button is shown from the `sm` breakpoint up only.
19+
20+
No metadata changes. An authored `modalSize` is still the size the dialog opens with until the user maximizes it.

0 commit comments

Comments
 (0)