Skip to content

Commit e428611

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-36511-studio-save-cancel
# Conflicts: # ui/packages/app-shell/src/views/studio-design/DataPillar.formViewLayout-30057.test.tsx # ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx
2 parents 9dac29f + abe95a9 commit e428611

169 files changed

Lines changed: 5069 additions & 2961 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+
'@object-ui/console': patch
3+
---
4+
5+
fix(console): an approval request opened with no source app stays in an app instead of landing in Setup
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
An approval request opened from Home's My work, from the bell outside an app, from a notification or from the e-mail link used to open under the app whose navigation lists the request's record, and otherwise under Setup. It now opens in this order: the app that lists the record's object, then the current app, then the app the person last used, then the first app they can open. Setup is the answer only when it is the current or the last used app. The server's `/system/approvals?request=ID` link, which forwards through `/apps/setup/system/approvals`, moves on to that app too, and so does the approvals inbox opened there without a request.
11+
12+
On the request page reached this way, the close button and the phone's back link return to the approvals inbox of that app, not to the raw approval request list. A request opened from Home or from the bell is handed the pending queue they list, so the page counts through it and "Open next after deciding" moves on to the next request. The e-mail link and a notification carry only the way back.
13+
14+
`/apps/com.objectstack.setup/system/approvals`, Setup's own address, is unchanged.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@object-ui/fields': minor
4+
'@object-ui/i18n': minor
5+
'@object-ui/plugin-form': minor
6+
---
7+
8+
fix(fields): a lookup pick no longer copies an amount into a field in another currency; the field stays empty and the form says why
9+
10+
Clause-②: yes (narrowing) — a cross-currency price copy that happens today stops and the line is left empty with a stated reason (ruled B); widened: three new `@object-ui/i18n` `lookup.autofill*` keys in every locale pack, new `@object-ui/fields` exports from `lookupAutofill.ts` (`planDeclaredLookupAutofill`, `crossCurrencyRefusal`, `amountCurrencyOf`, `pickedAmountCurrencyOf`, `withheldAutofillMessage`, `withLookupAutofillTargets`, `readLookupAutofillTargets`, `LOOKUP_AUTOFILL_TARGETS_KEY` and their types), an optional second argument on `onSelectRecord`, an optional trailing `currency` parameter on `declaredLookupAutofillPatch` and `lookupAutofillPatch`, and the optional `columnFields` prop on `GridField`
11+
Metadata-protocol: semantic
12+
13+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value or metadata type is added, removed or renamed, and nothing stored is rewritten: what moved is what a pick copies in the browser. The fix for an author is in the body: the price on a line in another currency is entered by hand. -->
14+
15+
**BREAKING** for forms and line-item grids that relied on a pick copying an amount across currencies. On a EUR invoice, picking a product whose price is in the home currency used to copy the number as euros (a $100 product became a €100 line). Nothing converted it. Now the price is not copied: the cell or field stays empty, and a note under the line (in a grid) or under the lookup (in a form) names the picked amount with its currency and the currency of the field, so the price can be entered by hand. The other fields of the same pick (a description) still fill.
16+
17+
**The rule.** It applies to the grid's same-named copy (the column key `autofill`), to the grid's declared `lookupAutofill` pairs, and to the record form's declared pairs, on a pick and on a create form's opening fill:
18+
19+
- an amount is a `currency` field or a `formula` returning `currency`; a `number` carries no currency and copies as before;
20+
- both sides in the home currency (neither declares one) copy as before, also when no home currency is configured;
21+
- otherwise the value copies only when both sides name the same known code: a `fixed` code, the code the record holds, or the code its `master_detail` parent holds (ADR-0144 D2 as amended), with the home currency counting as its configured code;
22+
- a field that follows a record's currency while that record holds none yet is not filled, and the note says no currency is chosen yet.
23+
24+
Nothing is converted at any rate, and no build-time check is added: the line's currency is known only while the form is open.
25+
26+
**`@objectstack/spec`.** The describes of `FieldSchema.lookupAutofill` and of the inline grid column key `autofill` state the rule.
27+
28+
**`@object-ui/fields`.** `planDeclaredLookupAutofill` returns the writes and the withheld values of a pick; `declaredLookupAutofillPatch` and `lookupAutofillPatch` keep returning the writes alone. `LookupField` hands a host that owns the pick (`onSelectRecord`) the referenced object's field map as a second argument. `GridField` takes `columnFields`, the child field behind each currency column, so a `fixed` code or a code on the line decides that column's currency as on the record form.
29+
30+
**`@object-ui/plugin-form`.** The record form stamps the definitions of a lookup's `lookupAutofill` targets on the lookup's field metadata, each with the name the form shows for it, so the lookup can read each target's currency and names it as the form does. The line-item hosts hand their grid each currency column's child field.
31+
32+
**`@object-ui/i18n`.** Three new `lookup.autofill*` sentences, in every locale pack.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/lint': minor
4+
'@objectstack/platform-objects': patch
5+
'@object-ui/app-shell': minor
6+
'@object-ui/i18n': patch
7+
---
8+
9+
feat(console): record create and edit stop loading internal forms; a field's Show on create switch
10+
11+
Clause-②: no (narrowing)
12+
Metadata-protocol: semantic
13+
14+
<!-- adr-0087: registered internal-record-forms-not-loaded -->
15+
16+
The Console's record create and edit surfaces no longer load an object's internal form view. The create dialog, the edit dialog, the full-page create and edit (`/new`, `/record/:id/edit`) and a create or edit an action opens now lay the record out by the object's field groups (`fieldGroups`) and follow the rules on its fields (`visibleWhen`, `readonlyWhen`, `requiredWhen`, `required`). What used to steer those surfaces and now steers nothing: the default form view (`form`, `formViews.default`), the `create` form view, and on them `sections`, the `tabbed` and `wizard` layouts, `defaultTab`, `tabPosition`, `subforms`, `modalSize`, `buttons`, `layout` and `defaults`. A master-detail sub-table still comes from `fieldGroups[].relatedList`, and a flow screen reads its sub-table settings from there too.
17+
18+
An app that still declares an internal form installs and runs as before; the definition is inert. A public form (`sharing.enabled: true`) keeps loading at its own link by its own definition, and a named form an action of type `form` opens is unchanged.
19+
20+
`showOnCreate` is now live: a field with `showOnCreate: false` is left out of every create surface and stays on edit, the record page and lists. The field form (`field.form.ts`) and the Studio field inspector offer it as "Show on create", on by default; a required field keeps it on.
21+
22+
`@objectstack/lint` adds the advisory rule `form-view-internal-not-loaded`: a warning, never an error, on each internal create or edit form an app declares (a container's `form`, `formViews.create`, `formViews.default`, and a stored form view that is the default or named `OBJECT.create`), and on no public or named form.
23+
24+
Studio: the Data pillar's Form tab always lays out the object's field groups, and the Interfaces rail no longer lists internal forms; public forms and named forms stay listed.
25+
26+
An app that relied on its internal form for create defaults should move them to each field's `defaultValue`; sections move to `fieldGroups`, and required or conditional rules move onto the fields.
27+
28+
The upgrade guide carries this as the protocol-18 semantic entry `internal-record-forms-not-loaded`.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/runtime': patch
4+
'@objectstack/plugin-audit': patch
5+
---
6+
7+
fix(comments): unreact, resolve and own-comment delete work on a kernel with no `http.server` (a hosted tenant kernel) instead of answering 404
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
The three comment doors, `DELETE /api/v1/comments/reactions/:id`, `PUT /api/v1/comments/:id/resolution` and `DELETE /api/v1/comments/:id`, were mounted by `AuditPlugin` only on the kernel's `http.server`. A hosted tenant kernel owns no socket and registers no `http.server`, so the host's `createHonoApp` catch-all handed each of them to the runtime dispatcher, which had no domain for them and answered `404 ROUTE_NOT_FOUND`, and removing a reaction, resolving or reopening a thread and deleting your own comment failed there.
13+
14+
- `@objectstack/spec/contracts` declares `ICommentDoorsService` with one optional, transport-neutral member, `handleCommentDoor(request: Request): Promise<Response>`, and types the `comments` service slot with it (`ServiceSlotContracts.comments`). A service without the member still satisfies the contract.
15+
- `AuditPlugin` registers the `comments` service with that member. It runs the same registrars over the same dependencies the `http.server` mount runs, on a private route table that never listens, so every answer is the mount's own. The `http.server` mount is unchanged, and no path is mounted twice. `@objectstack/plugin-audit` now depends on `@objectstack/plugin-hono-server` at runtime (the private table is a `HonoHttpServer`), and the `comments` service name is now taken: a composition that registers its own `comments` service alongside `AuditPlugin` fails to boot with a duplicate-service error.
16+
- The runtime dispatcher gains a `/comments` domain that claims exactly the three method and path shapes and forwards the request, body unread, to the request kernel's `comments` service. Every other `/comments` shape keeps the dispatcher's `404 ROUTE_NOT_FOUND`. With no `comments` service, or one without `handleCommentDoor`, the doors answer `501 NOT_IMPLEMENTED` naming `@objectstack/plugin-audit`. The doors stay behind the dispatcher's authentication and project-membership gates.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/components': patch
3+
'@object-ui/plugin-detail': patch
4+
---
5+
6+
fix(record-page): Esc in the side preview ends an inline edit and keeps the preview open
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
In a record's side preview (the drawer beside a list, or a record page's drawer), a field clicked into edit no longer loses the whole preview to Esc:
12+
13+
- **While a field is being edited**, Esc ends the edit and the preview stays open. It does what Esc does on the record's full page: the typed change is discarded without a prompt and nothing is written. The next Esc closes the preview (or, a level down, goes back one level), as before.
14+
- **A popover, select or menu open over the record** still takes Esc first and closes alone; the edit and the preview stay.
15+
- **The full record page is unchanged.**
16+
17+
For hosts of `NavigationOverlay` (`@object-ui/components`): a drawer now holds itself open on Esc while it draws an element marked `data-owns-pane-escape`, which `InlineEditSaveBar` (`@object-ui/plugin-detail`) carries while the record is being edited.

‎content/docs/data-modeling/fields.mdx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,13 @@ product's `list_price`.
296296
- **Overwrite rule.** By default a pick never replaces a value somebody wrote: the
297297
target is filled only while it is empty or still holds the value an earlier pick
298298
filled in. A pair with `overwrite: true` replaces the target on every pick.
299+
- **Currency rule.** An amount of money (a `currency` field, or a `formula` returning
300+
`currency`) is copied only into a target in the same currency: both in the home
301+
currency, or both naming the same code (a `fixed` code, or the code the record or
302+
its `master_detail` parent holds). Otherwise the target is left as it is and the
303+
form says why, naming both currencies and the picked amount so the price can be
304+
entered by hand. Nothing is converted. A `number` carries no currency and copies
305+
as before. The grid's same-named copy follows the same rule.
299306
- **Client-side only.** The fill edits the form, and the filled value is saved as an
300307
ordinary write. Nothing on the write path reads the key: an import or an API
301308
write that sets the lookup fills nothing.

‎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 (75)...
940+
→ Running author-time rules (76)...
941941
→ Checking that every required capability has a provider installable in this edition...
942942
→ Collecting package docs (ADR-0046)... 0 collected
943943
→ Writing artifact...

‎content/docs/deployment/validating-metadata.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ A clean run walks the registry and reports timing:
867867
Config: /path/to/support-desk/objectstack.config.ts
868868
Load time: 21ms
869869
→ Validating against ObjectStack Protocol...
870-
→ Running author-time rules (75)...
870+
→ Running author-time rules (76)...
871871
→ Checking that every required capability has a provider installable in this edition...
872872
→ Checking package docs (ADR-0046)...
873873

‎content/docs/getting-started/build-with-claude-code.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ visible: 'status != "resolved"'
311311
◆ Validate
312312
────────────────────────────────────────
313313
→ Validating against ObjectStack Protocol...
314-
→ Running author-time rules (75)...
314+
→ Running author-time rules (76)...
315315
316316
✗ Author-time rules failed (1 issue)
317317
• stack · action 'resolve_ticket' visible: bare reference `status` — a

0 commit comments

Comments
 (0)