Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .changeset/retire-spec-bridge-6366.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
---
'@object-ui/react': minor
---

refactor(spec-bridge): retire the spec-bridge — `SpecBridge`, `bridgeListView`, `bridgeFormView` (#6366)

Removed under the 2026-08-27 maintainer ruling on #6366 (Option A — remove, and
for `SpecBridge` as a WHOLE, not just the form half), on the same criteria the
17.0.0 entry used to remove `bridgePage` / `bridgeDashboard`: no runtime
consumer, and a route that could not deliver a working result even in
principle. The stage-1 measurement (2026-08-26, PM-verified) the ruling rests
on:

- **Zero consumers at every reachable endpoint** — no non-test caller in this
repo, none in the sibling `objectstack` repo (which does not depend on
`@object-ui/react` at all), and a GitHub-wide public code search returning
hits only inside this repository. External npm-private hosts are
unmeasurable from here; the ruling records fallback C (keep + document the
boundary) should evidence of one ever surface.
- **The bridged form route was structurally unable to work**: a bridged node
carries neither `objectName` nor `customFields`, so `ObjectForm` takes the
branch its own code labels "cannot proceed" and renders, in the registry
wrapper's words, "a field-less card in silence". The only working host
recipe (`{...node, objectName: '...'} as any`) existed solely inside the
list bridge's integration tests and was documented nowhere.

This knowingly reverses the 17.0.0 changelog line "The `list` and `form`
bridges are unaffected and remain the live authoring path" — by maintainer
ruling, on the same measurement criteria that entry itself applied.

#5898's restored-key work on the form-view bridge (the
`FormViewSpecConformance` suite and the spec keys it carried onto the bridged
node) is **superseded by this removal, not fixed** — the route it repaired is
gone. #6366's measured type-vocabulary asymmetry (a bridged field carrying
`text` where the normalizer produces `field:text`) is likewise mooted rather
than repaired.

The suites pinning the removed route go with it — retirement of a route
nothing travels, not quarantine: the seven suites under
`react/src/spec-bridge/__tests__/`, and plugin-grid's
`specBridgeColumnSpelling` / `specBridgeExportFormats` render-integration
suites. `ObjectGrid`'s own column-spelling, export-gate and density behavior
keep their non-bridge pins (`columnDeclaredSpellingOnly`, `exportGate`,
`exportServer`, `rowHeightOffSpecBoundary`, and core's
`normalize-list-view` suite).

BREAKING CHANGE: the public exports `SpecBridge`, `bridgeListView`,
`bridgeFormView` and the types `BridgeContext` / `BridgeFn` / `ObjectDefLite`
are removed from `@object-ui/react`. There is no replacement translation
layer — author `object-grid` / `object-form` nodes directly (the live path is
`app-shell`'s `ObjectView`, which builds them from the object's own metadata),
exactly as the 17.0.0 entry already directed for pages and dashboards.
2 changes: 1 addition & 1 deletion content/docs/api/schema-reference.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -791,7 +791,7 @@ A smart form that auto-generates fields from an ObjectQL object. Supports simple

