Skip to content

finding: the docs gallery fixture declares users.role / users.status as select with no options, so any form bound to them renders "No options available" #6317

Description

@os-support-ai

Filed unassigned while implementing #6167 (PR #6314). Not claiming.

What was measured

apps/site/app/components/galleryDataSource.ts serves one object, users, and its USERS_SCHEMA declares:

role: { label: 'Role', type: 'select' }
status: { label: 'Status', type: 'select' }

Neither declares options, while every row carries a value for them (admin / member / viewer, active / invited / suspended). examples/schema-catalog/test/catalog-gallery-render.test.tsx mirrors the same fixture.

ObjectForm copies the field's options through verbatim — formField.options = field.options || [] (packages/plugin-form/src/ObjectForm.tsx) — so a form bound to those fields renders an empty select. Measured through the gallery's own render path, an object-form over users with no fields restriction:

text: "NameEmailRoleNo options availableDepartmentStatusNo options availableCancelUpdate"

Two of the five visible controls are an empty picker with the placeholder "No options available", on a docs page whose purpose is to show the component working.

Why it is worth recording

The plugin-grid and plugin-view entries do not expose it: a grid renders a select-typed cell as its raw value, so admin / active simply print. It surfaces the moment an entry puts those fields in a FORM, which is what #6167's new plugin-form entries do. Those two entries dodge it by authoring fields: ['name', 'email', 'department'] (plus created_at), so nothing is broken today — but the reason they avoid role and status is this, and that is a constraint on the fixture rather than on the examples.

Not fixed in PR #6314 because the fixture is shared: it is mirrored in the catalog test, and adding options would change what select-typed cells render in the plugin-grid / plugin-view tiles (label instead of raw value), which is outside that card's declared surface and wants its own before/after.

Possible fix

Declare the options on both fields in galleryDataSource.ts and in the mirror, with labels matching the values already in USERS_ROWS, then re-measure the plugin-grid / plugin-view tiles for text changes.

Severity left to triage.

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:dispatched

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions