Skip to content

Commit f7d907a

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-36485-design-entry-app-menu
2 parents 9012402 + ed0edb1 commit f7d907a

93 files changed

Lines changed: 4702 additions & 948 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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/fields': patch
3+
---
4+
5+
fix(fields): a line-item grid whose first load failed loads again on its next mount, with no page reload
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The line-item grid's body loads on first use. When that first load failed once (a network blip, a deploy that swapped chunk names) and the host had not preloaded it, the grid showed its error from then on, even after the body was reachable again, until the page was reloaded. `GridField` / `LineItemsField` no longer hold the body in a `React.lazy`, which keeps a failed load for good: each mount that finds the body still loading asks for it once, a failure still reaches the nearest error boundary, and the next mount asks again. The `grid` form-field widget (the registered `field:grid` and `getLazyFieldWidget('grid')`) now resolves to that same face, so it recovers the same way.
11+
12+
What does not change: a mount after the body has loaded renders it directly, `preloadGridField()` still never rejects, and the props of both names are unchanged. A form drawing a `grid` field shows the grid's own loading placeholder while the body loads. No metadata key, value or default changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the UI skill teaches the New and Edit forms as built from the object's fields and field groups, and `showOnCreate`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
objectstack-ui no longer teaches an object's internal create and edit form views, which the Console's create and edit surfaces stopped loading. `SKILL.md` Traps 1 and `rules/list-views.md` "Form Views" now say that New and Edit are built from the object's fields, sectioned by its `fieldGroups` (`collapse: 'collapsed'` folds a rarely filled section) and following the fields' own rules; that `showOnCreate: false` leaves a field off every create surface and is refused beside `required: true`; and that a container's `form`, `formViews.default` and `formViews.create` still parse, steer nothing, and are reported by `os validate` as `form-view-internal-not-loaded`. The two form views that load are kept: a named `formViews` entry an action of type `form` opens (`/forms/:name`), and a public form (`sharing.enabled: true`), taught as before. "Master-Detail Forms" drops the form-view `subforms` override, which is no longer read; the parent field group naming the child and the page block remain. `evals/views-apps-actions-pages.json`, evals 1, 6, 13 and 19: each taught or assumed an internal form view and now expects the object's field groups and `showOnCreate`.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/fields': patch
3+
---
4+
5+
fix(fields): a tap anywhere on a lookup picker option selects it, including on a record chip in its preview
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A lookup picker's option shows a preview of its other columns under its label. A column that references another record drew a link to that record there (on a record page, its chip), and a tap or a click on it opened that record instead of selecting the option, leaving the edit behind. An email, URL or phone column in the preview did the same with the mail client, the browser or the dialer.
11+
12+
The preview now draws every column the way the "browse all records" picker table already did: a reference keeps its face, the record page's chip included, without the link, and an email, URL, phone or file column shows its text. A tap or a click anywhere on the option selects it, on a phone and on a desktop. Both picker surfaces now take this rule from the one renderer they share.
13+
14+
What does not change: the read cells outside the picker (record page fields, list and grid cells) keep their links. No metadata key, value or default changes.
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+
'@object-ui/plugin-detail': patch
4+
'@object-ui/i18n': patch
5+
'@object-ui/components': patch
6+
---
7+
8+
feat(console): an administrator configures the record page's tabs in place, from the record's 「…」
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
On the record page of an object whose package is writable (an object of a self-built app), a workspace administrator who may author metadata finds 「Configure tabs」 among the record's own entries in its 「…」 (desktop full page only; never on a phone, in a drawer or a pane, or on a page its author composed). Chosen, the page enters an edit state in place: a bar across the top with 「Configure tabs」, 「Cancel」 and 「Save」, in the design mode's bar's look, and the tab row turns into an editor. The record stays on screen as the preview, in the administrator's default order.
14+
15+
In the edit state the related tabs are dragged to a new order, hidden into a 「Hidden」 area and shown again from it, and renamed; the attachments tab can be hidden; 审批 and 动态, which the page always draws last, are shown fixed, and so is a list another package brings. 「Adjust field groups」 opens the object in Studio. 「Cancel」 drops the changes and writes nothing; leaving the page with a change held asks first.
16+
17+
「Save」 writes the object's `relatedLists` over the object as stored (never as served), as a draft with the first-write pin, and publishes it, so everyone sees the new default order, names and hidden tabs. An object's own `relatedLists` hides a tab by leaving it out; an entry the editor does not arrange (a 审批 / 动态 name, a list it does not offer) is kept. A reader's own dragged order still lays over the new default, and 「Restore default order」 returns them to it. A tab is renamed only in the app's source language, where its shown name is its stored one, the design-mode menu's rule.
18+
19+
New language-pack keys under `designMode.recordTabs` in all eleven console locales. `RecordPageColumns` takes an optional `tabRowEditor`, drawn in the tab row's place. Objects of installed (read-only) packages are not offered the entry yet.
20+
21+
`page:header`: a `⋯` entry that finished on the click (it returned no pending promise) now closes the menu, as Refresh does; an entry still running keeps the menu open with its row busy until it settles, as before.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(studio): the object page saves with Cancel and Save in the top bar, and a Save is live at once
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Studio's object page (fields, validation rules, actions, settings and field groups) no longer autosaves a draft 1.5 s after each edit. Edits stay on the page until the author presses Save, which sits at the right of the Studio top bar where Publish was; Cancel beside it puts the page back as the server holds it. Save writes the object's draft and then publishes that one object at the package it was written to, so the change is live at once. An installed app's object takes its edits into the paired `.custom` package and publishes them there.
12+
13+
Changes and Publish are drawn only while drafts are pending (a copilot's, or another editor's), and a publish waits while the page holds edits Save has not sent. A Save refused by the server keeps the edits on the page with the reason, and its toast names each refused item with its reason and lists the items that were saved. Removing or retyping a published field asks first. Save waits out the expression checks of the last keystroke, so a formula or rule guard that does not parse is never sent. Leaving the page, or opening another object, with unsaved edits asks, as every departure does.
14+
15+
Other Studio editors (flows, hooks, list and form views, navigation, permissions) keep their draft autosave for now.
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(app-shell): the design-mode menu builds on a case-insensitive file system — its helper module no longer shares the component's name up to letter case
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`layout/` held the menu editor component `DesignModeMenu.tsx` beside its pure tree helpers `designModeMenu.ts`. On a case-insensitive file system (the macOS default) the sidebar's lazy `import('./DesignModeMenu.js')` tried `.ts` first and found the helper module, which has no default export: the `@object-ui/app-shell` build failed with TS1149 ("differs from already included file name … only in casing"), and a Console bundled there turned the whole page white when 「Edit app」 opened design mode. The helpers are now `designModeMenuModel.ts` (its test `designModeMenuModel-36363.test.ts`), so `./DesignModeMenu.js` can only reach the component. No behaviour changes; Linux builds were never affected.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
---
4+
5+
fix(driver-sql): removing a field's default stores NULL on MySQL 8, and never leaves a NOT NULL column refusing writes
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
#36245 made schema sync drop a column DEFAULT the field no longer declares. On MySQL 8 the drop left the column with no default at all, so an insert that omitted the field was refused ("Field … doesn't have a default value") where Postgres and SQLite store NULL. On a nullable column MySQL now sets the default to NULL instead, so an unset insert stores NULL on all three databases.
11+
12+
On a NOT NULL column the drop no longer travels alone, because the database would then refuse every insert that omits the field. When the field does not hold the column NOT NULL (no `storage.notNull` and not `required`, or `storage: { notNull: false }` in words), the drop is reported together with relaxing the column, both `needs_confirm`: `os migrate apply` applies them, and so do the publish of the object and the managed install of its package when the field declares `storage: { notNull: false }`. Afterwards an unset insert stores NULL. Dev auto-reconcile applies neither, as before for a relax. When the field still holds the column NOT NULL (`storage: { notNull: true }` or `required`), the column is left alone and the stale default is reported as `destructive`, which no automatic path applies. No metadata key, value or default changes.

