Skip to content
Closed
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
13 changes: 13 additions & 0 deletions .changeset/detail-stagefield-typed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@objectstack/spec': patch
---

feat(spec): add a typed `stageField` key to the object `detail` block

The detail-page synth (`@object-ui/plugin-detail`) already reads
`def.detail?.stageField` to drive — or disable — the auto status-path stepper
(`record:path`). It only survived via the `detail` block's `.passthrough()`, so
authors got no type or autocomplete and no way to discover the switch. Declare
it explicitly: `string` forces a status field, `false`/`null` disables the
stepper (use it when `status` is a non-linear picklist). `.passthrough()` is
kept for back-compat.
7 changes: 7 additions & 0 deletions packages/spec/src/data/object.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -707,11 +707,18 @@ const ObjectSchemaBase = z.object({
* - `hideRelatedTab=true` suppresses the "Related" tab. By default the
* synth removes the Related tab automatically when the rail is shown to
* avoid duplication; set this flag to force hide/show regardless.
* - `stageField` controls the auto status-path stepper (`record:path`).
* A field name forces that field; `false`/`null` disables the stepper —
* use it when `status` is a non-linear picklist (active/paused/voided)
* that shouldn't render as an ordered Path. Omit it to let the synth
* auto-detect (status/stage/state/phase, or a status/stage-typed field).
*/
detail: z.object({
renderViaSchema: z.boolean().optional().describe('Opt this object out of the schema-driven detail renderer'),
hideReferenceRail: z.boolean().optional().describe('Suppress the right-hand reference-rail on the detail page'),
hideRelatedTab: z.boolean().optional().describe('Suppress the Related tab on the detail page'),
stageField: z.union([z.string(), z.literal(false), z.null()]).optional()
.describe('record:path status field name; false/null disables the auto status-path stepper'),
}).passthrough().optional().describe('Detail-page UI hints consumed by @object-ui/plugin-detail synth'),

/**
Expand Down