Skip to content
Merged
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
23 changes: 23 additions & 0 deletions .changeset/35891-record-page-no-stage-bar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@object-ui/plugin-detail': minor
'@object-ui/components': minor
'@object-ui/i18n': patch
'@objectstack/lint': minor
---

feat(plugin-detail): the default record page draws no stage bar and no key-field strip; the stage moves from the header's status tag

Clause-②: yes (widening)
Metadata-protocol: semantic

The default record page (`buildDefaultPageSchema`) no longer emits `record:highlights` or `record:path`. The stage is the status tag beside the record's name: a reader who may edit the stage field sees it with an arrow and opens a menu listing every stage in order, the current one checked; a stage the field's blocking `state_machine` cannot reach is disabled with its reason under the name. Picking a stage confirms, and a stage that makes other fields required (their `requiredWhen` holds once the record stands on it, such as a loss reason on a lost stage) asks for exactly those fields in the same dialog and writes them with the move. A refusal stays in the dialog, beside the field it names, and the stage does not move. A reader who may not edit the field, an approval lock or an open draft leaves the plain tag. A plain status field (no stage role) is read and moved the same way.

The details body now draws every field its groups hold: the highlight fields and the stage field are no longer taken out of their groups, so a record reads in the same groups and order in view and in edit (objectstack#35849). `highlightFields` itself is unchanged and still drives the hover card, a related list's default columns and the record picker; nothing is picked when an object declares none.

`buildDefaultHighlights` and both blocks are kept: an authored page, or a slotted page's `highlights` slot, still places a strip and a path where it wants them.

- `@object-ui/components`: `RecordHeaderState` gains an optional `stage` renderer (with the exported `RecordHeaderStageParts`), which the header calls with the stage tag it would draw. Without a host bar (a phone) the header now draws the stage tag in the row under the record's name, beside the state's tags; before, a phone showed no stage at all.
- `@object-ui/plugin-detail`: exports `RecordStageMenu`, the menu a host hands the header as `RecordHeaderState.stage`. Its fields-a-stage-needs dialog comes from the package-internal `useStageChange` (`record:path` keeps its plain confirmation).
- `@object-ui/plugin-detail`: `BuildPageOptions.highlightFields`, `.statusField` and `.stages` are still accepted by `buildDefaultPageSchema` and `buildDefaultTabs` but no longer do anything there, since the default page draws no strip and no stage bar; `buildDefaultHighlights` still reads them. Retiring them is objectstack#35943.
- `@object-ui/i18n`: four `detail.stageMenu*` strings in every locale.
- `@objectstack/lint`: `field-group-shadowed` no longer counts the highlight strip as hiding fields from the detail body, since the default record page leaves them in their groups; a group whose only visible member is the record title still warns.
2 changes: 1 addition & 1 deletion content/docs/data-modeling/objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const Account = ObjectSchema.create({
| `nameField` | `string` | optional | The stored field used as the record display name, e.g. `'name'` or `'title'` (ADR-0079). The deprecated alias `displayNameField` is still accepted. |
| `titleFormat` | `string` | optional | Deprecated (ADR-0079 → `nameField`). Render-only title template (e.g. `'{{record.name}} - {{record.code}}'`); an explicit `nameField` takes precedence. An object definition that declares it is refused at save and by `os validate`; a stored object that carries it still loads |
| `imageField` | `string` | optional | The record's picture: names a field of this object whose type is `image` or `avatar` — any other name is refused when the object is validated or published. It is the one object-level declaration the record page header draws beside the title; a record whose field is empty shows no picture. |
| `highlightFields` | `string[]` | optional | Most-important fields in priority order — default list columns, cards, previews, detail highlight strip (ADR-0085; formerly `compactLayout` — the old spelling was retired and is now rejected) |
| `highlightFields` | `string[]` | optional | Most-important fields in priority order — default list columns, cards, previews (ADR-0085; formerly `compactLayout` — the old spelling was retired and is now rejected) |
| `stageField` | `string \| false` | optional | Linear lifecycle field; `false` declares the status field non-linear and suppresses stage heuristics (ADR-0085) |

### Capabilities (`enable`)
Expand Down
2 changes: 1 addition & 1 deletion content/docs/data-modeling/schema-design.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const MyObject = ObjectSchema.create({
| `description` | string | Help text | `'Companies...'` |
| `nameField` | string | Canonical primary title field — the stored field used as the record display name (ADR-0079); the deprecated alias `displayNameField` is still accepted | `'name'` |
| `titleFormat` | string | Deprecated (ADR-0079 → `nameField`). Render-only title template (`{{record.field}}` interpolation); an explicit `nameField` now takes precedence. Refused at save and by `os validate`; a stored object that carries it still loads | `'{{record.name}} - {{record.id}}'` |
| `highlightFields` | string[] | Most-important fields, in priority order (default columns, cards, previews, detail highlight strip; ADR-0085 — formerly `compactLayout`; the old spelling was retired and is now rejected) | `['name', 'status']` |
| `highlightFields` | string[] | Most-important fields, in priority order (default columns, cards, previews; ADR-0085 — formerly `compactLayout`; the old spelling was retired and is now rejected) | `['name', 'status']` |

### Enable Features

Expand Down
8 changes: 4 additions & 4 deletions content/docs/ui/forms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ has been removed from `ObjectSchema`). Record-detail rendering is derived from
the object's **cross-surface semantic roles** (ADR-0085):

- `nameField` — which field is the record's display name.
- `highlightFields` — the most important fields (detail highlight strip,
default list columns, cards).
- `stageField` — the linear-lifecycle field behind the detail progress
stepper (`false` suppresses detection).
- `highlightFields` — the most important fields (hover cards, the record
picker, default list columns, cards).
- `stageField` — the linear-lifecycle field behind the stage tag in the
record header, a menu that moves it (`false` suppresses detection).
- `fieldGroups` + `Field.group` — semantic grouping, rendered identically on
forms, modals, and detail pages.

Expand Down
4 changes: 2 additions & 2 deletions content/docs/ui/pages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ replacement.
### The synthesized default

A record page needs no authoring. With no page assigned, the Console synthesizes one from
the object: a header, the highlights strip, the record's **details**, and a right column of
the object: a header, the record's **details**, and a right column of
panels: the related lists, then the attachments of an object with `enable: { files: true }`,
then **Approvals** when the record has approval requests, and **动态** (Activity) last. On a
narrow screen the same panels follow the details in one column, so **动态** ends the page. A
Expand Down Expand Up @@ -226,7 +226,7 @@ synthesizer fills in the rest. A slotted page authors `slots`, not `regions`:
| `header` | The `page:header` node |
| `actions` | The action bar (`record:quick_actions`) |
| `alerts` | The alert banners above the body |
| `highlights` | The highlights strip |
| `highlights` | Empty by default; a strip or stage bar placed here draws above the tabs |
| `details` | The record's details; the rest of the page stays synthesized |
| `discussion` | The discussion panel |

Expand Down
13 changes: 7 additions & 6 deletions docs/qa/platform-checklist/areas/studio-authoring.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,21 +315,21 @@
"title": "Record-page authoring round-trip: created bound to its object, seeded from the default layout, block-edited, published, rendered",
"since": "v16",
"status": "active",
"revision": 16,
"revision": 17,
"priority": "P1",
"surface": "mixed",
"personas": ["admin (authors)", "end user (opens the record). The viewer is the admin unless a member is used: every signed-in member reads showcase_account through the showcase's everyone baseline, showcase_member_default (allowRead; examples/app-showcase/src/security/permission-sets.ts MemberDefaultPermissionSet, which the dev CLI adds to every member per request). QA run #29893 (at 589049b0) drove the member leg as phone.demo@example.com and the authored page rendered; record which viewer each run used"],
"fixtures": {
"app": "showcase",
"requires": ["seeded showcase_account records to render the published page against (the stock showcase seed, examples/app-showcase/src/data/seed/index.ts). The object is chosen for two facts. It DECLARES highlightFields (status, industry, annual_revenue; examples/app-showcase/src/data/objects/account.object.ts), and since #28907 the synthesized default draws record:highlights only for declared highlightFields (deriveHighlightFields in ui/packages/plugin-detail/src/synth/buildDefaultPageSchema.ts: an object that declares none gets no strip), so only such an object can show acceptance[0]'s record:highlights. And it ships NO record page (no page under examples/app-showcase/src/ui/pages names it), so the authored page is the one usePageAssignment serves. ⛔ Not showcase_contact: it declares no highlightFields, so its full create seeds no record:highlights by design (QA run #29672). ⛔ Not showcase_invoice: it ships the package default record page showcase_invoice_document (isDefault: true, examples/app-showcase/src/ui/pages/invoice-document.page.ts), which wins by design (objectui react usePageAssignment: the default record page, else the first), and authoring a second isDefault page answers 422 DEFAULT_RECORD_PAGE_CONFLICT. showcase_project, showcase_task and showcase_preference ship defaults too (QA runs #24571 and #24604)"],
"requires": ["seeded showcase_account records to render the published page against (the stock showcase seed, examples/app-showcase/src/data/seed/index.ts). The object is chosen because it ships NO record page (no page under examples/app-showcase/src/ui/pages names it), so the authored page is the one usePageAssignment serves. ⛔ Not showcase_invoice: it ships the package default record page showcase_invoice_document (isDefault: true, examples/app-showcase/src/ui/pages/invoice-document.page.ts), which wins by design (objectui react usePageAssignment: the default record page, else the first), and authoring a second isDefault page answers 422 DEFAULT_RECORD_PAGE_CONFLICT. showcase_project, showcase_task and showcase_preference ship defaults too (QA runs #24571 and #24604)"],
"knownGaps": [
"AUTOMATION LIVES UNDER ui/ — `automated.ref` names objectui specs, and since objectui was imported into this repository they resolve at ui/PATH in this checkout. A jsdom unit pin runs from ui/, the objectui root, with its path written relative to ui/: `cd ui && pnpm exec vitest run --maxWorkers=1 packages/PKG/src/FILE`. ⛔ Not `pnpm --filter @object-ui/PKG exec vitest run FILE`: that runs in the package directory, and the ui vitest guard (ui/scripts/vitest-invocation-guard.mjs, which ui/vitest.config.mts calls) refuses any run whose Vitest root is not ui/ (its package-cwd verdict). a ui/e2e/live spec runs from ui/ with `pnpm test:e2e:live SPEC` against a live backend and the console dev server (the prerequisites are in ui/playwright.live.config.ts). Cite the output naming the commit, or drive the item by hand in the browser and score it as a manual run. ⛔ Never score it as covered on the strength of the `automated` field alone — an unrun pin is a claim, not evidence. Full protocol: RUNNER.md, the objectui-pinned-automation standing fact."
]
},
"steps": [
"open /_console/studio/~all/metadata/page/new — Studio's All metadata area, where the retired Setup create URL (/_console/apps/showcase_app/metadata/page/new) lands in one hop since #28818 (setupMetadataStudioPath); the same create form (MetadataResourceEditPage in create mode), and with no ?package= the save binds no package, as before — and fill the create form: Label 'Invoice Page <uniq>' (slugifies into Name), set Page type = record (the create form defaults Page type to list — objectui metadata-admin anchors.ts, the page createSchema), Kind = full (a record page's Kind defaults to slotted, which saves regions [] and shows the object's synthesized default page by design; only an explicit full copies the default's regions into the draft, the page createSeed in ui/packages/app-shell/src/views/metadata-admin/anchors.ts), Object showcase_account (fixtures.requires[0]); Save",
"capture the PUT /api/v1/meta/page/<name> request the save issues",
"assert the draft body: type:'record', object:'showcase_account', kind:'full', and regions seeded NON-empty from the object's synthesized default detail page (the page resource's createSeed hook) including a record:highlights block carrying the object's declared highlightFields (fixtures.requires[0]) — never a blank canvas (ADR-0034 / objectui#1541)",
"assert the draft body: type:'record', object:'showcase_account', kind:'full', and regions seeded NON-empty from the object's synthesized default detail page (the page resource's createSeed hook) including the record:details field sections, and no record:highlights or record:path block: since #35891 the synthesized default page draws neither, so the copy carries neither (an author adds them as blocks) — never a blank canvas (ADR-0034 / objectui#1541)",
"open the page editor (/_console/studio/~all/metadata/page/<name>, the All metadata item page — the generic editor, since the cross-package leg opens no pillar): the Basics, Data Context and Advanced panels render (the layout is edited on the canvas, not in a Layout section — see acceptance[1].verify), and 'Add block' opens the block-type picker",
"add a block (e.g. Card); the draft autosaves (the block pick and each property edit PUT the draft, and the toolbar Save stays disabled), then Publish through the ResourceEditPage draft/publish chrome",
"GET /api/v1/meta/page/<name>: the published regions must include the added block",
Expand All @@ -338,9 +338,9 @@
],
"acceptance": [
{
"clause": "a record page created Kind = full persists bound to its object with PRE-SEEDED regions — record:highlights present, regions non-empty, on an object that declares highlightFields (fixtures.requires[0])",
"clause": "a record page created Kind = full persists bound to its object with PRE-SEEDED regions — regions non-empty and the same blocks as the synthesized default page, which since #35891 places no key-field strip and no stage bar",
"oracle": "network",
"verify": "the captured PUT body has type:'record', object:'showcase_account', kind:'full', Array.isArray(regions) with blocks including record:highlights, which carries the declared highlightFields (status, industry, annual_revenue)",
"verify": "the captured PUT body has type:'record', object:'showcase_account', kind:'full', Array.isArray(regions) non-empty, its blocks (those inside page:tabs included) holding record:details, and no record:highlights or record:path block anywhere in them (buildDefaultPageSchema in ui/packages/plugin-detail/src/synth/buildDefaultPageSchema.ts places neither unless a highlights slot is authored)",
"evidence": "the captured PUT payload"
},
{
Expand Down Expand Up @@ -430,7 +430,8 @@
},
{ "revision": 14, "date": "2026-11-03", "change": "the item's record page moves from showcase_contact to showcase_account: fixtures.requires[0], personas[1], steps[0], steps[2], steps[6], acceptance[0] (clause and verify), acceptance[3].verify and automated.ref. Since #28907 (8bb2417a74) the synthesized default record page draws record:highlights only for an object's declared highlightFields (deriveHighlightFields, ui/packages/plugin-detail/src/synth/buildDefaultPageSchema.ts), and showcase_contact declares none. So QA run #29672 read a full create on it with no record:highlights and scored acceptance[0] FAIL as stale spec; its control, a full create on showcase_account, carried the block. Read from source at base 339f63da30: showcase_account declares highlightFields status, industry and annual_revenue (examples/app-showcase/src/data/objects/account.object.ts), the page createSeed copies the synthesized regions on a full create (ui/packages/app-shell/src/views/metadata-admin/anchors.ts), no showcase page names the object, and the everyone baseline showcase_member_default reads it. The clause keeps its strength: a full create on the named object without record:highlights is still the FAIL. acceptance[1] to [3] passed on showcase_contact in the run and are not yet driven on showcase_account. Card #29679, from QA run #29672", "ref": "#29679" },
{ "revision": 15, "date": "2026-11-04", "change": "steps[4] and personas[1] corrected from QA run #29893 (W5-STUDIO, at 589049b0): the record page draft autosaves (Save stays disabled), and the member leg has now been driven. Read at base f68b47ca", "ref": "#29906" },
{ "revision": 16, "date": "2026-11-08", "change": "acceptance[3].verify: a Card from the picker has no properties and renders an empty box, so its title is set before publish and the render is judged by that title. Checklist-accuracy finding of QA run #31486 (owed:weekly, at 0647dabb). Read at base 4894cfe1", "ref": "#31499" }
{ "revision": 16, "date": "2026-11-08", "change": "acceptance[3].verify: a Card from the picker has no properties and renders an empty box, so its title is set before publish and the render is judged by that title. Checklist-accuracy finding of QA run #31486 (owed:weekly, at 0647dabb). Read at base 4894cfe1", "ref": "#31499" },
{ "revision": 17, "date": "2026-11-20", "change": "fixtures.requires[0], steps[2] and acceptance[0] (clause and verify) follow #35891 (epic #35590; maintainer 2026-11-20 17:16:59Z, 「把阶段条和关键字段条去掉,是的」): the synthesized default record page places no record:highlights and no record:path, so a full create copies neither, and acceptance[0] would read their absence as a FAIL. The clause now asks for the default page's blocks, record:details among them, and for neither strip nor bar. showcase_account stays the object because it ships no record page; its declared highlightFields no longer decide the seed. The showcase_contact exclusion is gone with that reason. Read from source on the #35891 branch at base 2f314ee6b9. No run made", "ref": "#35891" }
]
},
{
Expand Down
Loading
Loading