‎packages/drivers/driver-sql/src/schema-drift.ts‎

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,12 @@ export function diffManagedTable(args: {
13441344
// explicit physical constraint — NOT against `required`, which is the
13451345
// write-time contract and implies nothing about the column) ──────────
13461346
const expectNullable = field.storage?.notNull !== true;
1347+
// [#36596] Whether a `relax_not_null` is proposed for this column: the
1348+
// literal-DEFAULT arm below drops a NOT NULL column's stale default only
1349+
// alongside it, never alone.
1350+
let relaxProposed = false;
13471351
if (expectNullable && !col.nullable && field.storage?.notNull === false && fieldName !== ceremonyOwnedNullability) {
1352+
relaxProposed = true;
13481353
// [#32590] The author DECLARED the column nullable — `storage: { notNull:
13491354
// false }`, written out, not merely absent. The column constraint is the
13501355
// declaration's to own (ADR-0113 D2), and this is the "deliberately
@@ -1385,6 +1390,7 @@ export function diffManagedTable(args: {
13851390
`package applies it ("os package install"); or relax it deliberately via "os migrate apply".`,
13861391
});
13871392
} else if (expectNullable && !col.nullable && field.required !== true && fieldName !== ceremonyOwnedNullability) {
1393+
relaxProposed = true;
13881394
// Column STRICTER than its declaration — and the field is not even
13891395
// write-gated, so an omitting write reaches the DB and dies as a raw
13901396
// driver error instead of a clean validation 400. That surprise is
@@ -1491,7 +1497,7 @@ export function diffManagedTable(args: {
14911497
const physical = physicalDefaultLiteral(col.defaultValue);
14921498
const multiValue = isMultiValueField({ type: String(field.type ?? ''), multiple: field.multiple === true });
14931499
if (physical.kind === 'literal' && !multiValue) {
1494-
if (dv === undefined || dv === null) {
1500+
if ((dv === undefined || dv === null) && col.nullable) {
14951501
out.push({
14961502
kind: 'default_mismatch',
14971503
remoteName: table,
@@ -1508,6 +1514,43 @@ export function diffManagedTable(args: {
15081514
`database stores nothing. Dropping the default is non-destructive and rewrites no stored row. ` +
15091515
SAFE_COLUMN_REMEDY,
15101516
});
1517+
} else if (dv === undefined || dv === null) {
1518+
// [#36596] A NOT NULL column. Dropping its only DEFAULT alone would
1519+
// turn every insert that omits the field from "stores the old value"
1520+
// into "refused by the database" — so the drop never travels alone.
1521+
// Where the declaration does not hold the column NOT NULL (the relax
1522+
// above is proposed: `storage.notNull: false` in words, or no storage
1523+
// declaration on a field that is not `required`), the drop travels
1524+
// WITH that relax at the relax's own category, `needs_confirm`, and
1525+
// is applied by the same deliberate acts (publish / package install
1526+
// for the declared-`false` case, #33724; `os migrate apply`), after
1527+
// which an omitting insert stores NULL. Anywhere else (`storage:
1528+
// { notNull: true }`, a `required` field, the ceremony-owned tenant
1529+
// column) the column is left alone: the entry is `destructive`, so no
1530+
// automatic path applies it, and it is reported (warned at boot, listed
1531+
// by "os migrate plan") rather than silently ignored.
1532+
const pairs = relaxProposed;
1533+
out.push({
1534+
kind: 'default_mismatch',
1535+
remoteName: table,
1536+
table,
1537+
column: fieldName,
1538+
expected: '(no column default)',
1539+
actual: `DEFAULT ${quoteDefaultForMessage(physical.text)}`,
1540+
severity: 'warning',
1541+
category: pairs ? 'needs_confirm' : 'destructive',
1542+
op: { type: 'drop_column_default', table, column: fieldName },
1543+
message: pairs
1544+
? `${table}.${fieldName}: the NOT NULL column carries DEFAULT ${quoteDefaultForMessage(physical.text)}, but the ` +
1545+
`field declares no default and does not hold the column NOT NULL. Dropping the default goes with ` +
1546+
`relaxing the column (reported alongside), so an insert that omits the field stores NULL, as on a new ` +
1547+
`database; neither statement rewrites a stored row. Apply both together: publish the object, install ` +
1548+
`the package that declares it, or run "os migrate apply".`
1549+
: `${table}.${fieldName}: the NOT NULL column carries DEFAULT ${quoteDefaultForMessage(physical.text)}, but the ` +
1550+
`field declares no default. Left as it is: the column stays NOT NULL, so dropping its default would ` +
1551+
`make the database refuse every insert that omits the field. Declare the default again, or relax the ` +
1552+
`column (\`storage: { notNull: false }\`) and the default is dropped with it.`,
1553+
});
15111554
} else if ((typeof dv === 'string' || typeof dv === 'number' || typeof dv === 'boolean') && !isRuntimeDefaultValue(dv)) {
15121555
if (physicalLiteralMatches(physical.text, dv, field.type) === false) {
15131556
out.push({

0 commit comments

Comments
 (0)