From 058ebfc56fd74e02d8ff3590f8c89f97085dbb14 Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Tue, 30 Jun 2026 00:43:05 +0800 Subject: [PATCH 1/2] feat(spec): add userActions.editInline toggle for inline record editing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inline cell editing is a first-class, author-controlled list property, but UserActionsConfigSchema (the shared toggle set behind both a view's toolbar and a page's interfaceConfig.userActions) had no field for it — so the metadata-admin "Interface (list pages)" panel, which auto-renders these booleans as checkboxes, couldn't expose it. The runtime already honors it (objectui InterfaceListPage reads userActions.editInline -> inlineEdit). Add `editInline: boolean` (default false — a list is read-only unless the author opts in), sitting alongside `addRecordForm`. When on, cells edit with the field's type-aware widget (the same control the form uses). view.test.ts: assert the default (false) and the accepted (true) value. Co-Authored-By: Claude Opus 4.8 --- packages/spec/src/ui/view.test.ts | 3 +++ packages/spec/src/ui/view.zod.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/packages/spec/src/ui/view.test.ts b/packages/spec/src/ui/view.test.ts index 646f40d5ec..ad149dd7b7 100644 --- a/packages/spec/src/ui/view.test.ts +++ b/packages/spec/src/ui/view.test.ts @@ -2051,6 +2051,7 @@ describe('UserActionsConfigSchema', () => { expect(config.filter).toBe(true); expect(config.rowHeight).toBe(true); expect(config.addRecordForm).toBe(false); + expect(config.editInline).toBe(false); expect(config.buttons).toBeUndefined(); }); @@ -2061,11 +2062,13 @@ describe('UserActionsConfigSchema', () => { filter: false, rowHeight: true, addRecordForm: true, + editInline: true, buttons: ['btn_export', 'btn_archive'], }); expect(config.sort).toBe(false); expect(config.filter).toBe(false); expect(config.addRecordForm).toBe(true); + expect(config.editInline).toBe(true); expect(config.buttons).toEqual(['btn_export', 'btn_archive']); }); diff --git a/packages/spec/src/ui/view.zod.ts b/packages/spec/src/ui/view.zod.ts index 3874db17ca..fbf92c987a 100644 --- a/packages/spec/src/ui/view.zod.ts +++ b/packages/spec/src/ui/view.zod.ts @@ -241,6 +241,7 @@ export const UserActionsConfigSchema = lazySchema(() => z.object({ filter: z.boolean().default(true).describe('Allow users to filter records'), rowHeight: z.boolean().default(true).describe('Allow users to toggle row height/density'), addRecordForm: z.boolean().default(false).describe('Add records through a form instead of inline'), + editInline: z.boolean().default(false).describe('Allow users to edit records inline — click a cell to edit it with the field\'s type-aware widget (the same control the form uses). Off by default: the list is read-only unless the author opts in.'), buttons: z.array(z.string()).optional().describe('Custom action button IDs to show in the toolbar'), }).describe('User action toggles for the view toolbar')); From 07db615e4fece832b0b9ec8a0e322e6492c99ad9 Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Tue, 30 Jun 2026 00:52:42 +0800 Subject: [PATCH 2/2] chore(changeset): @objectstack/spec patch for userActions.editInline Co-Authored-By: Claude Opus 4.8 --- .changeset/useractions-edit-inline.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .changeset/useractions-edit-inline.md diff --git a/.changeset/useractions-edit-inline.md b/.changeset/useractions-edit-inline.md new file mode 100644 index 0000000000..9a6eb7ee18 --- /dev/null +++ b/.changeset/useractions-edit-inline.md @@ -0,0 +1,14 @@ +--- +'@objectstack/spec': patch +--- + +feat(spec): add `userActions.editInline` toggle for inline record editing + +`UserActionsConfigSchema` — the shared toggle set behind both a view's toolbar +and a page's `interfaceConfig.userActions` — gains `editInline: boolean` +(default `false`, alongside `addRecordForm`). The runtime already honors it +(objectui `InterfaceListPage` reads `userActions.editInline` → `inlineEdit`), +and the metadata-admin "Interface (list pages)" panel — which auto-renders +these booleans as checkboxes — now exposes an "Edit Inline" toggle. When on, +cells edit with the field's type-aware widget (the same control the form uses). +A list stays read-only unless the author opts in.