Skip to content

Commit 81a3d1f

Browse files
committed
feat(spec): add userActions.refresh toggle to ListView (objectui#2634)
The ListView UserActionsConfig exposed toolbar toggles for sort / search / filter / rowHeight but had no toggle for a manual data-refresh action, so consumers had no spec-canonical way to reload a list without a full page reload (objectui#2634). Add `refresh: boolean` (default true) alongside the existing toggles. objectui's ListView reads `userActions.refresh` to gate its toolbar Refresh button; the liveness note for `userActions` is updated to record the new live sub-key. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C7Z2cbcb14wb99upTD6LNw
1 parent 3a18b60 commit 81a3d1f

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

packages/spec/liveness/view.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"conditionalFormatting": { "status": "live", "note": "objectui: ObjectGrid.tsx (audit L15)." },
4242
"inlineEdit": { "status": "live", "note": "objectui: ObjectGrid.tsx (audit L15)." },
4343
"exportOptions": { "status": "live", "note": "objectui: ObjectGrid.tsx (audit L15)." },
44-
"userActions": { "status": "live", "note": "objectui: ListView.tsx:374 toolbarFlags (search/sort/filters/density/hide-fields/group/color + addRecordForm). Sub-key userActions.buttons has NO reader (audit L20, re-verified objectui@fb35e48) — dead sub-surface, enforce-or-remove worklist." },
44+
"userActions": { "status": "live", "note": "objectui: ListView.tsx:374 toolbarFlags (search/sort/filters/refresh/density/hide-fields/group/color + addRecordForm). Sub-key userActions.refresh drives the manual toolbar Refresh button (objectui#2634). Sub-key userActions.buttons has NO reader (audit L20, re-verified objectui@fb35e48) — dead sub-surface, enforce-or-remove worklist." },
4545
"appearance": { "status": "live", "note": "objectui: allowedVisualizations gates the view-type switcher (audit L15); showDescription gates ListView.tsx:1728." },
4646
"tabs": { "status": "live", "note": "objectui: TabBar.tsx — icon/visible/pinned/filter wired (audit L15). Sub-key tabs[].order is NOT used for sorting (audit L20) — dead sub-surface." },
4747
"addRecord": { "status": "live", "note": "objectui: ListView.tsx:374 (addRecord + userActions.addRecordForm drive the add-record flow). Sub-keys addRecord.mode / addRecord.formView have NO reader (audit L20, re-verified objectui@fb35e48) — dead sub-surface." },

packages/spec/src/ui/view.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,6 +2126,7 @@ describe('UserActionsConfigSchema', () => {
21262126
expect(config.sort).toBe(true);
21272127
expect(config.search).toBe(true);
21282128
expect(config.filter).toBe(true);
2129+
expect(config.refresh).toBe(true);
21292130
expect(config.rowHeight).toBe(true);
21302131
expect(config.addRecordForm).toBe(false);
21312132
expect(config.editInline).toBe(false);
@@ -2335,11 +2336,13 @@ describe('ListViewSchema — Airtable Interface parity fields', () => {
23352336
sort: true,
23362337
search: true,
23372338
filter: false,
2339+
refresh: false,
23382340
rowHeight: false,
23392341
},
23402342
});
23412343
expect(listView.userActions?.sort).toBe(true);
23422344
expect(listView.userActions?.filter).toBe(false);
2345+
expect(listView.userActions?.refresh).toBe(false);
23432346
});
23442347

23452348
it('should accept list view with appearance', () => {

packages/spec/src/ui/view.zod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ export const UserActionsConfigSchema = lazySchema(() => z.object({
240240
sort: z.boolean().default(true).describe('Allow users to sort records'),
241241
search: z.boolean().default(true).describe('Allow users to search records'),
242242
filter: z.boolean().default(true).describe('Allow users to filter records'),
243+
refresh: z.boolean().default(true).describe('Allow users to reload the view data from the backend without a full page reload'),
243244
rowHeight: z.boolean().default(true).describe('Allow users to toggle row height/density'),
244245
addRecordForm: z.boolean().default(false).describe('Add records through a form instead of inline'),
245246
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.'),

0 commit comments

Comments
 (0)