You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sort on ListView renders blank repeater in Edit View Config β z.union hides items from SchemaForm π Β #3379
In Edit View Config β Columns & Filters β Sort, clicking "Add sort" produces an empty row with no field picker or order dropdown. Users cannot configure default sort at all.
Cause
ListViewSchema.sort is defined as a union wrapping both a legacy string form and the canonical array form. The array definition ends up inside an anyOf branch, but the ObjectUI SchemaForm repeater only reads schema.items at the top level β it finds undefined and renders zero sub-fields.
Suggested fix
Drop the legacy string variant and use the canonical z.array(z.object({ field, order })) directly. The string form was already deprecated in #3373 and its removal was deferred to a separate cycle.
changed the title [-]sort on ListView renders blank repeater in Edit View Config β z.union hides items from SchemaForm[/-][+]sort on ListView renders blank repeater in Edit View Config β z.union hides items from SchemaForm π [/+]on Jul 21, 2026
What was done β a renderer-only fix in ObjectUI's SchemaForm. The repeater now resolves the sort union (anyOf: [string, {field,order}[]]) to its array branch before reading items, so the Sort field renders the field picker + order (asc/desc) dropdown instead of a blank row. Covered by a new unit test (SchemaForm.repeaterUnion.test.tsx) and verified end-to-end in a real browser (empty Sort row β Field + Order controls).
Scope note β the suggested spec change was intentionally not made. This issue proposed dropping the legacy bare-string variant from ListViewSchema.sort. That was not done, because view.zod.ts carries an explicit instruction directly above sort β "Removal will go through its own deprecation cycle; do not drop it here" β and the string form is kept covered by a live fixture (examples/app-showcase/.../task.view.ts, guarding objectui#2601). Dropping it would break that fixture and be a breaking change to the public spec. Per #3373 the union was kept intentionally, so the spec-side removal remains its own separate, deferred deprecation cycle and is not closed by this fix.
Closing as completed since the user-facing bug (blank Sort repeater in Edit View Config) is resolved.
Activity
[-]sort on ListView renders blank repeater in Edit View Config β z.union hides items from SchemaForm[/-][+]sort on ListView renders blank repeater in Edit View Config β z.union hides items from SchemaForm π [/+]os-zhuang commentedon Jul 21, 2026
Fixed by objectstack-ai/objectui#2771 (merged).
What was done β a renderer-only fix in ObjectUI's
SchemaForm. The repeater now resolves thesortunion (anyOf: [string, {field,order}[]]) to its array branch before readingitems, so the Sort field renders the field picker + order (asc/desc) dropdown instead of a blank row. Covered by a new unit test (SchemaForm.repeaterUnion.test.tsx) and verified end-to-end in a real browser (empty Sort row βField+Ordercontrols).Scope note β the suggested spec change was intentionally not made. This issue proposed dropping the legacy bare-string variant from
ListViewSchema.sort. That was not done, becauseview.zod.tscarries an explicit instruction directly abovesortβ "Removal will go through its own deprecation cycle; do not drop it here" β and the string form is kept covered by a live fixture (examples/app-showcase/.../task.view.ts, guarding objectui#2601). Dropping it would break that fixture and be a breaking change to the public spec. Per #3373 the union was kept intentionally, so the spec-side removal remains its own separate, deferred deprecation cycle and is not closed by this fix.Closing as completed since the user-facing bug (blank Sort repeater in Edit View Config) is resolved.
Generated by Claude Code