feat(studio): package-scope the metadata editor read (ADR-0048)#1711
Merged
Conversation
Two installed packages may ship metadata with the same type/name; the Studio
editor now resolves the right one instead of first-match.
- MetadataClient: layered()/getDraft() accept { packageId }; get() emits the
`package` query param (server prefer-local).
- ResourceListPage: each row's edit link carries its owning package
(?package=<row._packageId>) so even the unscoped list disambiguates.
- ResourceEditPage: reads ?package= and scopes the layered + draft read. The
route's :appName is the Studio app, not the edited item's owner, so the scope
comes from the URL.
Verified live: /apps/com.objectstack.studio/metadata/doc/showcase_index loads
each package's own item per ?package= (showcase vs studio); no console errors.
Co-Authored-By: Claude Opus 4.8 (1M context) <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 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 audit: the Studio metadata editor (
/apps/:appName/metadata/:type/:name). Two installed packages may ship metadata with the sametype/name; the editor now resolves the right one instead of first-match.Changes
data-objectstack):layered()andgetDraft()accept{ packageId };get()emits thepackagequery param → server prefer-local (?package=).?package=<row._packageId>), so even the unscoped "all" list disambiguates; falls back to the workspace suffix for runtime/overlay-only rows.?package=and scopes the layered + draft read. The route's:appNameis the Studio app, not the edited item's owner, so the scope must come from the URL.Server dependency
Requires framework#1819 (the
?layers=trueendpoint now threadspackageIdthroughgetMetaItemLayered).Verification
Live, against a real same-name collision (showcase + studio both shipping
doc/showcase_index):/apps/com.objectstack.studio/metadata/doc/showcase_index?package=com.example.showcase→ editor loads Label "Showcase", content "# Showcase…"…?package=com.objectstack.studio→ editor loads Label "Studio Intro", content "# STUDIO VERSION"Typecheck clean; data-objectstack 177 / app-shell 499 tests green. No console errors.
🤖 Generated with Claude Code