Skip to content

Commit 890e350

Browse files
committed
test(spec): ledger the page-only userFilters keys the view form does not offer
The reconciliation walk resolves view.userFilters to the page-shaped UserFiltersSchema; the list arm the view form lays out refuses tabs, showAllRecords and allowAddTab, so they get omit rows. Claude-Session: https://claude.ai/code/session_01WGufzjGQVFPCizmQreyKkv Co-authored-by: Claude <noreply@anthropic.com>
1 parent d92e5a4 commit 890e350

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎packages/spec/src/system/metadata-form-zod-reconciliation.test.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,18 @@ const LEDGER: ReadonlyArray<OmitEntry | SubsetEntry> = [
198198
key: 'sourceView',
199199
why: '@deprecated legacy named-view inheritance, honored at runtime as a fallback but deliberately not offered to new authors — a page defines columns/sort/filterBy directly (ADR-0047 revised)',
200200
},
201+
// #30267 — `view.form.ts` now spells out `userFilters`' children. This walk
202+
// resolves the block through the view union to the page-shaped
203+
// `UserFiltersSchema`; the list arm the view form lays out takes
204+
// `ObjectUserFiltersSchema`, which omits these three page-only keys and
205+
// refuses them on an object view.
206+
...(['tabs', 'showAllRecords', 'allowAddTab'] as const).map((key): OmitEntry => ({
207+
kind: 'omit',
208+
type: 'view',
209+
path: 'userFilters',
210+
key,
211+
why: "page-only — a list view's `userFilters` is `ObjectUserFiltersSchema`, which omits this key and refuses it on an object view (named presets on an object view are `listViews` entries); the view form lays out that list arm, so a control here would offer a value the save rejects",
212+
})),
201213
{
202214
kind: 'omit',
203215
type: 'object',

0 commit comments

Comments
 (0)