diff --git a/packages/spec/src/ui/page.form.ts b/packages/spec/src/ui/page.form.ts index 94820688ef..76589a4b30 100644 --- a/packages/spec/src/ui/page.form.ts +++ b/packages/spec/src/ui/page.form.ts @@ -107,6 +107,16 @@ export const pageForm = defineForm({ { field: 'addRecord', type: 'composite', disclosure: 'popover', helpText: 'Add-record entry point' }, // Buttons ARE object actions — pick from the source object's actions. { field: 'buttons', widget: 'action-multi', dependsOn: 'source', helpText: "Toolbar buttons — pick from this object's actions" }, + { + field: 'recordAction', + options: [ + { label: 'Drawer (right-side peek)', value: 'drawer' }, + { label: 'Full page', value: 'page' }, + { label: 'Modal', value: 'modal' }, + { label: 'Not clickable', value: 'none' }, + ], + helpText: 'How clicking a record opens its detail', + }, { field: 'showRecordCount', helpText: 'Show the record count bar' }, { field: 'allowPrinting', helpText: 'Allow users to print this page' }, ], diff --git a/packages/spec/src/ui/page.zod.ts b/packages/spec/src/ui/page.zod.ts index 20c237d1fb..42c7ecbb3c 100644 --- a/packages/spec/src/ui/page.zod.ts +++ b/packages/spec/src/ui/page.zod.ts @@ -261,6 +261,12 @@ export const InterfacePageConfigSchema = lazySchema(() => z.object({ * Buttons ARE object actions (not free text): correct-by-construction. */ buttons: z.array(z.string()).optional().describe("Toolbar buttons — names of the source object's actions to surface in the page toolbar"), + /** How clicking a record opens its detail: 'drawer' (right-side peek panel, + * default), 'page' (full-page navigate to the record route), 'modal', or + * 'none' (rows not clickable). */ + recordAction: z.enum(['drawer', 'page', 'modal', 'none']).optional() + .describe("How clicking a record opens its detail (drawer | page | modal | none). Default: drawer"), + /** Record count */ showRecordCount: z.boolean().optional().describe('Show record count at page bottom'),