Uh oh!
There was an error while loading. Please reload this page.
feat(studio): add "Local / Custom (this env)" scope to the package selector - #1946
Merged
Conversation
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 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 freeto 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.
Why
Found while dogfooding Studio in a self-hosted, metadata-customizable environment
(single-tenant — there is no org dimension; the real axis is code package vs.
runtime / DB-authored).
The Studio package selector only ever listed code packages. Metadata authored
at runtime (a custom object you create in Studio) is correctly org-scoped —
package_id = null,sys_metadataprovenance — so it was filtered out of everycode-package view. Navigating to such an item redirected to "new" (it wasn't in
the active package's list), even though the object existed and was editable.
This was surfaced by framework #2252 + objectui #1937: those stop runtime metadata
from being mis-stamped into a loaded code package (so it stays editable), which
correctly leaves it
package_id = null— and therefore invisible under any codepackage. This PR closes that last gap by making the local scope a first-class,
always-present selector entry.
What
ContextSelectors(the app-level scope dropdown): append a stable"Local / Custom (this env)" option (value
sys_metadata) for the packageselector. The metadata list/get API already treats
?package=sys_metadataasexactly this local scope (read returns
package_id = nullitems; write persistspackage_id = null). Kept the sentinel/label inline to avoid an import cyclewith the metadata-admin views.
StudioHomePage/DirectoryPage/ResourceListPage: accept the localscope (so it no longer redirects) and show this environment's runtime-authored
items. Deduplicated three identical package-list builders into a shared
buildPackageScopeOptionshelper (package-scope.ts).ResourceListPageclient-side scope filter: the Local scope matchesuntagged /
sys_metadatarows (previously they "never matched", per the oldcomment).
so you can start authoring locally even with zero items yet.
engine.package.local(en + zh).Verification (browser, console dev server → showcase backend)
runtime objects (e.g.
asset_verify, source = 运行时).read-only banner — the end-to-end repro of the original bug now passes.
@object-ui/app-shellContextSelectors tests green; lint clean (only thepre-existing
react-hooks/static-componentswarnings shared with main).🤖 Generated with Claude Code