feat(fields): wire the user field picker to a real sys_user search#2014
Merged
Conversation
The `user`/`owner` field widgets previously rendered a placeholder ("User
selection component requires integration with user management system") and the
form-type map fell through to `field:text`, so a `user` field rendered as a
plain text input.
`UserField` now delegates to the shared `LookupField` with the reference fixed
to `sys_user` — reusing the existing debounced candidate search, the
record-picker dialog and id resolution — so selecting a person works the same
way as any lookup, with zero bespoke data plumbing.
`mapFieldTypeToFormType` now maps `user`/`owner` to `field:user`/`field:owner`.
This closes the existing `field-type-coverage` regression guard, which already
listed both types as required form widgets but had no mapping wired (the widget
map and cell renderers were registered; the form-type map was the missing link,
so the guard was red on main).
Table-cell display continues to use `UserCellRenderer` (avatars / initials).
Pairs with the framework `user` field type (a lookup specialized to sys_user).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
added a commit
that referenced
this pull request
Jun 26, 2026
Follow-up to #2014 (UserField now delegates to the lookup picker against sys_user). The docs still described the old placeholder state. - fields/user.mdx — replaced the "requires integration with your user management system" Integration section with how it actually works (delegates to the lookup picker, dataSource queries sys_user, $expand resolves name/avatar); replaced the custom-backend "Backend Implementation" snippet with the native behavior (defaultValue: 'current_user' stamping, expand resolution, owner_id/RLS); fixed the owner defaultValue token to 'current_user'. - guide/fields.md — added `user` and `owner` rows to the standard field-type registry table (the page already used getCellRenderer('user') in an example). Docs-only. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes the
user/ownerfield widgets actually pick a person. PreviouslyUserFieldrendered a placeholder ("User selection component requires integration with user management system") andmapFieldTypeToFormTypefell through tofield:text, so auserfield rendered as a plain text input.How
UserFieldnow delegates to the sharedLookupFieldwith the reference fixed tosys_user— reusing the existing debounced candidate search, theRecordPickerDialog, and id resolution. Selecting a person works the same way as any lookup, with zero bespoke data plumbing.mapFieldTypeToFormTypemapsuser/owner→field:user/field:owner.Closes a latent red regression guard
field-type-coverage.test.tsalready listeduser/owneras required form widgets, but no mapping was ever wired — the widget map and cell renderers were registered, the form-type map was the missing link, so that guard was red onmain. This closes it.Table-cell display continues to use
UserCellRenderer(avatars / initials).Tests
field-type-coverageregression guard now green foruser/owner.@object-ui/fieldssuite: 4652 pass.Paired backend
framework #2351 adds the
userfield type (a lookup specialized tosys_user).🤖 Generated with Claude Code