Skip to content

Commit 65b9199

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-35689-inline-edit-a11y
The approval-lock hook moved to one read per page (#36295); the re-render on an answer is re-applied on its new shape. Claude-Session: https://claude.ai/code/session_01QsR2jUc3qp6bHKSWijbjds Co-authored-by: Claude <noreply@anthropic.com>
2 parents 6bc8529 + c448c61 commit 65b9199

280 files changed

Lines changed: 11935 additions & 1412 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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/console': patch
5+
---
6+
7+
perf(console): the first load stops downloading the grid and detail packages; `@object-ui/plugin-detail/core` publishes the detail helpers without registering anything
8+
9+
Clause-②: yes (widening) — one new published `exports` subpath, `@object-ui/plugin-detail/core`, joins what the package accepts; nothing is removed or renamed, and the package root exports the same names as before
10+
Metadata-protocol: none
11+
12+
`@object-ui/plugin-detail` registers its detail and record-page renderers with `ComponentRegistry` when its root entry is evaluated, and the root reaches every detail surface (and, in the console's build, the grid it draws with). A host that imported one pure helper from the root therefore kept the whole package. The package now publishes a `/core` subpath that registers nothing: `isRefusedFeedRead`, `relatedListEntryNames`, `RELATED_ARRANGEMENT_RECORD_VERSION`, `relatedArrangementFromRecord`, `relatedArrangementToRecord`, `deriveFieldGroupDetailSections`, `deriveHighlightFields`, `resolveDetailSections`, `isWideFieldType`, `prefetchRelatedCounts`, `relatedCountTargetsIn`, `COMPACT_RELATED_ROWS`, `normalizeRelatedListSort`, `seedQueueClaimDecision`, `seedRecordFieldAccess`, `seedRecordVerdict`, and the type `RelatedArrangement`.
13+
14+
The same names stay exported from the package root, unchanged; nothing to migrate. The subpath ships ESM only (`import`), as the other `/core` subpaths do. The package's ESM build now emits one file per source module (`dist/index.js`, `dist/core.js` and the modules they import), so the record-page caches a `/core` seed writes are the ones the root's hooks read; the UMD build (`dist/index.umd.cjs`) is unchanged.
15+
16+
The console (`@object-ui/console`, and the shell it draws, `@object-ui/app-shell`) takes these helpers from the subpath, draws the record pointer card's key fields and the approval decision's child tables through `lazy()`, loads the dev-only row-actions page lazily, and registers the tags the grid and detail packages register (`object-grid`, `view:grid`, `detail-view`, `detail-section`, `view:detail`, and the eleven `record:` blocks `details`, `related_list`, `highlights`, `activity`, `chatter`, `discussion`, `path`, `quick_actions`, `history`, `reference_rail`, `alert`) as lazy stubs with the namespaces those registrations declare. Neither package is downloaded on the first load any more; the list and record routes load them with their own route chunks, and any other surface loads them, and registers once, the first time it draws a grid or a detail block. What every page draws is unchanged.
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+
---
4+
5+
fix(approvals): the approval e-mail's link and the action-link page's inbox link open the Console under its mount
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
The approval e-mail's "Open the approval" link was `BASE/system/approvals?request=ID`. `os serve` serves the Console at `/_console/` and nothing at `/system/*`, so the link answered `404 ENDPOINT_NOT_FOUND` and the request never opened. The "Open the Approvals Inbox" link on the action-link result page (`/api/v1/approvals/act`) had the same defect.
11+
12+
Both links now carry the Console's mount. The mount is read from the auth service's Console page composer (`getConsoleUrl`, which reads `AuthConfig.uiBasePath`, default `/_console`), the same composer the auth e-mails and the mention e-mail use.
13+
14+
- The e-mail link goes from `BASE/system/approvals?request=ID` to `BASE/_console/system/approvals?request=ID` on a default deployment. A deployment that sets `uiBasePath` to `/` keeps `BASE/system/approvals?request=ID`. Its base is still the approval links' own (`publicBaseUrl`, else `OS_AUTH_URL` / `OS_BASE_URL`). A kernel with no auth service has no mount to read, and the e-mail link stays as it was.
15+
- The inbox link goes from the origin-relative `/system/approvals` to `BASE/_console/system/approvals`. It is now absolute under the approval links' base when one resolves, and relative (`/_console/system/approvals`) when none does. With no mount to read (no auth service, or `uiBasePath` set to `/`) it is `BASE/system/approvals`.
16+
17+
The widening: the exported `ApprovalServiceOptions` gains the optional `getConsoleUrl` that carries the composer; the in-app `actionUrl` is unchanged.

‎.changeset/35280-about-version.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
fix(console): the About dialog names the ObjectStack version first, then the console build
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Help → About showed one row, the console build (a git short sha), and nowhere the ObjectStack version. The dialog now opens on an **ObjectStack version** row filled with exactly the `version` the server's discovery document answers (an operator's `OS_RUNTIME_VERSION` stamp where one is set), read through the shell's adapter from the discovery document the console already holds, so opening it sends no new request. **Console build** stays as the second row, so a deployment can still be traced to a commit. While the read is in flight the version row says it is loading; when discovery cannot be read or names no version, it says so in words ("Unknown version (the server did not report one)"), never an empty field.
12+
13+
New locale keys `help.aboutVersion` and `help.aboutVersionUnknown` in all eleven packs, and `help.aboutDescription` now names both rows. No props or exports change.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
fix(plugin-detail): a laid-out record page whose first details block draws no body still shows the approval band
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The laid-out record page draws the record's approval band ("Locked for approval" / "In approval · editable", with its recall lever and tally) once per page. It used to give the band to the first `record:details` node of the details column and tell every later one not to draw it, so on a slotted page whose `details` slot puts first a `record:details` the reader may not see (its `requiredPermissions` withheld) or one that draws its own header (`showHeader: true`), a locked record showed no band at all. The details column now draws the band by the first details body that reaches its place, the rule a page drawn as written already follows: the next part draws it. Every other page reads as before, the band stays above a body table, and whether the band reads locked or editable (a `lockRecord: false` approval node) is unchanged.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
docs(spec): two upgrade-guide entries state the record page rules as merged
6+
7+
Clause-②: no
8+
Metadata-protocol: semantic
9+
10+
`field-group-related-list-side-card-refused` no longer lists a plain `master_detail` with no `inlineEdit` among the shapes a field group may not name: a group may place a `master_detail` FK that declares no `relatedList`, `inlineEdit` or not, and makes it a body table. Its remedy and reason name that rule. `page-slots-tabs-retired` says a `kind: 'full'` page is drawn as authored on the desktop full record page; a phone and the side preview draw the standard record page. No rule, refusal, schema or entry `id` changes, and `os migrate meta` lists the same entries for the same stacks.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/rest': patch
4+
'@objectstack/plugin-approvals': patch
5+
'@objectstack/client': patch
6+
'@object-ui/plugin-grid': patch
7+
'@object-ui/components': patch
8+
'@object-ui/i18n': patch
9+
---
10+
11+
fix(approvals, list): a list cell no longer opens an editor before it knows the record's approval lock, and the list reads the locks of a page in one request
12+
13+
Clause-②: yes (widening)
14+
Metadata-protocol: none
15+
16+
**What a list user sees.** On a list that edits in place, a double-click, Enter, F2 or a typed key on a cell whose record's approval lock or edit permission is still being read no longer opens an editor that the server would then refuse on save. The cell says "Checking whether this record can be edited…", and when the answer arrives the same edit goes ahead by itself (with the typed key), or the cell says why it does not: the record is locked while it is in approval, or the reader has no permission to edit it. Selecting another cell in the meantime drops the wait. Moving the selection with the arrow keys no longer sends a lock request per row: the first cell selected on a page asks the locks of every row on it at once.
17+
18+
**New route.** `POST /api/v1/approvals/records/:object/locks` with the body `{ "recordIds": ["<id>", ...] }` (at least one id, at most `APPROVAL_RECORD_LOCKS_MAX_RECORD_IDS`, 200) answers `{ success: true, data: { records: [{ recordId, locked }] } }`, one entry per id in order. `locked` is what `GET /api/v1/approvals/records/:object/:recordId/lock` answers for that id, and `null` where that route answers 404: a record the caller cannot read and one that does not exist answer alike. Any other body (a key other than `recordIds`, an empty list, a non-string or blank id, more ids than the cap) and any query parameter are refused whole with `400 VALIDATION_ERROR`, never trimmed. A deployment whose approvals service does not implement the read answers `501`.
19+
20+
**Contract and SDK.** `IApprovalService` gains the optional member `getRecordLocks(object, recordIds, context)`, entry `i` answering `recordIds[i]` exactly as `getRecordLock` does; the approvals plugin implements it in two reads whatever the page size (the caller's read of the ids, then one pending-request lookup judged by the record-lock hook's own judgement). `@objectstack/spec/contracts` exports `APPROVAL_RECORD_LOCKS_MAX_RECORD_IDS`. `@objectstack/client` gains `client.approvals.getRecordLocks(object, recordIds)`.
21+
22+
**Components.** `GridCellFacts` (the select-first table's per-cell facts) gains the optional `checking: { text, settled }`: while present, an edit asked on the cell shows `text` and is asked again when `settled` settles; a toggle, paste or clear shows `text` and writes nothing. A host that sets no `checking` sees no change.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The `objectstack-ui` skill teaches how an object's list opens a record after `navigation.mode` was deprecated there:
9+
10+
- Record-page rule, step 5: on an object's list the record's name opens the full page and the hover icon beside it opens the drawer. `navigation.mode` is deprecated there: `drawer`, `page` and `new_window` change nothing, so the key is omitted; `none` still means rows open nothing (prefer `preventNavigation: true`); a page block's `navigation` still honours every value. The step no longer teaches `navigation: { mode: 'page' }` as the way to open the full page.
11+
- Step 6 no longer lists the Display menu's Open records choice or the drawer's full-width state among the reader's own choices: both were removed.
12+
- The navigation rule's Surface bullet states the same rule in place of "`page` only by declaration".
13+
- `SKILL.md` principle 5 says how a record opens from an object's list is not authored, in place of "one list-view key"; its Where-to-go row for the record page no longer reads "drawer or page".
14+
- Eval `record-page` case 2 ("open contracts as a full page, and beside the list") now expects nothing to be authored: it requires the answer to name the icon and forbids a `mode: 'page'` declaration. The case has a new hash, so `skill-evals --regrade` sets it apart from a round recorded before this change.
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+
fix(console): the bare data page opens a record the way an object's list does
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On the bare data page (`/apps/APP/OBJECT/data`) a click on a record's name used to open the record in the side drawer. It now follows the list's one rule: the name opens the record's full page, and the 「Open in side panel」 icon that appears in the name cell while the row is hovered opens the side drawer over the list (`?recordId=`). The full page carries the data page as its origin, with its URL conditions, its name, the rows it shows and the count it matched: the page's top bar counts the record among them, ↑ ↓ step through them, and its ✕ returns to the data page with its conditions. A click on any other cell still selects it and opens nothing; a touch tap on a row opens the full page; a phone draws no icon; a list-only object's rows still open nothing. `?recordId=` links keep opening the drawer.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/objectql': minor
4+
'@objectstack/lint': minor
5+
'@object-ui/app-shell': minor
6+
'@object-ui/plugin-detail': minor
7+
'@object-ui/i18n': minor
8+
---
9+
10+
feat(spec): an object extension says where the fields, groups and child lists it brings go (`place`), and a child list another package brings is no longer hidden by the parent's `relatedLists`
11+
12+
Clause-②: yes (widening)
13+
Metadata-protocol: semantic
14+
15+
An `objectExtensions` entry can now place what it brings on the object it extends:
16+
17+
```ts
18+
objectExtensions: [{
19+
extend: 'account',
20+
fields: { tax_id: { type: 'text', label: 'Tax ID' } },
21+
place: [
22+
{ field: 'tax_id', group: 'basic', after: 'industry' },
23+
{ group: { key: 'tax', label: 'Tax' }, after: 'basic' },
24+
{ list: 'contract', after: 'opportunity', label: 'Contracts', columns: ['name', 'amount'] },
25+
],
26+
}],
27+
```
28+
29+
- **No `place`: nothing moves.** Fields still arrive after the object's own, and an extension that writes no `place` serves exactly what it served before.
30+
- **One merge, every reader.** The registry fold applies the placements once, after every contributor's fields are merged, so the record page, the forms and Studio show one arrangement. Uninstalling or disabling the package takes its items off and leaves the object's own order as it was.
31+
- **Placement arranges what the parent declares.** A list placement applies when the extended object declares `relatedLists`; a group or field placement when it declares `fieldGroups`. On a parent that declares neither, its automatic arrangement stays and nothing is dropped: the list shows in the automatic tab order, and its entry's `label` / `columns` are not applied either (write `relatedListTitle` / `relatedListColumns` on your child object's lookup field to title it on every parent); the field shows among the fields, its `after` / `before` not applied. The boot log names each placement that did not apply, with the object and the package. It is the main channel: `os validate` names it too (`extension-placement-not-applied`, warning) only when the extended object is in the same stack.
32+
- **Anchors and order.** `after` or `before`, not both; neither means the end. An anchor may be an item another placement brings, whatever order the two are written or registered in. An anchor nobody has puts the item at the end of its group, of the groups, or of the tabs (before a trailing approvals / activity-stream run), and `os validate` warns (`extension-placement-anchor-missing`). A list placement's `columns` are fields of the child, checked by `os validate` as a `relatedLists` entry's are (`related-list-column-unknown`). Several packages at one anchor follow ascending `priority`, then package name, so every build gives the same order. When the object itself already names the list or lists the field, its own position wins.
33+
- **An extension places only its own items.** A field outside its own `fields`, a field the extended object declares (also one the extension redeclares to relabel it), a group key the extended object already declares, or a list (placed as a tab or by a group's `relatedList`) that is not a child object of its package pointing at the extended object is refused at parse or at `defineStack`, and skipped by the merge with a warning naming whose item it is, whichever door registered the extension. The extension keys `fieldGroups` and `relatedLists` are refused with a prescription naming `place`.
34+
- **Shipped behaviour change (flips #35897's hiding):** a child list another package brings is no longer hidden by the parent's declared `relatedLists`. Placed, it sits where its package puts it; unplaced, it shows at the end of the tabs. "Another package" means the child and the parent both belong to a package and the two differ; a child of the parent's own package, or one no package owns, is still hidden until an entry names it. This narrows the #35897 note "A child list another package adds is hidden too until the parent names it … letting a package place its own list is a later change": that change is this one.
35+
- **Studio** (object settings, Record page tabs) shows such a list read-only among the unlisted rows with a "from <package>" badge, and the preview draws it where the record page does.
36+
37+
What to check in an app: on an object that declares `relatedLists`, every installed package's child lists of it now show, at the end of the tabs unless placed; name one in the parent's `relatedLists` to put it elsewhere, or set `relatedList: false` on that package's FK to hide it. Nothing in HotCRM changes meaning today: no module writes `place`, and no object declares `relatedLists`. Most HotCRM objects already declare `fieldGroups`, so a field or group placement there applies as soon as a module writes one; a list placement waits until the parent declares its `relatedLists` (follow-up #35902). ADR-0087 semantic entry `object-extension-place-and-cross-package-lists`; ADR-0146 D10 and ADR-0085 notes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
feat(cli): `os migrate list-preferences` deletes the per-reader list preference rows the Console no longer reads
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The Console no longer reads or writes the per-reader list preference rows an earlier Console stored in `sys_user_preference` under `ui.list.<object>` (column widths, row height, view-tab order and, before that, sorts, filters and columns). The rows are not carried anywhere. This new operator command deletes them.
11+
12+
- `os migrate list-preferences` is a dry run by default: it counts the rows, readers and organizations, and per key the rows and readers holding it. It never prints a value and writes no row, table or file.
13+
- `--apply` deletes, and only with `--export <path>`: every row the run deletes, as stored, is written to an owner-only file (`0600`, never overwriting one) and read back before the first delete. Each delete is the engine's by-id delete in the system context, on every organization's rows.
14+
- After the deletes the family is read again; any row still there exits `1`. A second run finds nothing and exits `0`.
15+
- A row belongs to the family only when its key starts with `ui.list.`, compared exactly. `ui.record.<object>` and every other preference key are untouched.
16+
- Nothing on a boot, upgrade or migrate path runs it.
17+
18+
Upgrade note: once the upgraded Console is serving, run `os migrate list-preferences` once, a dry run first and then `--apply --export <path>`. Left in place the rows are unread, so it is cleanup, not a gate.

0 commit comments

Comments
 (0)