fix(metadata): package-scope the Studio editor read via ?package= (ADR-0048)#1819
Merged
Merged
Conversation
…age= (ADR-0048) The ?layers=true single-item read (Studio editor's 3-state view) ignored packageId, so editing one of two same-named items from different packages resolved ambiguously. Thread packageId through getMetaItemLayered (code layer + overlay query), registry.getArtifactItem / lookupArtifactItem (prefer-local), and the rest-server layered branch. Verified live: the Studio editor at /apps/:app/metadata/doc/showcase_index loads each package's own item per ?package= (com.example.showcase vs com.objectstack.studio); layered REST endpoint disambiguates; objectql 602 / rest 108 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 13, 2026
3 tasks
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
Closes the last gap in the ADR-0048 per-route package-scoped resolution audit: the Studio metadata editor (
/apps/:appName/metadata/:type/:name).The
?layers=truesingle-item read (the editor's 3-state code/overlay/effective view) ignoredpackageId, so editing one of two same-named items from different packages resolved ambiguously (first match). Note:appNamethere is the studio package, not the edited item's owner — so the scope must come from the item's owning package, carried as?package=.Changes
protocol.getMetaItemLayeredthreadspackageIdinto the code layer (metadataService.get+lookupArtifactItem+registry.getItem) and thesys_metadataoverlay query (package_idprefer-local).registry.getArtifactItem(type, name, currentPackageId?)+lookupArtifactItemgained the optional package-scope hint (prefer-local).rest-serverthreads?package=into the layered branch.Frontend counterpart
objectui PR —
MetadataClient.layered/getDraftaccept{ packageId }; the metadata list links emit?package=<row._packageId>;ResourceEditPagereads it and scopes the layered/draft read.Verification
getMetaItemLayeredpackage-scoping (code + overlay). objectql 602 / rest 108 green./apps/com.objectstack.studio/metadata/doc/showcase_indexloads each package's own item per?package=:?package=com.example.showcase→ Label "Showcase", content "# Showcase…"?package=com.objectstack.studio→ Label "Studio Intro", content "# STUDIO VERSION"?layers=true&package=) disambiguatescode/effective. No console errors.🤖 Generated with Claude Code