fix(studio): lookup target picker shows the package's own draft objects#2199
Merged
Conversation
The field inspector's lookup 'related object' picker listed only published
objects (list('object')), so a sibling object still in draft — the natural
target when wiring up a new relational model in one pass — was invisible and
had to be typed as a raw API name blind. Merge unpublished object drafts
(listDrafts({type:'object'}), labelled '(草稿)') into the options so a lookup
can target a draft sibling before the package's first publish.
Verified in the browser: created a draft object 'interview' (面试), added a
lookup field, and confirmed 'interview' appears in the target datalist
alongside the published job/candidate/application.
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
|
This was referenced Jul 4, 2026
baozhoutao
added a commit
that referenced
this pull request
Jul 4, 2026
PR #2199 taught the inspector's useObjectOptions to also call client.listDrafts({type:'object'}) so a lookup can target sibling draft objects, but the test file's useMetadataClient mock only stubbed `list`. Every render now throws "client.listDrafts is not a function" in the mount effect, failing all 16 cases in this file (and breaking CI on main since 28682411708). Stub listDrafts alongside list. Co-authored-by: Claude <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
The field inspector's lookup related-object picker listed only published objects (
list('object')), so a sibling object still in draft — the natural target when wiring a new relational model in a single authoring pass — was invisible and had to be typed as a raw API name blind.Now the picker also merges unpublished object drafts (
listDrafts({ type: 'object' }), labelled(草稿)), so a lookup can target a draft sibling before the package's first publish.Why
Found dogfooding a new package end-to-end: building
application → candidate / jobwhile all three were still drafts, the picker showed onlyshowcase_*/sys_*objects, not the objects being designed. This is the Data-pillar twin of the nav object-picker fix in #2198.Verification
interview(面试), added a lookup field, and confirmedinterviewappears in the target datalist alongside the publishedjob/candidate/application(89 options total).@object-ui/app-shelltype-check clean.🤖 Generated with Claude Code