`ObjectFormSchema` keys fall into three classes (#2545):

- **Spec-aligned** — same name and semantics as `@objectstack/spec` `FormViewSchema`: `title`, `description`, `layout`, `columns`, `sections`, `defaultTab`, `tabPosition`, `allowSkip`, `showStepIndicator`, `splitDirection`/`splitSize`/`splitResizable`, `drawerSide`/`drawerWidth`, `modalSize`, `subforms`, `submitBehavior` (plus `formType` ↔ spec `type`). Metadata using these keys round-trips through the SpecBridge without loss.
- **Spec-aligned** — same name and semantics as `@objectstack/spec` `FormViewSchema`: `title`, `description`, `layout`, `columns`, `sections`, `defaultTab`, `tabPosition`, `allowSkip`, `showStepIndicator`, `splitDirection`/`splitSize`/`splitResizable`, `drawerSide`/`drawerWidth`, `modalSize`, `subforms`, `submitBehavior` (plus `formType` ↔ spec `type`).
- **ObjectUI extensions** — serializable extras with no spec backing yet: `showSubmit`/`submitText`, `showCancel`/`cancelText`, `showReset`, `nextText`/`prevText`, `successMessage`, `navigateOnSuccess`, `resetOnSuccess`, `modalCloseButton`, `className`, `initialValues`, `fields`, `customFields`. Sanctioned and documented here; candidates for upstreaming into the spec are tracked in #2545.
- **Runtime-only** — non-serializable renderer concerns that never appear in view metadata: `mode`, `recordId`, `open`/`onOpenChange`, `readOnly`, and all callbacks (`onSuccess`, `onError`, `onCancel`, `onStepChange`, `submitHandler`).

Expand Down
43 changes: 18 additions & 25 deletions packages/plugin-grid/src/__tests__/gridNonAuthorKeys.test.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -91,9 +91,11 @@
* `UserActionsConfigSchema` (`sort`, `search`, `filter`, `refresh`,
* `rowHeight`, `addRecordForm`, `editInline`, `buttons`), which REJECTS
* `edit` BY NAME. `ListViewSchema` accepts it, so it is spec-legal, and it
* is really written: `SpecBridge.transformListView` copies it onto the
* `object-grid` node `ObjectGrid` renders, and `app-shell`'s `ObjectView`
* builds one unconditionally. "Nobody authors it" was false.
* is really written: `app-shell`'s `ObjectView` builds one unconditionally.
* "Nobody authors it" was false. (A second producer,
* `SpecBridge.transformListView`, copied it onto the `object-grid` node
* until the whole spec-bridge was retired — objectui#6366, 2026-08-27
* maintainer ruling: zero measured consumers on every reachable endpoint.)
* - OBJECT-level `userActions` is the CRUD-PREDICATE block (`edit` /
* `delete` / `create` carrying `visibleWhen` / `disabledWhen`,
* objectui#2614) — the only shape `listViewPredicates` can read, since its
Expand DownExpand Up@@ -127,7 +129,7 @@ import { ComponentRegistry, collectPredicateFieldRefs, listViewPredicates } from
import { ComponentPropsMap, ListViewSchema, UserActionsConfigSchema } from '@objectstack/spec/ui';
import { manifestFromConfigs, validateTree } from '@object-ui/sdui-parser';
import { registerAllFields } from '@object-ui/fields';
import { ActionProvider, SpecBridge } from '@object-ui/react';
import { ActionProvider } from '@object-ui/react';

import { ObjectGrid } from '../ObjectGrid';
// Module scope, not a hook: this import IS the registration (AGENTS.md's
Expand DownExpand Up@@ -511,27 +513,18 @@ describe('the view-level key is AUTHORED, not an unwritten surface (objectui#524
expect(unrecognizedKeys(result)).toContain('edit');
});

it('the PRODUCER writes it onto the very `object-grid` node ObjectGrid renders', () => {
// The producer IS the evidence, same as the `NON_AUTHOR_KEYS` table above —
// except here it proves the opposite: the key is written, so "nobody
// authors it" was never available as a reason.
const node = new SpecBridge().transformListView({
name: 'accounts',
columns: [{ field: 'name', label: 'Name' }],
userActions: VIEW_TOOLBAR_BLOCK,
} as never) as unknown as Record<string, unknown>;
expect(
node.type,
'the list bridge no longer emits `object-grid` — the collision comments name this producer.',
).toBe('object-grid');
expect(
node.userActions,
'the list bridge stopped copying `userActions` onto the grid node. If that is the'
+ ' producer-side fix (the spec-coordination card the 2026-08-20 ruling routed through'
+ ' triage), the collision comments in `ObjectGrid.tsx` are due a re-read — do not just'
+ ' delete this assertion.',
).toEqual(VIEW_TOOLBAR_BLOCK);
});
// A third `it` stood here: "the PRODUCER writes it onto the very
// `object-grid` node ObjectGrid renders", witnessed with
// `new SpecBridge().transformListView(...)`. Its own failure message said
// "do not just delete this assertion" — that instruction covered the
// producer-side fix routed through triage by the 2026-08-20 ruling, not what
// actually happened: the WHOLE spec-bridge (`SpecBridge`, `bridgeListView`,
// `bridgeFormView`) was retired by the 2026-08-27 maintainer ruling on
// objectui#6366 (zero measured consumers at every reachable endpoint), so
// the witness it rendered no longer exists. The key is still AUTHORED — the
// surviving producer is `app-shell/src/views/ObjectView.tsx`, which builds a
// view-level toolbar block unconditionally — and the two pins above still
// hold the "spec-legal on a view" half of the claim.
});

describe('only the OBJECT block is interpretable by the predicate harvest (objectui#5240)', () => {
Expand Down
132 changes: 0 additions & 132 deletions packages/plugin-grid/src/__tests__/specBridgeColumnSpelling.test.tsx

This file was deleted.

Loading
Loading